Skip to content

Commit f996d5b

Browse files
committed
added --force
1 parent 9303a22 commit f996d5b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

eval_protocol/cli.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,7 @@ def parse_args(args=None):
425425
rft_parser.add_argument("--rft-job-id", help="Specify an explicit RFT job id")
426426
rft_parser.add_argument("--yes", "-y", action="store_true", help="Non-interactive mode")
427427
rft_parser.add_argument("--dry-run", action="store_true", help="Print planned REST calls without sending")
428+
rft_parser.add_argument("--force", action="store_true", help="Overwrite existing evaluator with the same ID")
428429

429430
# Run command (for Hydra-based evaluations)
430431
# This subparser intentionally defines no arguments itself.

eval_protocol/cli_commands/create_rft.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ def create_rft_command(args) -> int:
331331
evaluator_id: Optional[str] = getattr(args, "evaluator_id", None)
332332
non_interactive: bool = bool(getattr(args, "yes", False))
333333
dry_run: bool = bool(getattr(args, "dry_run", False))
334+
force: bool = bool(getattr(args, "force", False))
334335

335336
api_key = get_fireworks_api_key()
336337
if not api_key:
@@ -390,10 +391,14 @@ def create_rft_command(args) -> int:
390391
id=evaluator_id,
391392
display_name=None,
392393
description=None,
393-
force=False,
394+
force=force, # Pass through the --force flag
394395
yes=True,
395396
env_file=None, # Add the new env_file parameter
396397
)
398+
399+
if force:
400+
print(f"🔄 Force flag enabled - will overwrite existing evaluator '{evaluator_id}'")
401+
397402
rc = upload_command(upload_args)
398403
if rc == 0:
399404
print(f"✓ Uploaded/ensured evaluator: {evaluator_id}")

0 commit comments

Comments
 (0)