Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Commit ·
d3ffa60
1
Parent(s): f6432d8
hf jobs desc update
Browse files- agent/tools/jobs_tool.py +9 -7
agent/tools/jobs_tool.py
CHANGED
|
@@ -835,20 +835,22 @@ To inspect, call this tool with `{{"operation": "scheduled inspect", "scheduled_
|
|
| 835 |
HF_JOBS_TOOL_SPEC = {
|
| 836 |
"name": "hf_jobs",
|
| 837 |
"description": (
|
| 838 |
-
"Execute Python scripts or Docker containers on HF cloud infrastructure (CPUs/GPUs). "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 839 |
"⚠️ CRITICAL for reliability: (1) Jobs run ASYNC - provide monitoring URL immediately, don't poll; "
|
| 840 |
"(2) Set timeout >30min (default too short - training needs 2-8h); "
|
| 841 |
-
"(3) HF_TOKEN auto-loaded to secrets for Hub ops (push_to_hub, private repos);"
|
| 842 |
"(4) Job storage EPHEMERAL - MUST push_to_hub() or ALL work is LOST. "
|
| 843 |
"**Use when:** User wants cloud compute, training models, data processing, batch inference, GPU workloads, scheduled tasks. "
|
| 844 |
"ALWAYS use this tool (✓), never bash 'hf jobs' commands (✗). Pass script content inline (✓), don't save to files unless requested (✗). "
|
| 845 |
"\n\n"
|
| 846 |
"**Operations:** run, ps, logs, inspect, cancel, scheduled run, scheduled ps, scheduled inspect, scheduled delete, scheduled suspend, scheduled resume. "
|
| 847 |
-
"\n\n"
|
| 848 |
-
"**Two Modes:**\n"
|
| 849 |
-
"1. Python mode: 'script' + 'dependencies' (UV with PEP 723 recommended for inline deps)\n"
|
| 850 |
-
"2. Docker mode: 'image' + 'command' (full environment control)\n"
|
| 851 |
-
"(script and command are mutually exclusive)\n\n"
|
| 852 |
"**Available Hardware (vCPU/RAM/GPU):**\n"
|
| 853 |
f"• CPU: {CPU_FLAVORS_DESC}\n"
|
| 854 |
f"• GPU: {GPU_FLAVORS_DESC}\n"
|
|
|
|
| 835 |
HF_JOBS_TOOL_SPEC = {
|
| 836 |
"name": "hf_jobs",
|
| 837 |
"description": (
|
| 838 |
+
"Execute Python scripts or Docker containers on HF cloud infrastructure (CPUs/GPUs) in one of two modes. "
|
| 839 |
+
"\n\n"
|
| 840 |
+
"**Two Modes (mutually exclusive):**\n"
|
| 841 |
+
"1. Python mode: using 'script' arg (REQUIRED) + 'dependencies'\n"
|
| 842 |
+
"2. Docker mode: using 'command' arg (REQUIRED) + 'image'\n\n"
|
| 843 |
+
"🚨 **REQUIRED:** You MUST provide exactly ONE of: 'script' (Python code as string) OR 'command' (Docker command as array). "
|
| 844 |
+
"They are mutually exclusive - provide one or the other, never both, never neither. "
|
| 845 |
+
"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"
|
| 846 |
"⚠️ CRITICAL for reliability: (1) Jobs run ASYNC - provide monitoring URL immediately, don't poll; "
|
| 847 |
"(2) Set timeout >30min (default too short - training needs 2-8h); "
|
| 848 |
+
"(3) HF_TOKEN auto-loaded to secrets for Hub ops (push_to_hub, private repos); "
|
| 849 |
"(4) Job storage EPHEMERAL - MUST push_to_hub() or ALL work is LOST. "
|
| 850 |
"**Use when:** User wants cloud compute, training models, data processing, batch inference, GPU workloads, scheduled tasks. "
|
| 851 |
"ALWAYS use this tool (✓), never bash 'hf jobs' commands (✗). Pass script content inline (✓), don't save to files unless requested (✗). "
|
| 852 |
"\n\n"
|
| 853 |
"**Operations:** run, ps, logs, inspect, cancel, scheduled run, scheduled ps, scheduled inspect, scheduled delete, scheduled suspend, scheduled resume. "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 854 |
"**Available Hardware (vCPU/RAM/GPU):**\n"
|
| 855 |
f"• CPU: {CPU_FLAVORS_DESC}\n"
|
| 856 |
f"• GPU: {GPU_FLAVORS_DESC}\n"
|