Fixes Issue #533 - Fix tuner dropping the first CLI argument.#536
Open
hliu-ai wants to merge 1 commit into
Open
Fixes Issue #533 - Fix tuner dropping the first CLI argument.#536hliu-ai wants to merge 1 commit into
hliu-ai wants to merge 1 commit into
Conversation
|
@hliu-ai is attempting to deploy a commit to the Costa Huang's projects Team on Vercel. A member of the Team first needs to authorize it. |
Author
|
This is my very first ever PR so hopefully everything was done right! I'll continue looking for issues that I am capable of working on and keep learning. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #533.
cleanrl_utils/tuner.py constructed sys.argv as a flags-only list, so the first tuned flag landed in
sys.argv[0]. When runpy executes the target script, Python setssys.argv[0]to the script path, overwriting whatever argument was placed there. This had the effect of erroneously holding the first tuned hyperparameter at its default value instead of what was desired across trials.This change preserves
sys.argv[0]and appends the constructed flags:sys.argv = [sys.argv[0]] + algo_command + [...]Verification:
Types of changes
Checklist:
pre-commit run --all-filespasses (required).mkdocs serve.If you need to run benchmark experiments for a performance-impacting changes:
--capture_video.python -m openrlbenchmark.rlops.python -m openrlbenchmark.rlopsutility to the documentation.python -m openrlbenchmark.rlops ....your_args... --report, to the documentation.