agentleFS
NVIDIA-NeMoNVIDIA-NeMo/Automodel/.agents/contributor-skills/testing/SKILL.md

testing

Skill1k starsChanged 20 days agoApache-2.0View on GitHub

Testing reference for NeMo AutoModel — unit and functional test layout, tier semantics (L0/L1/L2), running tests locally, adding or disabling tests, and pytest conventions. Use when adding, running, or disabling tests; debugging a test failure; choosing the right test tier; understanding L0 vs L1 vs L2; handling flaky tests; 'add a test', 'which tier', 'functional test layout'.

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 171 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

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

    Place the file under tests/unit_tests/<domain>/test_<name>.py.

    line 60
  2. Distinctive:

    Keep configs tiny: small hidden dims, 1-2 layers, short sequences.

    line 61
  3. Very specific:

    No foreign setattr on config dataclasses in tests: When applying overrides via setattr(config_obj, key, value), always guard first:

    line 64
  4. Very specific:

    Place the test under tests/functional_tests/.

    line 78
  5. Distinctive:

    Keep unit test configs tiny: small hidden dims, 1-2 layers, short sequences.

    line 84
  6. Very specific:

    Use --master_port to avoid collisions.

    line 87

“Common” is measured: kept by at least 6 in 10 of the 171 edited versions of this file we could read. “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

Testing

Directory Layout

tests/
  unit_tests/          # fast, isolated, no GPU required
  functional_tests/    # GPU-required integration tests
  ci_tests/            # executed in CI pipeline only

Unit tests must be CPU-compatible. Functional tests require at least one GPU. CI test scripts live in tests/ci_tests/ and should not be run locally unless reproducing a CI failure.

Test Tiers

TierTriggerBlocking
L0Every PRYes — PR cannot merge if L0 fails
L1PRs with needs-more-tests label, scheduledYes
L2Scheduled onlyYes (when triggered)

Prefer unit tests over functional tests. CI GPU resources are limited; every functional test slot has a real cost.

Running Tests Locally

Unit Tests (CPU)

pytest tests/unit_tests/ -v

Functional Tests (GPU Required)

pytest tests/functional_tests/ -v

These require at least one GPU. Mark GPU tests with:

@pytest.mark.gpu

or:

@pytest.mark.skipif(not torch.cuda.is_available(), reason="requires GPU")

Adding a Unit Test

  1. Place the file under tests/unit_tests/<domain>/test_<name>.py.
  2. Keep configs tiny: small hidden dims, 1-2 layers, short sequences.
  3. Run locally: pytest tests/unit_tests/<your_test>.py -v

No foreign setattr on config dataclasses in tests. When applying overrides via setattr(config_obj, key, value), always guard first:

if not hasattr(config_obj, key):
    raise ValueError(f"Config has no field '{key}'")
setattr(config_obj, key, value)

Setting a non-existent attribute silently creates a phantom field — the test passes but the recipe fails for a real user.

Adding a Functional Test

  1. Place the test under tests/functional_tests/.
  2. Functional tests are capped at 2 GPUs in CI.
  3. Set CUDA_VISIBLE_DEVICES explicitly for multi-GPU tests.

Tips

  • Keep unit test configs tiny: small hidden dims, 1-2 layers, short sequences.
  • Set CUDA_VISIBLE_DEVICES explicitly when running multi-GPU tests locally.
  • Watch for port conflicts when running multiple torchrun processes. Use --master_port to avoid collisions.

Download now (ZIP)

Trending

More talk lately.about the whole repository

Dec 2025: 3 mentionsJan 2026: 1 mentionFeb 2026: 1 mentionMar 2026: 0 mentionsApr 2026: 7 mentionsMay 2026: 2 mentionsJun 2026: 1 mentionJul 2026: 6 mentionsAug 2026: 2 mentionsSep 2026: 8 mentionsOct 2026: 6 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the NVIDIA-NeMo/Automodel repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about NVIDIA-NeMo/Automodel

The biggest 5 of 43 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 43

Talked about on GitHub (43 times).

On GitHub · 43

38 more on GitHub
  • Other versions191 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 1

    1. NVIDIA-NeMo/Megatron-Bridge★ 96020% same

    Wrote their own version · 190

    1. modelcontextprotocol/servers★ 92ksame name
    2. lobehub/lobehub★ 84ksame name
    3. lobehub/lobe-chat★ 83ksame name
    4. penpot/penpot★ 62ksame name
    5. meteor/meteor★ 45ksame name
    6. iOfficeAI/AionUi★ 34ksame name
    7. garrytan/gbrain★ 31ksame name
    8. OpenZeppelin/openzeppelin-contracts★ 27ksame name
    9. tursodatabase/turso★ 25ksame name
    10. redis/go-redis★ 22ksame name

    180 more not listed

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • Used alongsideProjects with it also use bundle-dependency-prs, update-library-template and 8 more.

    Other files people use alongside this one.

    Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
    • MicrosoftSkill

      bundle-dependency-prs

      Fix broken dependency update PRs and aggregate the ones that work into one PR.

      Also in 6 projects that use this

    • MicrosoftSkill

      update-library-template

      Merges the latest Library.Template into this repo (at position of HEAD) and resolves conflicts.

      Also in 6 projects that use this

    • zetaloopSkill

      assign-copilot

      Assigns a GitHub issue to the Copilot coding agent, optionally specifying a custom agent. Use this when asked to assign an issue to Copilot or delegate an issue to CCA.

      Also in 3 projects that use this

    • timmo001Skill

      changeset-scope

      Keep all scoped code work contained to the user-defined changeset. Use for implementation, fixes, diagnosis, refactoring, cleanup, and review when explicit instructions, named files, diffs, branches, pull requests, or injected work scopes define the boundary.

      Also in 3 projects that use this

    • JetBrainsSkill

      module-dependencies

      Add or modify IntelliJ module dependencies in `.iml` files.

      Also in 3 projects that use this

    • CES-LtdSkill

      oss-pr

      Use when creating a pull request, after committing changes, or when user invokes /oss-pr. Covers branch management, quality checks, commit, push, and PR creation.

      Also in 3 projects that use this

  • In this repository12 other files it gives its agents.

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.