BACK TO TEMPLATES
rulesany
Data Science and ML Rules
AGENTS.md for Python data science, PyTorch, and ML engineering codebases covering data pipelines, MLflow, and reproducible seeds.
When to use this
Place this template in machine learning and data science repositories to ensure seed reproducibility, data validation, and clean pipeline modularity.
The template
# AGENTS.md ## Project Context Python machine learning repository for dataset preprocessing, PyTorch model training, and evaluation pipelines. ## Commands - `python -m src.train` train ML model pipeline - `pytest` execute unit tests for data transforms and model architectures - `ruff check src/` run linter check Run static lint checks and unit tests before completing model updates. ## Conventions - Set random seeds deterministically across NumPy, PyTorch, and Python `random`. - Use Pydantic or Great Expectations to validate raw dataset schemas before ingestion. - Log model parameters and metrics using MLflow or Weights & Biases. - Modularize Jupyter notebook prototypes into python scripts under `src/`. ## Restrictions - Do not hardcode absolute local file paths (`C:\Users\...` or `/home/...`). Use relative paths. - Do not commit large dataset files or model weights (`.pt`, `.bin`) into git tracking. ## Approval Required - Changing dataset preprocessing split ratios or target labels. - Modifying model evaluation metric calculations.
Customization Guide
Update framework references (PyTorch, TensorFlow, Scikit-Learn) for your machine learning stack.
Last verified 2026-07-26