AGENTS.md · huggingface/pytorch-image-models
AGENTS.md from huggingface/pytorch-image-models: 37 lines covering Build/Test Commands, Code Style Guidelines, Contributions.
Template by huggingface
Install
Works with Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Claude Code. Read the repository before you give any tool access to your data.
curl -fsSL https://raw.githubusercontent.com/huggingface/pytorch-image-models/main/AGENTS.md -o AGENTS.md
Read it and adapt it to your project before use.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: prompt-engineering
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
What's in it
An AGENTS.md file: instructions coding agents (Codex, Cursor, Copilot, Gemini CLI and others) read before working in a repo.
- For
- Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Claude Code
- Length
- 37 lines
- File
AGENTS.md
Sections
- Build/Test Commands
- Code Style Guidelines
- Contributions
First lines (shown under the repo's Apache-2.0 license)
# AGENTS.md - PyTorch Image Models (timm) ## Build/Test Commands - Install: `python -m pip install -e .` - Run tests: `pytest tests/` (the full suite is slow as it covers every model, run the tests relevant to your change) - Run specific test: `pytest tests/test_models.py::test_specific_function -v` - Run tests in parallel: `pytest -n 4 tests/` - Filter tests: `pytest -k "substring-to-match" tests/` ## Code Style Guidelines - Line length: 120 chars - Indentation: 4-space hanging indents, arguments should have an extra level of indent, use 'sadface' (closing parenthesis and colon on a separate line) - Typing: Use PEP484 type annotations in function signatures - Docstrings: Google style (do not duplicate type annotations and defaults) - Imports: Standard library first, then third-party, then local - Function naming: snake_case - Class naming: PascalCase - Error handling: Use try/except with specific exceptions - Conditional expressions: Use parentheses for complex expressions ## Contributions - See [CONTRIBUTING.md](CONTRIBUTING.md) for full guidelines. - Please don't open issues or PRs for edge cases unlikely to be hit in real use. Maintainer time is limited, and small fixes like these add review load without helping users. Focus on bugs that affect real training, inference, or model-loading workflows, and include a realistic scenario that triggers the bug. - Agent-found nits are usually closed. The following cases alone are insufficient justification for a PR; show a supported training, inference, or model-loading workflow that encounters the bug: - an unusual call order (e.g. freeze, then reset the classifier or resize; a partial `.to()` after another conversion) - meta device, integer/complex dtypes, or unbatched inputs to helpers that are only called batched - missing validation or a clearer error for invalid arguments - an internal helper with no caller that hits the bug - a behaviour that is arguably intended and changing it would alter existing training results - Search open and closed PRs before starting, and read related discussions. Don't resubmit a declined proposal without addressing the reason it was declined. - One PR per root cause. Check related code for the same mistake and include any affected sites in the same PR. - Tests: for bug fixes, add the smallest regression test to the existing test module for that area (e.g. `tests/test_task.py`, `tests/test_layers.py`, `tests/test_models.py`). Don't create new test files for a single fix. - Keep diffs minimal: no reformatting, style changes, or refactors of code unrelated to the change. - Minimal scope is not minimal effort. Code you touch should be left better than you found it: use the best solution a maintainer would write, not the smallest patch that passes the test. Fix the root cause in the existing structure rather than adding special cases (e.g. reorder an existing loop instead of enumerating combinations). Where it's cheap and safe, clean up the function you're changing (stale FIXMEs, needless overhead). This doesn't override backwards compatibility; if the better approach carries risk, explain the trade-off in the PR rather than shipping the weaker fix. - Preserve backwards compatibility: existing models, pretrained weights, and public functions should produce the same outputs unless the change is fixing a real bug. - Disclose AI assistance in the PR description. A human submitter is expected to have read the diff and to answer review questions.
Signals
- Stars
- 37,238
- Forks
- 5,216
- Open issues
- 10
- Last commit (this folder)
- Oct 20, 2026 (9 days ago)
- Last release
- Sep 22, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from huggingface
- 0.856score
hf-cli
huggingfaceOfficial
Hugging Face Hub CLI (`hf`) for downloading, uploading, and managing models, datasets, spaces, buckets, repos, papers, jobs, and more on the Hugging Face Hub.
SkillAFreshness: A★ 11.2KClaude Code +9 - 0.856score
trl-training
huggingfaceOfficial
Post-train LLMs with TRL (Transformers Reinforcement Learning) — SFT, DPO, GRPO, KTO, and reward-model training.
SkillAFreshness: A★ 11.2KClaude Code +9 - 0.815score
hf-cloud-serving-image-selection
huggingfaceOfficial
Pick the right serving container for a SageMaker model deployment and find its current image URI.
SkillBFreshness: B★ 11.2KClaude Code +9 - 0.815score
huggingface-spaces
huggingfaceOfficial
Build, deploy, and maintain applications on Hugging Face Spaces — Gradio / Docker / Static SDKs, ZeroGPU and dedicated hardware, model loading, debugging…
SkillBFreshness: B★ 11.2KClaude Code +9 - 0.815score
train-sentence-transformers
huggingfaceOfficial
Train or fine-tune sentence-transformers models across `SentenceTransformer` (bi-encoder, dense or static embedding model for retrieval, similarity…
SkillBFreshness: B★ 11.2KClaude Code +9 - 0.815score
hf-cloud-sagemaker-production-defaults
huggingfaceOfficial
Create a SageMaker endpoint (real-time, real-time scale-to-zero, or async) with autoscaling, CloudWatch alarms, and tagging enabled by default.
SkillBFreshness: B★ 11.2KClaude Code +9
Cite this page
AGENTS.md · huggingface/pytorch-image-models. Agent Mart. https://agentmart.dev/templates/huggingface-pytorch-image-models-agents-md (last updated 2026-10-24)