Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion agent/prompts/system_prompt_v3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ system_prompt: |
report_to="trackio"
run_name="<descriptive-run-name>" # e.g. "sft_qwen3-4b_lr2e-5_bs128"
project="<descriptive-project-name>" # keeps related runs grouped so you can compare them
trackio_space_id="<username>/mlintern-<8-char-id>" # creates a public dashboard Space
trackio_space_id="<username>/ml-intern-<8-char-id>" # creates a public dashboard Space
`project` and `trackio_space_id` can also be set via TRACKIO_PROJECT / TRACKIO_SPACE_ID env vars.

Alerts are how iterations decide what to change. Use trackio.alert(title, text, level) at every decision point in training. Levels:
Expand Down
4 changes: 2 additions & 2 deletions agent/tools/jobs_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,7 @@ async def _resume_scheduled_job(self, args: Dict[str, Any]) -> ToolResult:
"Job storage is EPHEMERAL — all files are deleted when the job ends. Without push_to_hub, trained models are lost permanently.\n"
"- Include trackio monitoring and provide the dashboard URL to the user. "
"When the script uses report_to='trackio', also pass `trackio_space_id` "
"(e.g. '<username>/mlintern-<8char>') and `trackio_project` as tool args — "
"(e.g. '<username>/ml-intern-<8char>') and `trackio_project` as tool args — "
"they are injected as TRACKIO_SPACE_ID/TRACKIO_PROJECT env vars and let the UI embed the live dashboard.\n\n"
"BATCH/ABLATION JOBS: Submit ONE job first. Check logs to confirm it starts training successfully. "
"Only then submit the remaining jobs. Never submit all at once — if there's a bug, all jobs fail.\n\n"
Expand Down Expand Up @@ -1204,7 +1204,7 @@ async def _resume_scheduled_job(self, args: Dict[str, Any]) -> ToolResult:
"type": "string",
"description": (
"Optional. The HF Space hosting the trackio dashboard for this run "
"(e.g. '<username>/mlintern-<8char>', under YOUR HF namespace). "
"(e.g. '<username>/ml-intern-<8char>', under YOUR HF namespace). "
"Injected as TRACKIO_SPACE_ID env var and used by the UI to embed "
"the live dashboard. Set this whenever the script uses "
"report_to='trackio'. The Space is auto-created and seeded with the "
Expand Down
4 changes: 2 additions & 2 deletions agent/tools/sandbox_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ async def teardown_session_sandbox(session: Any) -> None:
"Common picks: t4-small (16GB VRAM, fits ≤1-3B), a10g-small (24GB, ≤7B), a100-large (80GB, ≤30B). "
"If the model won't fit, pick larger hardware upfront — OOM on a sandbox wastes time.\n\n"
"If you intend to run a training script in this sandbox that uses report_to='trackio', "
"pass `trackio_space_id` (e.g. '<username>/mlintern-<8char>') and `trackio_project` so they "
"pass `trackio_space_id` (e.g. '<username>/ml-intern-<8char>') and `trackio_project` so they "
"are set as TRACKIO_SPACE_ID/TRACKIO_PROJECT secrets in the sandbox and the UI can embed the live dashboard.\n\n"
"Hardware: " + ", ".join([e.value for e in SpaceHardware]) + ".\n"
),
Expand All @@ -563,7 +563,7 @@ async def teardown_session_sandbox(session: Any) -> None:
"type": "string",
"description": (
"Optional. The HF Space hosting the trackio dashboard for runs in this sandbox "
"(e.g. '<username>/mlintern-<8char>', under YOUR HF namespace). Injected as "
"(e.g. '<username>/ml-intern-<8char>', under YOUR HF namespace). Injected as "
"TRACKIO_SPACE_ID secret and surfaced to the UI. The Space is auto-created and "
"seeded with the trackio dashboard — DO NOT pre-create it via hf_repo_git, "
"that produces an empty Space that breaks the embed."
Expand Down
16 changes: 16 additions & 0 deletions tests/unit/test_trackio_space_ids.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import json
from pathlib import Path

from agent.tools.jobs_tool import HF_JOBS_TOOL_SPEC
from agent.tools.sandbox_tool import SANDBOX_CREATE_TOOL_SPEC


def test_trackio_space_examples_use_hyphenated_ml_intern_prefix():
prompt = Path("agent/prompts/system_prompt_v3.yaml").read_text()
tool_specs = json.dumps([HF_JOBS_TOOL_SPEC, SANDBOX_CREATE_TOOL_SPEC])
legacy_prefix = "ml" + "intern"

assert "<username>/ml-intern-<8-char-id>" in prompt
assert "<username>/ml-intern-<8char>" in tool_specs
assert legacy_prefix not in prompt
assert legacy_prefix not in tool_specs
Loading