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:
Vijay Janapa Reddi
2025-10-19 12:50:59 -04:00
parent 6e789d5662
commit 01bb20f235

View File

@@ -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")