Skip to content

adds warmup trial generator#39

Open
micahwoodard wants to merge 16 commits intomainfrom
feat-warmup-generator
Open

adds warmup trial generator#39
micahwoodard wants to merge 16 commits intomainfrom
feat-warmup-generator

Conversation

@micahwoodard
Copy link
Collaborator

@micahwoodard micahwoodard commented Feb 27, 2026

Warmup generator

resolves #32

Copy link
Member

@bruno-f-cruz bruno-f-cruz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Base automatically changed from feat-coupled-trial-generator to main March 6, 2026 19:10
},
"description": "Parameters defining the reward probability structure."
"description": "Parameters defining the reward probability structure.",
"validate_defaults": true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should test against null choice too during updates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants