You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Mephisto Operator is the most powerful class in all of Mephisto, in that it does the heavy lifting of launching and running jobs, and configuring the rest of the Mephisto architecture to do what's intended. One painful area of this flow is actually configuring the launch itself.
For context, Mephisto needs to be able to send configuration options forward to the frontend in order for people to be able to launch jobs from there. These configuration options also need to be persisted somehow to ensure that equivalent jobs can be re-launched later. As such there are a number of flows around trying to send required arguments. See Operator.parse_and_launch_run for the full flow that finds and parses these arguments.
The goal is to simplify the process for launching scripts from argument dicts, and to ensure the contents within are saved to the task_run's data directory for reproducibility in the future. (As of now, the TaskConfig handles part of this, but only does so for the parsed string arguments and not those passed additionally by dict).
As a stretch goal, it would be nice to move away from ArgParser dependence, as this has us locked to a few less-than-optimal coding situations (including converting passed dictionaries to string args, re-parsing, initializing an argparser during a critical path, ++).
Requirements
Create parse_arguments_and_launch_run and launch_run_from_argument_dict methods in Operator, which act as wrappers around the basic parse_and_launch_run function. This refactor will involve sharing some code between the two methods (with the former following essentially the same code flow as parse_and_launch_run has now). The big question to solve is how to properly handle ensuring both methods pass through the same assert_args flow when the version from the dict doesn't run through the argparser.
Update examples to use the launch_run_from_argument_dict method.
Add and wire missing arguments.
Write documentation on parse_arguments_and_launch_run.
Wishlist
Create a new class (potentially extending ArgumentParser) that handles the process of registering arguments, being able to display registered arguments, showing default values, etc. See argparse_parser.py for our existing solution.
The text was updated successfully, but these errors were encountered:
Summary
The Mephisto
Operator
is the most powerful class in all of Mephisto, in that it does the heavy lifting of launching and running jobs, and configuring the rest of the Mephisto architecture to do what's intended. One painful area of this flow is actually configuring the launch itself.For context, Mephisto needs to be able to send configuration options forward to the frontend in order for people to be able to launch jobs from there. These configuration options also need to be persisted somehow to ensure that equivalent jobs can be re-launched later. As such there are a number of flows around trying to send required arguments. See
Operator.parse_and_launch_run
for the full flow that finds and parses these arguments.The goal is to simplify the process for launching scripts from argument dicts, and to ensure the contents within are saved to the task_run's data directory for reproducibility in the future. (As of now, the
TaskConfig
handles part of this, but only does so for the parsed string arguments and not those passed additionally by dict).As a stretch goal, it would be nice to move away from
ArgParser
dependence, as this has us locked to a few less-than-optimal coding situations (including converting passed dictionaries to string args, re-parsing, initializing an argparser during a critical path, ++).Requirements
parse_arguments_and_launch_run
andlaunch_run_from_argument_dict
methods inOperator
, which act as wrappers around the basicparse_and_launch_run
function. This refactor will involve sharing some code between the two methods (with the former following essentially the same code flow asparse_and_launch_run
has now). The big question to solve is how to properly handle ensuring both methods pass through the sameassert_args
flow when the version from the dict doesn't run through the argparser.launch_run_from_argument_dict
method.parse_arguments_and_launch_run
.Wishlist
ArgumentParser
) that handles the process of registering arguments, being able to display registered arguments, showing default values, etc. Seeargparse_parser.py
for our existing solution.The text was updated successfully, but these errors were encountered: