-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Fix lesson incrementing #4279
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
Fix lesson incrementing #4279
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.
Great catch !
I think we should even assert that the last lesson always has a None completion_criteria in this method
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.
Looks good and seconded Vince's comment
Can you add a unit test that would have caught this before (or if you add the validation to completion_criteria, test that it fails)? You might need to merge master to get the yamato tests passing again. Let me know if they're still failing after that and I'll take a look. |
@vincentpierre Makes sense. The question is then how to handle this. My preference would be to just throw a warning and ignore the completion criteria of the last lesson, rather than throwing an error. |
I agree. |
Added a warning and a test to catch the user error originally reported. |
RunOptions.from_dict( | ||
yaml.safe_load(test_bad_curriculum_all_competion_criteria_config_yaml) | ||
) | ||
|
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.
Not a must do for this PR, but to make sure your change worked, can you make a bunch of calls to param_manager.update_lessons
to make sure it does not raise an error. (the error you fixed line 134 of environment_parameter_manager.py)
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.
Added an explicit test for this.
…echnologies/ml-agents into develop-fix-lesson-check
Proposed change(s)
Fix issue with curriculum attempting to increment lesson even when there are no more lessons.
[Todo] I haven't added an additional test for this. I might need some help from someone more familiar with the curriculum codebase.
Useful links (Github issues, JIRA tickets, ML-Agents forum threads etc.)
Types of change(s)
Checklist
Other comments