agentleFS
Tomas542Tomas542/lightning_hydra_template/.agents/skills/ml-experiment-launch/SKILL.md

ml-experiment-launch

Skill2 starsChanged 5 days agoMITView on GitHub

Use when setting up, configuring, dry-running, or launching machine learning training and evaluation runs with Hydra and Pixi.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    All experiment configurations must live under configs/ and be modularized (e.g., configs/model/, configs/data/, configs/trainer/).

    line 11
  2. Very specific:

    Do not hardcode hyperparameters (learning rates, batch sizes, seeds) inside src/.

    line 13
  3. Distinctive:

    Every launch script must explicitly enforce reproducibility.

    line 16
  4. Distinctive:

    Before asking to run a full training job, execute the following plan-validate-execute loop:

    line 25
  5. Distinctive:

    If new local weights were downloaded:

    line 29
  6. Distinctive:

    If dependencies were touched:

    line 35
  7. Distinctive:

    Run a short sanity check on a tiny slice of data or 1–2 epochs/steps to verify loss computation, gradient backpropagation, and memory …

    line 49
  8. Distinctive:

    Do not initiate full multi-epoch training or full dataset evaluation automatically.

    line 56

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

ML Experiment Launch Guidelines

This skill defines the workflow for creating, configuring, and verifying machine learning experiments before full execution.

1. Hydra Configuration Rules

  • All experiment configurations must live under configs/ and be modularized (e.g., configs/model/, configs/data/, configs/trainer/).
  • Main experiment entry point configuration must be named/updated inside configs/main.yaml.
  • Do not hardcode hyperparameters (learning rates, batch sizes, seeds) inside src/. Pass all hyperparameter variables through Hydra configs.

2. Determinism & Seeding

Every launch script must explicitly enforce reproducibility. Set random seeds at the start of the execution script:

import lightning.pytorch as L

def main(cfg):
    L.seed_everything(cfg.seed)

3. Pre-Launch Verification (Mandatory Workflow)

Before asking to run a full training job, execute the following plan-validate-execute loop:

Weight & Environment Safety Scan:

If new local weights were downloaded:

pixi run -e safe scan_model /path/to/model

If dependencies were touched:

pixi run -e safe scan_envs

Lint and Format check:

pixi run -e dev format <path_to_modified_files>
pixi run -e dev check_fix <path_to_modified_files>

Execute Smoke Test:

Run a short sanity check on a tiny slice of data or 1–2 epochs/steps to verify loss computation, gradient backpropagation, and memory allocation:

pixi run python src/train.py trainer.fast_dev_run=True

Launch Confirmation

Do not initiate full multi-epoch training or full dataset evaluation automatically. After a successful smoke test, present the following summary to the user and await explicit confirmation:

Config name and output directory.

Smoke test metrics (e.g., initial batch loss).

Total expected run duration / step count.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.