Aksel Joonas Reedi commited on
Commit
a8796d4
·
2 Parent(s): e74a635d3ffa60

Merge branch 'main' into feature/web-frontend

Browse files
Files changed (1) hide show
  1. agent/tools/jobs_tool.py +9 -7
agent/tools/jobs_tool.py CHANGED
@@ -875,20 +875,22 @@ To inspect, call this tool with `{{"operation": "scheduled inspect", "scheduled_
875
  HF_JOBS_TOOL_SPEC = {
876
  "name": "hf_jobs",
877
  "description": (
878
- "Execute Python scripts or Docker containers on HF cloud infrastructure (CPUs/GPUs). "
 
 
 
 
 
 
 
879
  "⚠️ CRITICAL for reliability: (1) Jobs run ASYNC - provide monitoring URL immediately, don't poll; "
880
  "(2) Set timeout >30min (default too short - training needs 2-8h); "
881
- "(3) HF_TOKEN auto-loaded to secrets for Hub ops (push_to_hub, private repos);"
882
  "(4) Job storage EPHEMERAL - MUST push_to_hub() or ALL work is LOST. "
883
  "**Use when:** User wants cloud compute, training models, data processing, batch inference, GPU workloads, scheduled tasks. "
884
  "ALWAYS use this tool (✓), never bash 'hf jobs' commands (✗). Pass script content inline (✓), don't save to files unless requested (✗). "
885
  "\n\n"
886
  "**Operations:** run, ps, logs, inspect, cancel, scheduled run, scheduled ps, scheduled inspect, scheduled delete, scheduled suspend, scheduled resume. "
887
- "\n\n"
888
- "**Two Modes:**\n"
889
- "1. Python mode: 'script' + 'dependencies' (UV with PEP 723 recommended for inline deps)\n"
890
- "2. Docker mode: 'image' + 'command' (full environment control)\n"
891
- "(script and command are mutually exclusive)\n\n"
892
  "**Available Hardware (vCPU/RAM/GPU):**\n"
893
  f"• CPU: {CPU_FLAVORS_DESC}\n"
894
  f"• GPU: {GPU_FLAVORS_DESC}\n"
 
875
  HF_JOBS_TOOL_SPEC = {
876
  "name": "hf_jobs",
877
  "description": (
878
+ "Execute Python scripts or Docker containers on HF cloud infrastructure (CPUs/GPUs) in one of two modes. "
879
+ "\n\n"
880
+ "**Two Modes (mutually exclusive):**\n"
881
+ "1. Python mode: using 'script' arg (REQUIRED) + 'dependencies'\n"
882
+ "2. Docker mode: using 'command' arg (REQUIRED) + 'image'\n\n"
883
+ "🚨 **REQUIRED:** You MUST provide exactly ONE of: 'script' (Python code as string) OR 'command' (Docker command as array). "
884
+ "They are mutually exclusive - provide one or the other, never both, never neither. "
885
+ "Do NOT call with just {'operation': 'run'} - always include your code. Example: {'operation': 'run', 'script': 'import torch; print(torch.cuda.is_available())', 'dependencies': ['torch']} or {'operation': 'run', 'command': ['duckdb', '-c', 'select 1 + 2']', 'image': 'duckdb/duckdb'}\n\n"
886
  "⚠️ CRITICAL for reliability: (1) Jobs run ASYNC - provide monitoring URL immediately, don't poll; "
887
  "(2) Set timeout >30min (default too short - training needs 2-8h); "
888
+ "(3) HF_TOKEN auto-loaded to secrets for Hub ops (push_to_hub, private repos); "
889
  "(4) Job storage EPHEMERAL - MUST push_to_hub() or ALL work is LOST. "
890
  "**Use when:** User wants cloud compute, training models, data processing, batch inference, GPU workloads, scheduled tasks. "
891
  "ALWAYS use this tool (✓), never bash 'hf jobs' commands (✗). Pass script content inline (✓), don't save to files unless requested (✗). "
892
  "\n\n"
893
  "**Operations:** run, ps, logs, inspect, cancel, scheduled run, scheduled ps, scheduled inspect, scheduled delete, scheduled suspend, scheduled resume. "
 
 
 
 
 
894
  "**Available Hardware (vCPU/RAM/GPU):**\n"
895
  f"• CPU: {CPU_FLAVORS_DESC}\n"
896
  f"• GPU: {GPU_FLAVORS_DESC}\n"