[Autotuner] WIP: CLI refactor #3171
Draft
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.
This pull request introduces significant changes to the AutoTuner CLI, enhancing its usability and modularity. The most notable updates include the addition of YAML-based configuration file support, the refactoring of argument parsing into a dedicated
cli
module, and updates to documentation to reflect these improvements. These changes aim to simplify user workflows, improve reproducibility, and modernize the codebase.Enhancements to CLI Usability:
tools/AutoTuner/cli.yaml
,docs/user/CLIGuideAutotuner.md
) [1] [2]docs/user/CLIGuideAutotuner.md
,docs/user/InstructionsForAutoTuner.md
) [1] [2] [3]Codebase Refactoring:
cli.py
module, leveragingjsonargparse
for better type validation and modularity. This replaces the previous ad-hoc argument parsing indistributed.py
. (tools/AutoTuner/src/autotuner/cli.py
,tools/AutoTuner/src/autotuner/distributed.py
) [1] [2] [3]distributed.py
and updated it to use the newparse_arguments
function from thecli
module. (tools/AutoTuner/src/autotuner/distributed.py
) [1] [2]Dependency Updates:
jsonargparse
torequirements.txt
to support the new argument parsing functionality. (tools/AutoTuner/requirements.txt
)Minor Adjustments:
tools/AutoTuner/test/ref_file_check.py
,tools/AutoTuner/src/autotuner/utils.py
) [1] [2]distributed.py
with the new syntax. (tools/AutoTuner/src/autotuner/distributed.py
)These changes collectively improve the user experience, streamline the codebase, and set the foundation for future enhancements.