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

Error when using stochastic mode action sampling in case that num_controls[f] = 1 #86

Closed
conorheins opened this issue Jul 13, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@conorheins
Copy link
Collaborator

conorheins commented Jul 13, 2022

Bug found by @SamGijsen:

Running "stochastic" action selection throws an error when using the current version. I believe it's because actions are sampled even if num_controls=1, in which case utils.sample() attempts to squeeze an array of size 1. Reverting to deterministic selection if num_controls==1 has fixed this for me.
(control.sample_action() line 565 if action_selection == 'deterministic' or num_controls[factor_i]==1:) Happy to submit a PR if that's useful, otherwise I believe it's just this line of code.

Originally posted by @SamGijsen in #82 (comment)

@conorheins conorheins added the bug Something isn't working label Jul 13, 2022
@conorheins conorheins self-assigned this Jul 27, 2022
conorheins added a commit that referenced this issue Jul 27, 2022
Fix action sampling bug when there's a uni-dimensional control state (to address Issue #86)
@conorheins
Copy link
Collaborator Author

This has now been fixed, please see #90

Will close upon release of 0.0.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant