How yahoo/ml-reproducibility-guidelines works
1. Repository purpose
- This is primarily a documentation repository for ML reproducibility, not a production application.
- Its core artifact is the “training recipe”: a Markdown document that explains how to reproduce a model’s data, training, evaluation, and inference.
2. Top-level architecture
- The repo splits into two layers:
- Guidelines/documentation: README, recipe_resnet50_imagenet.md, contributing and policy files.
- Example implementation: preprocess.py, model.py, train.py, and inference.ipynb.
3. Documentation subsystem
- README.md defines the recipe structure and the required sections: data, training, metrics, inference, timing, serialization, and misc.
- recipe_resnet50_imagenet.md is the concrete example of those guidelines applied to a ResNet-50 on ImageNet.
- figures/ likely holds diagrams or illustrative assets used in the docs.
4. Example ML pipeline subsystem
- The Python files represent a standard ML workflow:
- preprocess.py for dataset preparation,
- model.py for architecture definition,
- train.py for optimization and experiment execution,
- inference.ipynb for interactive prediction and usage examples.
5. Data flow
- The intended flow is:
- Raw data enters the preprocessing step.
- preprocess.py transforms it into a training-ready dataset.
- train.py consumes the processed data and instantiates the model from model.py.
- The trained model is then exercised in inference.ipynb on new samples.
6. Model/training boundary
- model.py is the architecture boundary: it defines the network and likely the loss-related model components.
- train.py is the orchestration boundary: it controls batching, optimizer choice, learning rate schedule, metrics, and training dynamics.
- This separation matches the repo’s documentation goal: making architecture and training procedure independently reproducible.
7. Inference boundary
- inference.ipynb demonstrates how preprocessing and model execution combine for real inputs.
- The notebook is explicitly recommended by the README as the preferred place to show inference examples, timing, and interactive exploration.
8. Reproducibility emphasis
- The repository is centered on capturing the metadata needed to reproduce a result: dataset source, preprocessing code, commit SHA, hyperparameters, outputs, and evaluation targets.
- The architecture is therefore as much about process provenance as about the model itself.
9. Governance and collaboration layer
- Contributing.md and Code-Of-Conduct.md define how changes to recipes and examples should be reviewed and shared.
- The README also suggests using GitHub pull requests as the review mechanism, making version control part of the workflow.
10. What is not present
- There is no sign of a service backend, API server, deployment stack, or database.
- No external runtime infrastructure is implied beyond standard ML tooling and Jupyter/Python for the example scripts.
11. Best diagram framing
- A good architecture diagram would show:
- a documentation track for the training recipe,
- a data preprocessing stage,
- a model/training stage,
- an inference notebook stage,
- and a governance/versioning perimeter around the whole repo.
Main entry points: recipe_resnet50_imagenet.md Recipe example · preprocess.py Preprocess · train.py Train · README.md README
Components 13
Documentation
Recipe guidance and the worked ResNet-50 example.
- README · Defines the training recipe structure and required reproducibility sections.
README.md - Recipe example · Concrete ResNet-50 on ImageNet recipe following the repository guidelines.
recipe_resnet50_imagenet.md - Figures · Illustrative diagrams and visuals used by the documentation.
figures
ML Pipeline
Example preprocessing, model, training, and inference flow.
- Raw data · Original dataset inputs to the reproducible workflow.
- Preprocess · Transforms raw data into a training-ready dataset.
preprocess.py - Processed data · Prepared dataset consumed by training.
- Model · Defines the network boundary and model components.
model.py - Train · Runs optimization, batching, scheduling, and metric tracking.
train.py - Trained model · Serialized model and learned parameters produced by training.
- Inference notebook · Interactive inference and timing examples for new inputs.
inference.ipynb
Governance
Contribution and conduct rules for collaborating on recipes.
- Contributing · Process for proposing and reviewing recipe changes.
Contributing.md - Code of conduct · Community behavior and collaboration expectations.
Code-Of-Conduct.md - Version control · Pull-request based review and commit-based provenance for reproducibility.
Connections 15
- README → Recipe example: guides · The README defines the recipe template and the example follows it.
- README → Figures: references · Documentation may include diagrams and other illustrative assets.
- Recipe example → Preprocess: documents · The recipe records how data preparation is performed.
- Recipe example → Train: documents · The recipe records training procedure, metrics, and timing.
- Recipe example → Inference notebook: documents · The recipe records inference usage and examples.
- Raw data → Preprocess: inputs · Raw data is transformed during preprocessing.
- Preprocess → Processed data: outputs · Preprocessing produces training-ready data.
- Processed data → Train: feeds · Training consumes prepared data.
- Model → Train: used by · Training instantiates and optimizes the model definition.
- Train → Trained model: produces · Training emits a trained model artifact and related metadata.
- Trained model → Inference notebook: runs in · Inference demonstrates how the trained model is applied to new inputs.
- Preprocess → Inference notebook: reused by · Inference may reuse the same preprocessing logic for real inputs.
- Contributing → Version control: defines · Contribution guidance centers on pull-request review and repository history.
- Code of conduct → Version control: supports · Community rules shape collaborative version control workflows.
- Version control → README: governs · The repository documentation and examples are maintained through version control.