-
Notifications
You must be signed in to change notification settings - Fork 4
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
AddingAindBehaviorTaskLogicModel #1223
base: develop
Are you sure you want to change the base?
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.
This looks good to me!
I'm going to change the imports to pull from the Aind.Behavior.DynamicForaging repo. Will request review then but should really only be the import that changes as well as the pyproject.toml |
src/foraging_gui/Foraging.py
Outdated
@@ -243,6 +254,233 @@ def __init__(self, parent=None,box_number=1,start_bonsai_ide=True): | |||
self._ReconnectBonsai() | |||
logging.info('Start up complete') | |||
|
|||
def initialize_task_parameters(self) -> DynamicForagingParas: |
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.
Can we move this part to a separate python file? Foraging.py is already quite large. And this part is relatively independent. The idea is to make AindBehaviorTaskLogicModel relatively independent and modular.
It seems that the current modification logic is like this:
What is the entire logic and purpose here in terms of step 1 and step 2? How is this related to the curriculum? |
I don't think this is ready to merge. I prematurely thought this is what it would look like but I think this will change as I figure out how the curriculum works with this |
For number 1, the intent was so changes in gui would be reflected in the task logic. Number 2 makes it so we are not using the gui state as a reference of how the task was run but rather a defined schema. For how this is related to curriculum, the stages in the curriculum require a task logic model. We can adopt some of Bruno's architecture hare and leverage it in the curriculum. |
Can we create a task logic model at the end of the session? Here the step 2 is circular. For curriculum, we only need a to set the parameters? Just like what we are doing now. |
This would be a great discussion to loop @alexpiet and @hanhou into. The task parameters (same ones we are putting in the task logic model) are part of the Stage class in the aind-behavior-curriculum. In my mind, when a mouse is loaded, the gui will query slims for the trainer state of this mouse. The trainer state will include the stage of this mouse, and therefore the task parameters for the session. We can use the stage task parameters to update the task logic model and this is what the gui will use to set up and run the session. If a mouse is loaded in, that will disable the task parameter widgets so mice are limited to the session outlined in slims. Integrating the task logic model and using it to run a session rather than the widgets will make it easier to use the trainer state from slims and also provides better documentation on how the session was run. That is the workflow and benefits as I see them. If we're not all on the same page, let me know and I can update my approach |
Yes, thats right @micahwoodard. The task parameters will already be determined at the start of the session by the curriculum, so we should make the task model at the start of the session. |
Agreed. |
" We can use the stage task parameters to update the task logic model and this is what the gui will use to set up and run the session." Why do we need to use the stage task parameters to update the task logic model and then update the GUI parameters instead of updating the GUI parameters directly? |
Okay this is ready for rereview using external task logic repo, using pythonic naming conventions, and replacing widgets and TP parameters with task logic. I also changed the LineEdits to Spinboxes when applicable to simplify logic |
Pull Request instructions:
Describe changes:
What issues or discussions does this update address?
Describe the expected change in behavior from the perspective of the experimenter
Describe any manual update steps for task computers
Was this update tested in 446/447?