Open
Conversation
bruno-f-cruz
requested changes
Feb 27, 2026
Member
bruno-f-cruz
left a comment
There was a problem hiding this comment.
A few comments, otherwise the pattern looks really clean!
I would ask someone from DF to review the unittests just in case they want to make sure all edge cases are captured.
src/aind_behavior_dynamic_foraging/task_logic/trial_generators/warmup_trial_generator.py
Outdated
Show resolved
Hide resolved
src/aind_behavior_dynamic_foraging/task_logic/trial_generators/warmup_trial_generator.py
Outdated
Show resolved
Hide resolved
src/aind_behavior_dynamic_foraging/task_logic/trial_generators/warmup_trial_generator.py
Outdated
Show resolved
Hide resolved
src/aind_behavior_dynamic_foraging/task_logic/trial_generators/warmup_trial_generator.py
Outdated
Show resolved
Hide resolved
src/aind_behavior_dynamic_foraging/task_logic/trial_generators/warmup_trial_generator.py
Outdated
Show resolved
Hide resolved
src/aind_behavior_dynamic_foraging/task_logic/trial_generators/warmup_trial_generator.py
Show resolved
Hide resolved
bruno-f-cruz
requested changes
Feb 28, 2026
src/aind_behavior_dynamic_foraging/task_logic/trial_generators/block_based_trial_generator.py
Outdated
Show resolved
Hide resolved
src/aind_behavior_dynamic_foraging/task_logic/trial_generators/block_based_trial_generator.py
Outdated
Show resolved
Hide resolved
src/aind_behavior_dynamic_foraging/task_logic/trial_generators/block_based_trial_generator.py
Outdated
Show resolved
Hide resolved
src/aind_behavior_dynamic_foraging/task_logic/trial_generators/block_based_trial_generator.py
Show resolved
Hide resolved
src/aind_behavior_dynamic_foraging/task_logic/trial_generators/warmup_trial_generator.py
Outdated
Show resolved
Hide resolved
bruno-f-cruz
requested changes
Mar 9, 2026
| }, | ||
| "description": "Parameters defining the reward probability structure." | ||
| "description": "Parameters defining the reward probability structure.", | ||
| "validate_defaults": true |
Member
There was a problem hiding this comment.
This is weird... should not have propagated to the schema
| default=RewardProbabilityParameters(), description="Parameters defining the reward probability structure." | ||
| default=RewardProbabilityParameters(), | ||
| description="Parameters defining the reward probability structure.", | ||
| validate_defaults=True, |
Member
There was a problem hiding this comment.
typo here, it is validate_default thats why it gets added to the schema
| if outcome.is_right_choice: | ||
| logger.debug("Resesting right bait.") | ||
| self.is_right_baited = False | ||
| elif not outcome.is_right_choice: |
Member
There was a problem hiding this comment.
is_right_choice is nullable. You should guard against that since
elif not outcome.is_right_choice: evaluates to true if null i believe due to python falsy rules
| self.generator.update(make_outcome(is_right_choice=True, is_rewarded=True)) | ||
| self.assertEqual(len(self.generator.block_history), initial_history_len + 1) | ||
|
|
||
| def test_bait_resets_on_right_choice(self): |
Member
There was a problem hiding this comment.
You should test against null choice too during updates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Warmup generator
resolves #32