Skip to content

Commit b1c7a56

Browse files
committed
feat: inline HF model validation at submit time (replaces dead background thread)
Single HTTP HEAD to huggingface.co/api/models/{repo} before sbatch. Shows green checkmark or yellow warning. Takes <1s, never blocks on failure.
1 parent ddf30ef commit b1c7a56

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/srtctl/cli/submit.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,16 @@ def submit_with_orchestrator(
391391
f.write(script_content)
392392
os.chmod(script_path, 0o755)
393393

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+
394404
console.print(f"[bold cyan]🚀 Submitting:[/] {config.name}")
395405
logging.debug(f"Script: {script_path}")
396406

0 commit comments

Comments
 (0)