Skip to content

[Autotuner] WIP: CLI refactor #3171

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

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

luarss
Copy link
Contributor

@luarss luarss commented May 17, 2025

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:

  • Introduced YAML-based configuration file support for AutoTuner, allowing users to specify parameters in a structured and reusable format. This reduces the need for verbose command-line arguments. (tools/AutoTuner/cli.yaml, docs/user/CLIGuideAutotuner.md) [1] [2]
  • Updated documentation to include a guide on using the new configuration-based approach and adjusted example commands to reflect the new CLI syntax. (docs/user/CLIGuideAutotuner.md, docs/user/InstructionsForAutoTuner.md) [1] [2] [3]

Codebase Refactoring:

  • Refactored argument parsing logic into a new cli.py module, leveraging jsonargparse for better type validation and modularity. This replaces the previous ad-hoc argument parsing in distributed.py. (tools/AutoTuner/src/autotuner/cli.py, tools/AutoTuner/src/autotuner/distributed.py) [1] [2] [3]
  • Removed redundant argument parsing code from distributed.py and updated it to use the new parse_arguments function from the cli module. (tools/AutoTuner/src/autotuner/distributed.py) [1] [2]

Dependency Updates:

  • Added jsonargparse to requirements.txt to support the new argument parsing functionality. (tools/AutoTuner/requirements.txt)

Minor Adjustments:

  • Updated test cases and utility functions to align with the new CLI structure. (tools/AutoTuner/test/ref_file_check.py, tools/AutoTuner/src/autotuner/utils.py) [1] [2]
  • Replaced outdated example commands in 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.

luarss added 12 commits May 12, 2025 05:10
Signed-off-by: Jack Luar <jluar@precisioninno.com>
Signed-off-by: Jack Luar <jluar@precisioninno.com>
Signed-off-by: Jack Luar <jluar@precisioninno.com>
Signed-off-by: Jack Luar <jluar@precisioninno.com>
Signed-off-by: Jack Luar <jluar@precisioninno.com>
Signed-off-by: Jack Luar <jluar@precisioninno.com>
Signed-off-by: Jack Luar <jluar@precisioninno.com>
Signed-off-by: Jack Luar <jluar@precisioninno.com>
Signed-off-by: Jack Luar <jluar@precisioninno.com>
Signed-off-by: Jack Luar <jluar@precisioninno.com>
Signed-off-by: Jack Luar <jluar@precisioninno.com>
Signed-off-by: Jack Luar <jluar@precisioninno.com>
@luarss luarss added the autotuner Flow autotuner label May 17, 2025
Signed-off-by: Jack Luar <jluar@precisioninno.com>
@luarss luarss marked this pull request as draft May 17, 2025 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autotuner Flow autotuner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant