mirror of
https://github.com/MLSysBook/TinyTorch.git
synced 2026-06-04 04:45:50 -05:00
fix: Remove mutually exclusive group from export command
- Positional arguments cannot be in mutually exclusive groups in argparse - Keep modules as positional argument, --all as optional flag - Fixes CLI initialization error in GitHub Actions
This commit is contained in:
@@ -54,9 +54,8 @@ class ExportCommand(BaseCommand):
|
||||
return "Export notebook code to Python package"
|
||||
|
||||
def add_arguments(self, parser: ArgumentParser) -> None:
|
||||
group = parser.add_mutually_exclusive_group(required=False)
|
||||
group.add_argument("modules", nargs="*", help="Export specific modules (e.g., 01_tensor 02_activations)")
|
||||
group.add_argument("--all", action="store_true", help="Export all modules")
|
||||
parser.add_argument("modules", nargs="*", help="Export specific modules (e.g., 01_tensor 02_activations)")
|
||||
parser.add_argument("--all", action="store_true", help="Export all modules")
|
||||
parser.add_argument("--from-release", action="store_true", help="Export from release directory (student version) instead of source")
|
||||
parser.add_argument("--test-checkpoint", action="store_true", help="Run checkpoint test after successful export")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user