Conversation
|
@micahwoodard I made a release with the implementation of the distributions here https://github.com/AllenNeuralDynamics/Aind.Behavior.Services/releases/tag/v0.13.1 |
bruno-f-cruz
left a comment
There was a problem hiding this comment.
First pass but I think we need to iterate a bit.
A lot of fields are missing descriptions. Remember descriptions in these pydantic models are important since we can use them later to automatically provide docs in Bonsai, UIs, schemas, data, etc...
|
|
||
| class RewardProbabilityParameters(BaseModel): | ||
| base_reward_sum: float = Field(default=0.8, title="Sum of p_reward") | ||
| family: int = Field(default=1, title="Reward family") |
There was a problem hiding this comment.
what is a reward family and why is it "1"?
| class RewardProbabilityParameters(BaseModel): | ||
| base_reward_sum: float = Field(default=0.8, title="Sum of p_reward") | ||
| family: int = Field(default=1, title="Reward family") | ||
| pairs_n: int = Field(default=1, title="Number of pairs") |
There was a problem hiding this comment.
Can we leverage the description field in Field(...) to add a little bit more information about what these parameters are? We can leverage this in multiple places later so it is important to be clear with these schemas!
|
|
||
|
|
||
| class Block(BaseModel): | ||
| right_reward_prob: float |
There was a problem hiding this comment.
Add:
- Validation (e.g: min and max)
- Try to always use the same way to refer to the same concept. Sometimes probability is "p", sometimes "prob"
- Add description to these fields too
| inter_trial_interval_duration=iti, | ||
| ) | ||
|
|
||
| def are_end_conditions_met(self) -> bool: |
There was a problem hiding this comment.
This seems empty? is this supposed to be an abstract method? Is this an abstract class?
Consider making this method private using _.
| Check if end conditions are met to stop session | ||
| """ | ||
|
|
||
| def generate_next_block( |
There was a problem hiding this comment.
Consider making this a private method since it should never be called from outside the class if i understand correctly
| ) -> Block: | ||
| """ | ||
| Generate the next block for a block based task. | ||
|
|
There was a problem hiding this comment.
The pyproject specifies google doc style. This looks like sphinx. Can you refactor to make sure everything is homogeneous?
|
|
||
| dependencies = [ | ||
| "aind_behavior_services<0.14", | ||
| "aind_behavior_services@ git+https://github.com/AllenNeuralDynamics/Aind.Behavior.Services.git@v0.13.2rc1", |
There was a problem hiding this comment.
| "aind_behavior_services@ git+https://github.com/AllenNeuralDynamics/Aind.Behavior.Services.git@v0.13.2rc1", | |
| "aind_behavior_services>=0.13.2", |
No description provided.