tracking-sdk
Use Aim's Python SDK to create local repositories and runs, track metrics/params/media/artifacts/logs, query sequences, and validate SDK instrumentation safely.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- tracking-sdk
- license
- Apache 2.0
- metadata
- { "scope": "sub-skill", "disco-role": "operating", "repo-skill": "aim" }
- description
- Use Aim's Python SDK to create local repositories and runs, track metrics/params/media/artifacts/logs, query sequences, and validate SDK instrumentation safely.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/query-and-data-model.md9.2 KB
- 参考文档references/sdk-api-reference.md11.1 KB
- 参考文档references/tracking-workflows.md7.8 KB
- 参考文档references/troubleshooting.md9.2 KB
- 脚本scripts/aim_sdk_smoke.py13.2 KB
03 SKILL.md 正文
Aim tracking SDK
Use this sub-skill when the task is to instrument Python code with Aim, open or initialize a local Aim repository from Python, create/resume/read runs, track scalar/object sequences, attach run metadata, query tracked data, build dataframes, or diagnose SDK-level missing-data issues.
Route away from this sub-skill when the user asks for:
- CLI command syntax, UI/server startup, remote server operation, storage maintenance, or destructive run management: use
cli-and-services. - Framework callbacks/loggers, optional ML framework integrations, or TensorBoard conversion/sync: use
framework-integrations.
What to read
references/sdk-api-reference.mdforRun,Repo,Sequence,SequenceCollection, object constructors, artifacts, logging, lifecycle, and known signature caveats.references/tracking-workflows.mdfor copyable SDK instrumentation patterns, including train/validation loops with params and media.references/query-and-data-model.mdfor query expressions, contexts, sequence iteration, dataframes, and query edge cases.references/troubleshooting.mdfor missing metrics, type compatibility, temporary-directory cleanup, read-only misuse, system tracking, and validation steps.scripts/aim_sdk_smoke.pyto create a tiny local repo, track scalars/media, query results, exercise dataframe paths when available, and verify the read-only caveat safely.
Operating guardrails
- Prefer explicit repository paths in automation: create or open
Repo.from_path(str(repo_dir), init=True)and pass theRepoobject toRun(repo=repo, ...). - Close
Runobjects and then closeRepoobjects explicitly before deleting temporary directories or ending validation processes. - Disable background/system capture for short tests unless the user specifically needs it:
Run(system_tracking_interval=None, log_system_params=False, capture_terminal_logs=False). - Use
Run(run_hash, repo=repo, read_only=True)orrepo.get_run(run_hash)for read access. In the verified Aim version,Repo(..., read_only=True)raisesNotImplementedError. - Keep each sequence homogeneous for a fixed
(run, name, context)tuple. Use distinct contexts such as{"subset": "train"}and{"subset": "val"}when logging the same metric name for different phases. - Use
QueryReportMode.DISABLEDin scripts and tests to avoid progress-bar side effects. - Do not start long-running UI/server processes or run destructive storage commands from this sub-skill.
Minimal pattern
from aim import Repo, Run
repo = Repo.from_path("./aim-repo", init=True)
run = Run(repo=repo, experiment="demo", system_tracking_interval=None, capture_terminal_logs=False)
try:
run["hparams"] = {"lr": 1e-3, "batch_size": 32}
for step in range(3):
run.track(1.0 / (step + 1), name="loss", step=step, epoch=0, context={"subset": "train"})
run.track(0.8 / (step + 1), name="loss", step=step, epoch=0, context={"subset": "val"})
finally:
run.close()
repo.close()
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).