Skip to content

Commit a5d8477

Browse files
committed
feat: HF model validation runs in dry-run too, not just submit
1 parent b1c7a56 commit a5d8477

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

src/srtctl/cli/submit.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,16 @@ def submit_with_orchestrator(
361361
runtime_config_filename=runtime_config_filename,
362362
)
363363

364+
# Identity validation (inline, <1s) — runs for both dry-run and submit
365+
if hasattr(config, "identity") and config.identity and config.identity.model and config.identity.model.repo:
366+
from srtctl.core.validation import validate_hf_model
367+
368+
hf_result = validate_hf_model(config.identity.model.repo, config.identity.model.revision)
369+
if hf_result.ok:
370+
console.print(f"[green]✓[/] HF model: {hf_result.message}")
371+
else:
372+
console.print(f"[yellow]⚠ HF model: {hf_result.message}[/]")
373+
364374
if dry_run:
365375
console.print()
366376
console.print(
@@ -391,16 +401,6 @@ def submit_with_orchestrator(
391401
f.write(script_content)
392402
os.chmod(script_path, 0o755)
393403

394-
# Pre-submit identity validation (inline, <1s)
395-
if hasattr(config, "identity") and config.identity and config.identity.model and config.identity.model.repo:
396-
from srtctl.core.validation import validate_hf_model
397-
398-
hf_result = validate_hf_model(config.identity.model.repo, config.identity.model.revision)
399-
if hf_result.ok:
400-
console.print(f"[green]✓[/] HF model: {hf_result.message}")
401-
else:
402-
console.print(f"[yellow]⚠ HF model: {hf_result.message}[/]")
403-
404404
console.print(f"[bold cyan]🚀 Submitting:[/] {config.name}")
405405
logging.debug(f"Script: {script_path}")
406406

0 commit comments

Comments
 (0)