Skip to content

Commit

Permalink
Add exploration noise to rl training collector (#1481)
Browse files Browse the repository at this point in the history
* Update vessel.py

Add exploration_noise=True  to training collector

* Update vessel.py

Reformat
  • Loading branch information
chenditc committed Aug 18, 2023
1 parent 05d67b3 commit 5387ea5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion qlib/rl/trainer/vessel.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ def train(self, vector_env: FiniteVectorEnv) -> Dict[str, Any]:
self.policy.train()

with vector_env.collector_guard():
collector = Collector(self.policy, vector_env, VectorReplayBuffer(self.buffer_size, len(vector_env)))
collector = Collector(
self.policy, vector_env, VectorReplayBuffer(self.buffer_size, len(vector_env)), exploration_noise=True
)

# Number of episodes collected in each training iteration can be overridden by fast dev run.
if self.trainer.fast_dev_run is not None:
Expand Down

0 comments on commit 5387ea5

Please sign in to comment.