Skip to content

Commit c4108ba

Browse files
committed
Merge branch 'main' into derekx/reduce-import-time
2 parents 78d0cdb + 33185d7 commit c4108ba

File tree

5 files changed

+579
-0
lines changed

5 files changed

+579
-0
lines changed

eval_protocol/cli.py

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
from .cli_commands.logs import logs_command
2929
from .cli_commands.preview import preview_command
3030
from .cli_commands.run_eval_cmd import hydra_cli_entry_point
31+
from .cli_commands.upload import upload_command
3132

3233

3334
def parse_args(args=None):
@@ -291,6 +292,44 @@ def parse_args(args=None):
291292
logs_parser = subparsers.add_parser("logs", help="Serve logs with file watching and real-time updates")
292293
logs_parser.add_argument("--port", type=int, default=8000, help="Port to bind to (default: 8000)")
293294

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+
294333
# Run command (for Hydra-based evaluations)
295334
# This subparser intentionally defines no arguments itself.
296335
# All arguments after 'run' will be passed to Hydra by parse_known_args.
@@ -346,6 +385,8 @@ def main():
346385
return agent_eval_command(args)
347386
elif args.command == "logs":
348387
return logs_command(args)
388+
elif args.command == "upload":
389+
return upload_command(args)
349390
elif args.command == "run":
350391
# For the 'run' command, Hydra takes over argument parsing.
351392

0 commit comments

Comments
 (0)