Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add exploration noise to rl training collector #1481

Merged
merged 2 commits into from
Aug 18, 2023
Merged

Conversation

chenditc
Copy link
Contributor

@chenditc chenditc commented Mar 30, 2023

Add exploration_noise=True to training collector.

Description

DQN family need to use this parameter to randomly sample action.

Default behavior won't change action, this will only affect policy which implemented exploration_noise function :
https://github.com/thu-ml/tianshou/blob/7f8fa241dd501dbab7dba5c7e95f66702ecf039b/tianshou/policy/base.py#L92

Motivation and Context

Current rl framework don't support DQN family algorithm

How Has This Been Tested?

  • Pass the test by running: pytest qlib/tests/test_all_pipeline.py under upper directory of qlib.
  • If you are adding a new feature, test on your own test scripts.

Screenshots of Test Results (if appropriate):

  1. Pipeline test:
  2. Your own tests:

Types of changes

  • Fix bugs
  • Add new feature
  • Update documentation

Add exploration_noise=True  to training collector
@github-actions github-actions bot added the waiting for triage Cannot auto-triage, wait for triage. label Mar 30, 2023
@Fivele-Li
Copy link
Contributor

I think it would be better to make the exploration_noise a configurable variable instead of hardcoding it in the code.

@chenditc
Copy link
Contributor Author

chenditc commented May 5, 2023

This is in the train function, I don't see any scenario where we want to disable exploration when training a RL agent.

In the test function, the flag is default to False.

@you-n-g you-n-g merged commit 5387ea5 into microsoft:main Aug 18, 2023
@Fivele-Li
Copy link
Contributor

Thank you so much for taking the time to submit your pull request. Your contribution is greatly appreciated!

PaleNeutron pushed a commit to PaleNeutron/qlib that referenced this pull request Oct 11, 2023
* Update vessel.py

Add exploration_noise=True  to training collector

* Update vessel.py

Reformat
@SunsetWolf SunsetWolf added enhancement New feature or request and removed waiting for triage Cannot auto-triage, wait for triage. labels May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants