Tao Run Automl
NVIDIAOfficialCreated by NVIDIA Corporation
- Skill
- Workflow
- Software development
- Apache-2.0
- Medium risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The tao-run-automl skill provides a structured, platform-agnostic workflow for running hyperparameter optimization (HPO) on NVIDIA TAO models. It integrates with various platforms like Brev, SLURM, Kubernetes, and Docker to manage the lifecycle of training, evaluation, and compression tasks. The skill handles algorithm selection, experiment tracking via WandB, and provides a rigorous pre-launch review process to ensure compute resources are used efficiently. It supports advanced search strategies including Bayesian, Hyperband, ASHA, and LLM-guided optimization, ensuring that model tuning is both systematic and data-driven.
What it does
- Automates hyperparameter search using algorithms like Bayesian, ASHA, and BOHB.
- Executes platform-agnostic jobs across Docker, Kubernetes, SLURM, and Brev.
- Performs mandatory baseline evaluations before launching optimization trials.
- Integrates LLM-based analysis for periodic experiment review and search space refinement.
- Manages experiment tracking and result interpretation for model training, distillation, pruning, and quantization.
- Enforces strict pre-launch reviews and resource budget checks.
When to use it
- When you need to optimize hyperparameters for a NVIDIA TAO network.
- When you want to automate the tuning of training, evaluation, inference, distillation, pruning, or quantization tasks.
- When you require a systematic approach to model performance improvement using advanced search algorithms.
- When you need to track and compare multiple experiment configurations efficiently.
Advantages
- Reduces manual effort in finding optimal model configurations.
- Provides consistent, reproducible experiment tracking.
- Supports diverse compute environments without changing the workflow logic.
- Prevents resource waste through pre-launch validation and baseline evaluation.
- Offers flexible search strategies tailored to different budget and performance requirements.
Usage examples
- “Run AutoML for my object detection model on Kubernetes using Bayesian search.”
- The agent will initiate the preflight checks for the Kubernetes platform, validate the model schema, perform a baseline evaluation, and begin the Bayesian optimization process.
- “Optimize the pruning parameters for my classification model using ASHA.”
- The agent will configure the ASHA algorithm, set up the pruning action, and manage the trial lifecycle to find the best-performing pruned model.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/nvidia/tao-run-automl/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip tao-run-automl.zip -d .agents/skills
Documentation by NVIDIA Corporation
TAO AutoML
Standalone install? If this session was not initialized by the TAO skill bank plugin, run
tao-setupfirst (host preflight, credentials, cross-skill discovery).
Run automated hyperparameter optimization for a TAO model by combining:
The selected model skill under
skills/models/<model_skill>/.The selected platform skill under
skills/platform/<platform>/.AutoMLRunner, which generates recommendations, launches selected action jobs, extracts metrics, and feeds results back to the optimizer.
Do not launch until model metadata, platform preflight, data visibility, credentials, image choice, and compute shape are all proven.
Execution Runtime — Hard Gate
Every recommendation, baseline evaluation, per-recommendation evaluation, and
final evaluation runs in the selected model action's resolved
container_image by default. Resolve it from the model skill before any
training-environment setup. A local checkpoint or Hugging Face model ID does not
change this rule.
Use venv-based model execution only when explicitly requested. Never infer
venv mode from local-docker, local GPUs, Python, or pyproject.toml. If
absent, execution is container-backed. A host/controller venv for tao_automl,
TAO SDK, or a platform adapter is
control-plane-only; keep child model actions in the resolved container image.
Reference Map
references/skill_info.yaml: this workflow's structured metadata.Split detailed references:
automl-preflight-concepts.mdfor prerequisites and support checks;automl-intent-algorithms.mdfor search policy;automl-compression-literature.mdfor distill/prune/quantize algorithm sufficiency and future compression-search roadmap;automl-runner-configuration.mdfor runner/API/WandB details;automl-advanced-monitoring.mdfor hooks, resume, and pitfalls; andautoml-examples.mdfor conversation examples; andautoml-common-pitfalls.mdfor recurring safety checks.detailed-guide.mdis only the map.skills/models/<network>/SKILL.md: model-specific dataset requirements, metrics, HPO notes, checkpoint handoff, and known failures.skills/models/<network>/references/skill_info.yaml: action contract, container image, inputs, outputs, upload exclusions, andmode.skills/platform/<platform>/SKILL.md: selected platform preflight, credentials, resource shape, monitoring, and cancellation.skills/core/tao-launch-workflow/SKILL.md: shared intake pattern for platform, credentials, dataset visibility, image confirmation, and user confirmation.
Preflight
Run the shared launch intake. If the user has not chosen a platform, ask; Brev, SLURM, Kubernetes, and Docker are equal peers.
Run the selected platform skill's preflight before generating runner files.
Verify
nvidia-tao-automlimports:
python -c "import tao_automl; from tao_automl.runner import AutoMLRunner; print('OK')"Then verify the selected platform's SDK constructs — importing tao_automl does
not prove the platform backend is installed (e.g. DockerSDK() raises
CredentialError without the docker package). See
automl-preflight-concepts.md.
If missing, show the exact install command from versions.yaml and ask before
installing:
SB="${TAO_SKILL_BANK_PATH:-~/tao-skill-bank}"
pip install "$($SB/scripts/resolve_versions_key.py wheels.tao_automl_<platform>)"Valid platform wheel keys are tao_automl_brev, tao_automl_slurm,
tao_automl_kubernetes, tao_automl_docker, and tao_automl_all. Use
all only for development machines that need every backend. Add ,llm only
when the user requests LLM-guided algorithms.
Model Support Gate
Before every run:
Read the model
SKILL.mdandreferences/skill_info.yaml.Confirm
automl_enabled: truefor the model or that the model skill explicitly routes the selected action to AutoML.Confirm
<skill_dir>/schemas/<action>.schema.jsonexists and parses. This is the AutoML search-space gate.For non-TAO-Core models such as Cosmos-RL and CLIP, also require
references/spec_template_<action>.yaml; otherwise the runner has no complete action defaults.If any gate fails, do not improvise a search space. Report the missing package artifact.
Inputs
Collect these before runner construction:
| Input | Requirement |
|---|---|
model_skill | Resolved model skill directory under skills/models/. Resolve user aliases such as network_arch to the packaged skill directory first. |
network_arch | Read from the resolved model skill metadata. |
action | Action to optimize — train, evaluate, inference, distill, prune, or quantize with a packaged schema/template. |
platform | One of the supported TAO platform skills. |
train_dataset / eval_dataset / action inputs | Use model-specific spec keys and layout. Non-train actions may also need parent/teacher checkpoints, calibration data, or pruned artifacts. |
results_root | Local, Lustre, or S3 path appropriate for the platform. |
gpu_count, num_nodes | Respect model and platform limits. |
container_image | Resolve through model metadata and versions.yaml; show it to the user. |
automl_algorithm | Default bayesian unless user asks for another algorithm or the model skill recommends one. |
metric, direction | Prefer the model skill's validation/task metric. |
automl_budget | Recommendation count, max epochs/rungs, concurrency, or population size as required by the algorithm. |
Never ask for secret values. Verify required env vars with
[ -n "$VAR_NAME" ] && echo SET || echo UNSET.
Pre-Launch Review Gate
Before launching any recommendation jobs, show a concrete launch review and get user confirmation. This gate applies to every AutoML run for every AutoML-supported model/network; it is not Cosmos-specific and must not be scoped to a single model skill. This applies even when platform and image preflight already passed. The review must include:
model/network, platform, image, GPU/node shape, and result/workspace root
dataset mode and concrete spec keys, including train/eval sample counts when they can be read cheaply
algorithm, budget, max concurrent jobs, metric, and direction
searchable parameters and ranges, including default values when the user did not provide an explicit search space
exact generated recommendation configs for the initial launch batch, produced in a review-only step before any recommendation job is submitted
estimated runtime per recommendation and total expected wall time, with the assumptions used
the automatic baseline eval job id, metric value, and result path from the post-preflight eval job, or an explicit blocker if the model has no runnable evaluate action or validation data
the post-AutoML final evaluation plan for the selected best checkpoint/model, including metric, dataset, and record path
If the estimate is longer than the user's stated limit or materially longer than a normal interactive run, ask whether to reduce recommendations, epochs, dataset size, validation frequency, or search space before launch. Do not hide multi-day estimates in logs.
Automatic Baseline Eval Job
After platform, image, credential, data, and model preflight pass, run the model's evaluate action once on the selected validation/eval data before submitting any AutoML recommendation jobs. This is required AutoML setup, not an optional "pretrained eval" question for the user. Use the same base model or checkpoint that the AutoML training run starts from, the model skill's evaluate spec/template, and the selected platform's normal job submission path. If the model skill recommends a smaller shape for evaluation than training, use that shape and call it out in the launch review.
Share the eval metric number in the launch review before asking for confirmation. If a starting checkpoint exists but the baseline cannot be produced — no packaged evaluate action, missing eval dataset, failed eval job — stop and report the blocker instead of silently falling back to a training-loss-only run.
For training from scratch, record the baseline as unavailable and proceed; do not evaluate an empty checkpoint.
The runner owns final evaluation. When eval is runnable, pass
final_eval_fn(best_rec, train_job_id) to AutoMLRunner.run; the result then
carries result["final_evaluation"]. See automl-preflight-concepts.md for
the callback, checkpoint, baseline, and from-scratch rules.
Dependency And Data Preflight
If the selected workflow needs object storage or a platform CLI and the tool is
missing, report the missing dependency and offer the exact install command
before continuing. After user approval, rerun
scripts/check_tao_launch_preflight.py with --install-missing-tools so it
installs the smallest needed package and immediately retries path verification.
For S3 paths, verify both credentials and path readability from the launch
platform before creating runner artifacts.
For models that read large media archives or directories during every training
trial, stage or extract the dataset once to storage visible from the execution
platform, then point all recommendation specs at that staged path. Record the
source URI, staged path, byte/file-count evidence when available, and timestamp
in <workspace>/evaluations/data_staging.json. If staging is not possible,
include the repeated S3 I/O risk in the pre-launch review and ask before
spending a long AutoML budget on it.
When the model skill defines sample-count-sensitive constraints, enforce them
before launch. Reject or cap every batch-size recommendation that would create
zero training steps for the selected dataset and GPU shard count. Use
scripts/check_tao_launch_preflight.py --effective-batch-limit train_annotation=<batch_size>,<shard_count> for each generated recommendation
before submitting it. If a recommendation later fails because the data is too
small for the effective batch size, classify it as an invalid configuration,
replace or adjust it only when remaining budget exists, and report the
correction in the final summary.
When train sample count is known from an annotation file or cheap manifest read,
pass it as automl_settings["train_sample_count"] to AutoMLRunner.run so the
runner can cap impossible recommendations before submitting a job and record the
adjustment in result["history"][i]["adjustments"].
Algorithm Policy
| Algorithm | Good fit | Required knobs |
|---|---|---|
bayesian | Default for small/medium budgets and few parameters. | num_recommendations, metric, direction |
hyperband, asha | Many configs, cheap early rungs; ASHA is parallel-friendly. | max_epochs, reduction_factor, optional max_concurrent |
bohb, dehb | Mixed Bayesian/evolutionary search with multi-fidelity budgets. | same rung budget fields as Hyperband |
pbt | Long training where schedules should mutate during training. | population and generation budget |
llm, hybrid, autoresearch | User explicitly wants LLM-guided search with a configured endpoint. | LLM endpoint config plus budget |
For evaluate or inference, default to Bayesian/BFBO-style search over the
selected action's prompt, decoding, preprocessing, or runtime config knobs.
Use a task metric from the action outputs/logs and set direction explicitly
when the metric name is ambiguous. Do not use training-loss assumptions for
actions that do not update weights.
For distill, use the same train-like policy when the distill action performs
epoch-based optimization and writes checkpoints. For single-shot prune and
quantize, default to bayesian or bfbo unless the action schema/model skill
declares an epoch-like or calibration-budget field that makes
hyperband/asha/bohb/dehb meaningful. Use eval_fn when the selected
metric must be computed by a follow-up evaluate/inference action after the
compression action completes.
Prefer the model skill's recommendation over generic defaults. Avoid ASHA or Hyperband when the model skill says startup, validation, or checkpoint cost dominates short trials.
Spec And Search Space
Build specs as nested dictionaries. If a model skill lists paths in dotted notation for readability, walk the path and assign the nested leaf; do not store flat dotted strings as spec keys.
Use the packaged selected-action schema for:
automl_default_parametersautoml_disabled_parametersvalid min/max ranges
enums, option weights, conditions, dependencies, and popular parameters
User-provided search spaces must stay inside schema constraints. For integer knobs with discrete choices, include the schema's required integer option shape instead of a loose list if the model skill calls that out.
Data source overrides are mandatory unless the model skill says the launcher can derive them. Preserve exact user-provided spec keys when the dataset uses direct annotation/media paths.
Metric Policy
Training loss is cheap but can be misleading. Prefer the model skill's task metric. Use one of these:
Log metric:
metric=<name>,direction=maximize|minimize.metric_extractor(logs, metric_name): parse the model's logs when the default resolver is ambiguous.eval_fn(rec, train_job_id): run the model's evaluate action after each recommendation when the user wants a downstream task metric.
Do not map kpi to a metric unless the model skill explicitly defines that
mapping.
The final report must compare the baseline metric, each recommendation's
metric, and the selected best metric so users can see the impact of tuning. For
model skills that require an eval_fn to compute the real task metric, use
that evaluator instead of optimizing a convenient training loss unless the user
explicitly accepts the proxy metric.
Runner Construction
Use the selected platform SDK only after its preflight passes. Construct SDKs without embedding credentials in code.
sdk is the platform SDK object; containerless venv models use
VirtualEnvSDK(venv_path=..., work_dir=...). Always pass work_dir -- the
default ~/.tao_sdk/virtualenv fills the home directory with trial
checkpoints. See automl-runner-configuration.md.
import sys
from pathlib import Path
from tao_automl.runner import AutoMLRunner
skill_bank = Path("<absolute-tao-skill-bank>")
model_skill = "<resolved-model-skill-directory>"
skill_dir = skill_bank / "skills" / "models" / model_skill
sys.path.insert(
0, str(skill_bank / "skills/applications/tao-run-automl/scripts")
)
from resolve_automl_session import validate_session_settings
runner = AutoMLRunner(
sdk=sdk,
skill_dir=str(skill_dir),
action=action, # train, distill, prune, quantize, ...
)
workspace_path = Path("<automl_workspace>")
resume = False
# Mandatory fail-closed gate from this skill's bundled scripts directory.
validate_session_settings(
automl_settings,
resume=resume,
workspace=workspace_path if resume else None,
)
result = runner.run(
workspace_path=str(workspace_path), # timestamp it to avoid collisions
automl_settings=automl_settings, # must contain an explicit session_id
spec_overrides=spec_overrides,
automl_hyperparameters=automl_hyperparameters,
custom_param_ranges=custom_param_ranges,
metric_extractor=metric_extractor, # optional
eval_fn=eval_fn, # optional
final_eval_fn=final_eval_fn, # optional but required when final eval is runnable
resume=resume,
)Set automl_settings["session_id"] explicitly and call
validate_session_settings before every run. Generate a fresh ID once with
scripts/resolve_automl_session.py new. Resume only when explicitly requested;
resolve its controller with
scripts/resolve_automl_session.py resolve --workspace <full-run-path>.
Missing or ambiguous state is a blocker. See the
resume section of references/automl-advanced-monitoring.md for the complete
fresh/resume pattern.
Monitoring
Use runner status output and the platform SDK's get_job_status,
get_job_logs, and get_failure_analysis. For active jobs, report:
recommendation id / trial id
platform job id
status
current metric
best metric so far
selected hyperparameters for the current/best recommendation
elapsed time and updated ETA when enough timing data exists
On failure, classify whether it is infrastructure, data visibility, image, credential, spec/schema, or model-code failure. Fix only the minimal cause and do not silently spend additional budget on repeated invalid recommendations. If a blocker is fixed during run setup, continue from the original task after showing the updated preflight/launch review instead of leaving the user to restate the request.
For LLM-based algorithms, inspect the brain logs before calling the run valid. Verify that LLM calls succeeded, proposals were generated, prior metrics were used to choose later parameter changes, and logs show keep/discard or equivalent algorithm decisions. If the brain falls back to random sampling, classify the LLM workflow as failed or blocked instead of treating it as a valid LLM-guided run.
Result Handoff
At completion:
Identify the best recommendation by the selected metric and direction.
Return the best child job id and its result path.
Resolve the model checkpoint or action artifact using the model skill's checkpoint/artifact metadata and SDK helpers; do not guess filenames such as
latest.Report the exact search space, algorithm, budget, metric, and platform.
Report the automatic baseline eval job id/result path/metric, all recommendation metrics, final evaluation status/result path/metric, failed recommendations and root causes, elapsed time, and final runtime notes.
If this feeds a workflow such as AutoML + DEFT, pass the winning spec overrides and checkpoint through the workflow's declared handoff fields.
With the default retention policy, verify that cleanup-supported, safely prunable terminal trial artifacts were deleted and that the winning training artifacts remain. Report protected promotion/resume parents or conservative Hybrid results explicitly. A remote bind, named volume, or other output route the SDK cannot reclaim must fail retention preflight before the first trial rather than be silently retained.
Common Pitfalls
See references/automl-common-pitfalls.md before launching or recovering an
AutoML run.
Files
- ATTRIBUTION.mdAdded by AutoGineer912 B
- BENCHMARK.md7.6 KiB
- LICENSELicence file added by AutoGineer11.2 KiB
- SKILL.md19.4 KiB
- cards/00-preflight.md1.9 KiB
- cards/10-baseline-eval.md3.7 KiB
- cards/20-launch-recs.md7.0 KiB
- cards/30-interpret.md3.2 KiB
- cards/README.md3.3 KiB
- cards/driver.shScript8.0 KiB
- config/skillspector-baseline.yaml1.6 KiB
- eval.config9.8 KiB
- evals/evals.json1.7 KiB
- references/automl-advanced-monitoring.md22.6 KiB
- references/automl-common-pitfalls.md908 B
- references/automl-compression-literature.md5.6 KiB
- references/automl-examples.md6.0 KiB
- references/automl-intent-algorithms.md26.1 KiB
- references/automl-preflight-concepts.md13.1 KiB
- references/automl-runner-configuration.md17.3 KiB
- references/best_rec_adapter.pyScript4.1 KiB
- references/detailed-guide.md989 B
- references/skill_info.yaml1.8 KiB
- references/tests/test_best_rec_adapter.pyScript3.7 KiB
- scripts/resolve_automl_session.pyScript5.6 KiB
- skill-card.md5.2 KiB
- skill.oms.sig9.5 KiB
- tests/test_resolve_automl_session.pyScript5.3 KiB
references/automl-advanced-monitoring.md
TAO AutoML Advanced Monitoring
LLM/agentic options, optional hooks, progress monitoring, resume, result interpretation, pitfalls, and status queries.
Load this file only when the compact SKILL.md points here for the current task. If this reference conflicts with SKILL.md, skill_info.yaml, schemas, or platform/model skills, the compact/current source wins.
Contents
Natural Language Configuration
config = {
"automl_algorithm": "bayesian",
"automl_hyperparameters": ["<param_from_model_schema>", ...],
"algorithm_specific_params": {"automl_max_recommendations": 15},
"metric": "<metric_from_model_skill_or_user_request>",
"reasoning": "..."
}
LLM Analyzer (works with ANY algorithm)
After every 5 completed experiments, call:
analysis = {
"patterns": ["..."],
"convergence_assessment": "improving",
"recommendations": ["..."],
"suggested_ranges": {"<param_name>": {"min": ..., "max": ...}},
}
Autoresearch Agent Components
Research Programs
Validate before running
Advanced hooks (opt-in)
metric_extractor(logs: str, metric_name: str) → float | Noneeval_fn(rec, train_job_id: str) → float | NoneStep 4: Monitor Progress
Resume after interruption
Step 5: Interpret Results
How to report to the user
If all recs failed
Model-Specific Notes
Common Pitfalls
Querying Experiment Status
Progress summary
Best config
Per-rec details
In-flight jobs
LLM/Agentic Features Deep Dive
Natural Language Configuration
Don't know which algorithm or parameters to use? The NLConfigGenerator translates plain English into a valid AutoML configuration:
from tao_automl.brain.nl_config import NLConfigGenerator
generator = NLConfigGenerator() # uses NVIDIA NIM by default
config = generator.generate_config(
user_prompt=user_goal,
network=network_arch,
available_parameters=param_records, # from generate_hyperparams_to_search()
hardware_info=hardware_info,
)
# config = {
# "automl_algorithm": "bayesian",
# "automl_hyperparameters": ["<param_from_model_schema>", ...],
# "algorithm_specific_params": {"automl_max_recommendations": 15},
# "metric": "<metric_from_model_skill_or_user_request>",
# "reasoning": "..."
# }LLM Analyzer (works with ANY algorithm)
The LLMAnalyzer can be used alongside any classical algorithm to provide periodic analysis of experiment results:
from tao_automl.brain.llm_analyzer import LLMAnalyzer
analyzer = LLMAnalyzer(analysis_interval=5, narrow_ranges=True)
# After every 5 completed experiments, call:
analysis = analyzer.analyze(
experiments=experiment_history,
parameters=param_records,
network=network_arch,
metric_name=metric,
metric_direction=direction,
best_metric=best_metric,
)
# analysis = {
# "patterns": ["..."],
# "convergence_assessment": "improving",
# "recommendations": ["..."],
# "suggested_ranges": {"<param_name>": {"min": ..., "max": ...}},
# }When narrow_ranges=True, the analyzer suggests tighter search bounds based on observed patterns. These can be applied to dynamically focus the search.
Autoresearch Agent Components
The autoresearch algorithm integrates five AutoML-Agent concepts:
| Component | What it does | When it runs |
|---|---|---|
| KnowledgeRetriever (RAP) | Retrieves built-in tuning knowledge for the requested network and optionally web-searched papers/benchmarks | Once at initialization |
| SpecPrescreener | LLM predicts which of N candidate configs are worth running, WITHOUT training. Saves GPU budget by filtering unlikely-to-improve configs. | Before each trial — proposes 3 candidates, pre-screens to pick the best 1 |
| MultiStageVerifier | Pre-launch: validates proposed changes won't crash/OOM. Post-result: checks metrics are plausible (not NaN, not anomalous). | Before launch + after result |
| ExperimentTracker | Tracks full history with keep/discard decisions and reasoning | After each result |
| LLMAnalyzer | Periodic pattern detection, convergence assessment, and optional range narrowing | Every N completed experiments |
Research Programs
For complex multi-phase optimization, define a research program:
from tao_automl.brain.research_program import ResearchProgram, ResearchPhase
program = ResearchProgram(
objective=objective,
network=network_arch,
phases=[
ResearchPhase(
name="Phase 1",
algorithm="bayesian",
parameters=["<param_from_model_schema>", "..."],
trials=8,
),
ResearchPhase(
name="Phase 2",
algorithm="asha",
parameters=["<another_param_from_model_schema>", "..."],
trials=15,
carry_forward="best", # best values carry into this phase
),
],
)
# Validate before running
issues = program.validate(
available_parameters=available_parameters,
available_algorithms=["bayesian", "asha"],
)Advanced hooks (opt-in)
Both hooks are optional. If neither is provided, the runner uses its built-in log regex extractor.
metric_extractor(logs: str, metric_name: str) → float | None
Called on every poll of the training container's logs. Return the most recent/final metric value seen, or None if the metric isn't yet present.
Use it when:
Your container emits the metric in a non-standard log format the built-in regex misses.
You want to parse values from log lines instead of using the generic patterns.
Your metric needs derivation from multiple log fields.
import re
def extract_custom_metric(logs: str, metric_name: str):
m = re.search(rf"{re.escape(metric_name)}:\s*([0-9.]+)", logs)
return float(m.group(1)) if m else None
runner.run(..., metric_extractor=extract_custom_metric)Exceptions raised inside the extractor are caught and logged; the runner continues polling.
eval_fn(rec, train_job_id: str) → float | None
Called once after a rec's training job reaches a terminal state, before the result is reported to the brain. Whatever it returns overrides any value captured by metric_extractor and becomes what the brain optimizes on.
Use it when:
The real task metric lives outside the training logs.
You want a true-test-metric sweep without building surrounding plumbing yourself.
Per-rec cost is acceptable relative to
metric_extractor.
def eval_on_held_out(rec, train_job_id):
# Implement the model-specific evaluation flow documented in the model skill.
metric_value = run_model_specific_eval(rec, train_job_id)
return metric_value
runner.run(
...,
automl_settings={
"metric": task_metric,
"direction": direction,
"session_id": session_id,
...,
},
eval_fn=eval_on_held_out,
)Exceptions from eval_fn are caught and logged — the runner falls back to the log-extracted metric for that rec.
Step 4: Monitor Progress
runner.run() blocks until all recommendations complete. Use callbacks for
live launch/result events from the process that owns the runner:
def on_rec(rec):
print(f"Rec {rec.id}: trying {rec.specs}")
def on_result(rec, metric, status):
print(f"Rec {rec.id}: {status}, metric={metric}")
result = runner.run(..., on_recommendation=on_rec, on_result=on_result)For status questions from a separate shell, agent turn, or detached monitor, default to the structured AutoML state instead of reading launcher logs:
from tao_automl import query_status
status = query_status("<full_workspace_path>/run_<timestamp>")Use status["progress"], status["best"], status["recommendations"], and
status["active_jobs"] as the source of truth for recommendation ids, specs,
metrics, success/failure/pending counts, and active TAO job ids. The state comes
from <workspace>/.automl/controller/, <workspace>/.automl/best_rec/,
<workspace>/.automl/brain/, and <workspace>/active_jobs.json.
Do not comb through launcher logs for normal AutoML status. Logs are fallback
debug material only: use them when the user explicitly asks for logs, when
query_status() reports no usable state, when diagnosing a failed child job, or
when checking metric-extractor / LLM-client warnings that are not represented in
the structured state. If live backend queue state is needed, join the active TAO
job ids from query_status()["active_jobs"] with the selected SDK's job status
API or the platform scheduler (squeue for SLURM); do not derive recommendation
results from logs.
Each rec takes 10–90 minutes depending on model size, dataset, epochs, and checkpoint save cost. Don't assume failure during long uploads.
Checkpoint retention
automl_delete_intermediate_ckpt defaults to True. Sequential searches
delete terminal failed and non-best trial artifacts as soon as they are no
longer needed. Multi-fidelity searches retain parent/rung checkpoints while
they are eligible for promotion or resume and prune them only after that
dependency ends. Hybrid searches conservatively retain successful trial
artifacts when full-fidelity provenance is ambiguous. For cleanup-supported
sequential or provenance-verified scalar runs, completion retains the winning
training artifacts and any separate final-evaluation result rather than one
full checkpoint set per recommendation. Multi-objective runs retain every
non-dominated Pareto-front checkpoint because there is no single winner across
all objectives; conservative Hybrid runs can retain multiple successful
trials. A run
stopped by a recommendation budget is resumable and therefore does not receive
completed-run pruning.
Automatic cleanup covers SDK-routed job results: S3 prefixes, local absolute
Docker /results binds, Lustre job directories, and VirtualEnv job results.
For pruned Docker and Kubernetes trials it also verifies and removes the exact
terminal container or UID-bound Job/pods before reporting cleanup complete, so
stopped writable layers and pod-local storage do not accumulate.
Keep checkpoints under the SDK-routed job results directory. Explicit output
paths outside it are not owned by the cleanup policy. Before the first trial,
cleanup-aware SDKs validate that the selected output route and identity can be
reclaimed. With retention enabled, writable named Docker volumes, remote binds,
root-output opt-outs, and unbound S3 identities are rejected rather than
launched and silently accumulated. They may be used only with retention
explicitly disabled and an externally owned cleanup lifecycle.
Raw S3 secrets are never written to the durable job store. After a process or
host restart, resume with the same explicit platform env_vars; retention
preflight rebinds them to the recorded non-secret principal and endpoint before
old trial cleanup is retried.
Set the option to False only for an intentional all-trials debugging run and
include the resulting storage cost and external cleanup owner in the launch
review.
Resume after interruption
On handled SIGINT or SIGTERM, the runner requests cancellation of active
child jobs and waits for the platform to confirm that their writers are
terminal before deleting anything. If termination cannot be confirmed within
the bounded wait, the active-job record and artifacts remain for a later
resume. An uncatchable process termination or host loss can also leave an
in-flight backend job; recover that run with resume=True and the full
suffixed path (including the run_<timestamp> directory):
Resolve the controller identity before constructing the resumed runner:
SESSION_ID=$(python "$TAO_SKILL_BANK_PATH/skills/applications/tao-run-automl/scripts/resolve_automl_session.py" \
resolve --workspace ./my_experiment/run_20260423_183015)The command fails closed if no controller state exists. It also refuses to
choose arbitrarily when a workspace contains multiple controller files. For a
workspace contaminated by an older failed resume, inspect the controller
states and rerun with --session-id <intended-id>; never select the first file
returned by the filesystem.
result = runner.run(
...,
workspace_path="./my_experiment/run_20260423_183015", # full suffixed path
automl_settings={**automl_settings, "session_id": "<resolved-session-id>"},
resume=True,
)When resume=True, the runner does NOT append a new timestamp suffix — it reuses the path as-is.
For the original run, create the identity once after launch approval and before calling the runner:
SESSION_ID=$(python "$TAO_SKILL_BANK_PATH/skills/applications/tao-run-automl/scripts/resolve_automl_session.py" new)Place that literal value in the sealed automl_settings. The resulting
.automl/controller/<session_id>.json is the durable binding used by later
resume invocations.
Before either fresh or resumed runner.run(...), call the bundled
validate_session_settings(automl_settings, resume=..., workspace=...) gate
shown in SKILL.md. Missing identities fail before the wheel can apply its
random default; resumed identities must resolve to an existing controller.
This is a skill-boundary safeguard. The currently packaged
nvidia-tao-automl wheel still permits resume=True without a matching
session_id and may silently create a fresh controller for callers outside
this skill. NVBug 6662913 tracks that upstream fail-loud behavior; until the
wheel changes, non-skill callers must apply the same explicit identity gate.
Behaviour on resume:
Brain state is reloaded from
<workspace>/.automl/*for the explicitsession_id— all completed rec results are already registered. TreatLoaded controller state: 0 recommendationsas an error when the selected controller file contains completed recommendations; cancel before a new recommendation is submitted.Any in-flight jobs recorded in
<workspace>/active_jobs.json(persisted after each submission) are polled to terminal, their recovered backend job IDs are restored on the recommendation, their metrics extracted, and reported to the brain — before the main propose-new-rec loop starts. No duplicate submissions or orphaned trial artifacts.After recovery, the loop continues normally until
automl.is_complete().
Step 5: Interpret Results
The result is a plain dict:
{
"best": {
"rec_id": 4,
"specs": {"<param_name>": "<value>", "...": "..."},
"metric_value": 0.7077,
},
"progress": {
"completed": 8, "total": 8,
"best_metric": 0.7077, "best_rec_id": 4,
"algorithm": "bayesian",
},
"history": [
{"rec_id": 0, "metric": 0.6308, "status": "success"},
{"rec_id": 1, "metric": 0.7077, "status": "success"},
...
],
}Metric values in best and history are always in the original scale the user provided — direction inversion (if any) is undone before the dict is returned.
For multi-fidelity algorithms (hyperband, bohb, asha, dehb, hyperband_es, and pbt), best is selected from the largest observed training budget once those candidates exist. Report any lower-budget metric that beats the selected final-budget metric as promotion context rather than treating it as the downstream checkpoint.
How to report to the user
Best config — show the winning hyperparameters and metric value.
Comparison table — rank recs by metric and highlight the best. For multi-fidelity algorithms, rank the largest-budget candidates first and include lower-budget winners as context when they differ from the selected final checkpoint.
Insights — call out what the optimizer learned from the requested parameters and metric.
WandB link — if tracking was enabled, provide the dashboard URL.
Next steps — suggest:
More recs (re-run with
resume=True+ higherautoml_max_recommendations).Train longer with the best config using
sdk.create_job(specs=result["best"]["specs"]).Run a downstream evaluation on the best checkpoint.
Run the model skill's recommended export/deploy workflow for the best model.
If all recs failed
Check common issues:
Dataset path wrong — verify the URI points to the layout required by the model skill.
Metric never appears — verify the model skill's required metric-related overrides and custom extractor are present.
Checkpoint or eval artifact missing — verify the model skill's checkpoint/export/eval requirements.
Model or data download timeout — inspect backend logs and model-skill error patterns.
OOM — reduce the model-specific batch, resolution, sequence length, or memory-heavy knobs recommended by the model skill.
Cached data corruption — inspect the model skill's dataset/cache error patterns and clear only the affected cache path if documented.
LLM endpoint unreachable (llm/hybrid/autoresearch only) — the brain falls back to random sampling. Check
AUTOML_LLM_ENDPOINTandAUTOML_LLM_API_KEY. Verify with:curl -s $AUTOML_LLM_ENDPOINT/models -H "Authorization: Bearer $AUTOML_LLM_API_KEY".
If the runner reports no new recommendations and there are no pending/running child jobs, treat the AutoML run as exhausted instead of continuing to poll forever. Inspect the failed child job logs, fix the model skill/config/setup issue, then relaunch from a fresh runner or resume only after the failed cause is corrected.
Model-Specific Notes
Model-specific notes do not belong in this AutoML skill. For every requested model, resolve the packaged model_skill, read <bank-root>/skills/models/<model_skill>/SKILL.md, and use its Training Requirements, Per-Action Dataset Requirements, Typical Spec Overrides, AutoML / HPO Notes, and Error Patterns sections as the source of truth.
Common Pitfalls
skill_dirnot passed (or wrong path).AutoMLRunner(skill_dir=...)requires an absolute path to a model directory inside the skill bank. The runner raisesFileNotFoundError: skill_info.yaml not found at <skill_dir>/references/skill_info.yamlif the path is wrong. Use the same bank root the agent loaded this SKILL.md from; combine withskills/models/<model_skill>/after resolving aliases.Wrong LLM endpoint (404). Use
https://inference-api.nvidia.comfor NVIDIA inference API testing and pass it explicitly inautoml_settings. The LLM brain falls back to random sampling on LLM failure, so check logs for "LLM call failed" before trusting the run as LLM-guided.Model-specific training failures (data format, missing datasets, invalid params). Each network has unique training requirements. ALWAYS read
<bank-root>/skills/models/<model_skill>/SKILL.md— the "Training Requirements" and "Error Patterns" sections document model-specific failure modes that apply to AutoML recs too.Workspace path collisions. Running the same script twice overwrites the previous experiment. Always include a timestamp:
workspace_path=f"./automl_workspace/{TIMESTAMP}"whereTIMESTAMP = datetime.now().strftime("%Y%m%d_%H%M%S").Using a weak proxy metric. The brain can optimize a metric that does not reflect real task quality. Use the metric recommended by the model skill or provide
eval_fn.Implicit direction trap. If the metric name does not imply the desired direction, set
directionexplicitly.Spec-override typos.
save_freq_in_epochs(plural) used to silently do nothing; now raisesValueErrorwith suggestion. If you see that error, it's the fix working.Orchestrator dies mid-sweep. Resolve the existing
session_id, then relaunch with the same fullworkspace_path, that session id inautoml_settings, andresume=True. In-flight jobs are recovered fromactive_jobs.json. Missing or ambiguous controller state is a blocker, not permission to start a new search.Rec never reports a metric. Check the model skill's metric-emission requirements and custom extractor guidance.
Parallel Bayesian arms. Bayesian is inherently sequential. If you want parallelism, use
asha. If you use multipleAutoMLRunnerinstances, give each its own<SDK>(state_file=...)(e.g.,BrevSDK(state_file=...),KubernetesSDK(state_file=...)) to avoid SQLite write races on the SDK's job store.LLM brain returning random configs. If every LLM recommendation looks random, the LLM endpoint is probably failing silently. Check the logs for "LLM call failed" warnings. Verify your API key and endpoint are correct. Common cause: using the wrong endpoint URL (see pitfall #2).
openaipackage not installed. Thellm,hybrid, andautoresearchalgorithms require theopenaiPython package. Install withpip install openaior reinstall tao-run-automl with thellmextra by resolving the platform wheel key fromversions.yamland appending,llmto the extra.WandB not logging. Ensure
wandb_config={"enabled": True}is passed and eitherapi_keyis in the config orWANDB_API_KEYis set in the environment. Check logs for "WandB initialized" confirmation.No default specs foundfor an action. The skill bank model directory is missingreferences/spec_template_<action>.yaml, or the packaged AutoML support check is missingschemas/<action>.schema.json. Generate both during skill-bank maintenance and ship them with the plugin; do not expect~/tao-coreto exist on the runtime machine.conda runbuffers output. When running AutoML viaconda run -n tao_sdk python script.py, all output is buffered until completion. UsePYTHONUNBUFFERED=1 ~/miniconda3/envs/tao_sdk/bin/python script.pyfor real-time output.
Querying Experiment Status
Use query_status() to check experiment progress from a separate process. This
is the default status path for AutoML; do not parse launcher logs unless the user
asks for log output or you are debugging missing/failed structured state.
from tao_automl import query_status
status = query_status("./my_experiment")
# Progress summary
p = status["progress"]
print(f"{p['completed']}/{p['total']} recs done, "
f"{p['succeeded']} succeeded, {p['failed']} failed")
# Best config
if status["best"]:
print(f"Best: rec {status['best']['rec_id']}, "
f"metric={status['best']['metric_value']}, "
f"specs={status['best']['specs']}")
# Per-rec details
for rec in status["recommendations"]:
print(f" Rec {rec['rec_id']}: {rec['status']} "
f"metric={rec['metric_value']} specs={rec['specs']}")
# In-flight jobs
for job in status["active_jobs"]:
print(f" Active: rec {job['rec_id']} job {job['job_id']}")The function reads from the persisted state store (<workspace>/.automl/) and active_jobs.json. It is safe to call while the runner is active — no locking conflicts.
The AutoML class also exposes get_status() for in-process queries:
automl = AutoML(workspace=..., ...)
status = automl.get_status()Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Declares allowed tools, Needs Python, Needs Node.js
The author says: Requires docker + nvidia-container-toolkit. Workflows declare additional requirements.
Security
What our scanner noticed· Medium risk
- Phrasing that asks for actions without confirmation
- Large base64-encoded blobs
- References to credential files
- Instructions that use the network
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- NVIDIA Corporation
- Publisher
- NVIDIA (Official)
- Source
- NVIDIA/skills · skills/tao-run-automl · commit fce3cca
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE-APACHE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by NVIDIA Corporation or NVIDIA.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download tao-run-automl.zip