-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
[rllib] cast fcnet_hiddens to list #14308
Conversation
@@ -24,7 +24,7 @@ def __init__(self, obs_space: gym.spaces.Space, | |||
model_config, name) | |||
nn.Module.__init__(self) | |||
|
|||
hiddens = model_config.get("fcnet_hiddens", []) + \ | |||
hiddens = list(model_config.get("fcnet_hiddens", [])) + \ | |||
model_config.get("post_fcnet_hiddens", []) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
model_config.get("post_fcnet_hiddens", []) | |
list(model_config.get("post_fcnet_hiddens", [])) |
, since post_fcnet_hiddens
will be tuple if we use HyperOpt to search its best value (similar to fcnet_hiddens
). (detail in #14304)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix @RaphaelCS and @krfricke .
@sven1977 It seems that my suggestion was not added to the code 😢 |
Probably just an oversight when merging the issue - it's good actually. I created a PR to fix this issue in #14354 - thanks again! |
Ah, thanks a lot! |
Why are these changes needed?
Cast config parameter to list to make sure that list operations work
Related issue number
Closes #14304
Checks
scripts/format.sh
to lint the changes in this PR.