-
Notifications
You must be signed in to change notification settings - Fork 46
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
[RTR] noise magnitude controled for each decision variable #553
Conversation
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.
Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @Ipuch)
bioptim/limits/path_conditions.py
line 920 at r1 (raw file):
self.seed = seed if not isinstance(noise_magnitude, (int, float)):
Then deintend the rest
Suggestion:
if isinstance(noise_magnitude, (int, float)):
noise_magnitude = (noise_magnitude,)
bioptim/limits/path_conditions.py
line 930 at r1 (raw file):
raise ValueError("noise_magnitude must be a float or list of float of the size of states or controls") self.noise_magnitude = noise_magnitude
This should not possible to be of two different types. If int or float cast it to np.array (see previous)
Code quote:
self.noise_magnitude = noise_magnitude
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.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Ipuch)
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.
Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Ipuch)
bioptim/limits/path_conditions.py
line 928 at r3 (raw file):
noise_magnitude = np.array(noise_magnitude) if noise_magnitude.shape.__len__() == 1:
Do not use .__len__()
but call the len(xxx) function instead
Since all these if
deal with noise_magnitude_validation, can you remove the spacing between them (or create a validate_noise_magnitude method)
Code quote:
noise_magnitude.shape.__len__()
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.
Reviewed 1 of 1 files at r4, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Ipuch)
@rapidnico your PR will follow #560 |
All Submissions:
New Feature Submissions:
black . -l120 --exclude "external/*"
)?Changes to Core Features:
This change is