-
Notifications
You must be signed in to change notification settings - Fork 327
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
[BugFix] QValue modules and nested action #1351
Conversation
Signed-off-by: Matteo Bettini <matbet@meta.com>
if "action" in spec_keys: | ||
_key = "action" | ||
else: | ||
# the first key is the action |
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.
If we do not find an action entry, we pick the first leaf (as done in EnvBase to get an action_key)
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.
Do you think it makes sense? Do we want to be more restrictive?
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.
We could only accept key that end with "action" as leaf.
up to you, i maybe slightly prefer the current version
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.
I have modified it so that it will look for a leaf "action" key
spec_keys = action_space.keys(True, True) | ||
if "action" in spec_keys: | ||
_key = "action" | ||
else: |
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.
ditto
So @vmoens I have a proposition here. This all business of allowing both What about having If so a user which wants to pass a str can pass it to Currently we allow to feed a spec to either |
We can make the change but unfortunately as of now I'm not open to bc breaking changes without warning, ie if we do that we must ensure that users will only see a warning until 0.3 (since this will be in 0.2). |
Sure, I can put the warning |
Signed-off-by: Matteo Bettini <matbet@meta.com>
949340c
to
2a196fd
Compare
Signed-off-by: Matteo Bettini <matbet@meta.com>
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.
LGTM only some minor comments
if "action" in spec_keys: | ||
_key = "action" | ||
else: | ||
# the first key is the action |
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.
Do you think it makes sense? Do we want to be more restrictive?
Signed-off-by: Matteo Bettini <matbet@meta.com>
Signed-off-by: Matteo Bettini <matbet@meta.com>
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.
LGTM good to merge
Fixes #1273