|
28 | 28 | from .cli_commands.logs import logs_command |
29 | 29 | from .cli_commands.preview import preview_command |
30 | 30 | from .cli_commands.run_eval_cmd import hydra_cli_entry_point |
| 31 | +from .cli_commands.upload import upload_command |
31 | 32 |
|
32 | 33 |
|
33 | 34 | def parse_args(args=None): |
@@ -291,6 +292,44 @@ def parse_args(args=None): |
291 | 292 | logs_parser = subparsers.add_parser("logs", help="Serve logs with file watching and real-time updates") |
292 | 293 | logs_parser.add_argument("--port", type=int, default=8000, help="Port to bind to (default: 8000)") |
293 | 294 |
|
| 295 | + # Upload command |
| 296 | + upload_parser = subparsers.add_parser( |
| 297 | + "upload", |
| 298 | + help="Scan for evaluation tests, select, and upload as Fireworks evaluators", |
| 299 | + ) |
| 300 | + upload_parser.add_argument( |
| 301 | + "--path", |
| 302 | + default=".", |
| 303 | + help="Path to search for evaluation tests (default: current directory)", |
| 304 | + ) |
| 305 | + upload_parser.add_argument( |
| 306 | + "--entry", |
| 307 | + help="Entrypoint of evaluation test to upload (module:function or path::function). For multiple, separate by commas.", |
| 308 | + ) |
| 309 | + upload_parser.add_argument( |
| 310 | + "--id", |
| 311 | + help="Evaluator ID to use (if multiple selections, a numeric suffix is appended)", |
| 312 | + ) |
| 313 | + upload_parser.add_argument( |
| 314 | + "--display-name", |
| 315 | + help="Display name for evaluator (defaults to ID)", |
| 316 | + ) |
| 317 | + upload_parser.add_argument( |
| 318 | + "--description", |
| 319 | + help="Description for evaluator", |
| 320 | + ) |
| 321 | + upload_parser.add_argument( |
| 322 | + "--force", |
| 323 | + action="store_true", |
| 324 | + help="Overwrite existing evaluator with the same ID", |
| 325 | + ) |
| 326 | + upload_parser.add_argument( |
| 327 | + "--yes", |
| 328 | + "-y", |
| 329 | + action="store_true", |
| 330 | + help="Non-interactive: upload all discovered evaluation tests", |
| 331 | + ) |
| 332 | + |
294 | 333 | # Run command (for Hydra-based evaluations) |
295 | 334 | # This subparser intentionally defines no arguments itself. |
296 | 335 | # All arguments after 'run' will be passed to Hydra by parse_known_args. |
@@ -346,6 +385,8 @@ def main(): |
346 | 385 | return agent_eval_command(args) |
347 | 386 | elif args.command == "logs": |
348 | 387 | return logs_command(args) |
| 388 | + elif args.command == "upload": |
| 389 | + return upload_command(args) |
349 | 390 | elif args.command == "run": |
350 | 391 | # For the 'run' command, Hydra takes over argument parsing. |
351 | 392 |
|
|
0 commit comments