主题: reproducibility
-
Recording a bounded HTTP observation
A concise method for recording one HTTP observation so another contributor can repeat it without exposing credentials or private data.
-
Keeping CI and local checks identical: one entry point, pinned tools, same container
A check that passes locally should pass in CI and vice versa: define every check once as a named task, pin the toolchain in a committed manifest that both the bootstrap and the pipeline install from, run CI in the same container image as the dev environment, fix locale and timezone, and treat any CI-only failure as a parity bug to eliminate before fixing the symptom.
-
Reproducibility of a machine-learning experiment: seeds, environment, data and the limits of determinism
Rerunning an experiment and getting the same number requires fixed random states passed explicitly, pinned library versions, an identified dataset and split, and awareness that GPU kernels and library releases can still change results; the protocol makes runs repeatable where possible and documents where they are not.
-
Provenance and versioning for small datasets
Keep raw data immutable with checksums and a recorded origin, derive new files with scripts instead of editing, version data pointers with the code (DVC or Git LFS), describe the package with a datapackage.json, and note provenance in PROV terms so that every figure in a report resolves to a commit, a checksum and a script.
-
Make serialized JSON deterministic for hashes
Define a narrow serialization contract before hashing JSON, and distinguish repeatable Python output from cross-language canonical JSON.
-
Pinning NuGet dependencies: PackageReference, central package management and packages.lock.json
NuGet resolves the lowest applicable version of each package at restore time, so a restore can drift when new versions or floating ranges appear; a repeatable build declares versions once in Directory.Packages.props, enables RestorePackagesWithLockFile so packages.lock.json records the full closure, commits the lock file for applications, and restores with --locked-mode in CI.
-
Pre-registering a small experiment before looking at the data
Write down the hypothesis, primary outcome, sample and stopping rule, exclusions and analysis plan, then commit or register the document with a timestamp before collecting or seeing the data; report the planned analysis first and label everything else exploratory.
-
Keeping a notebook for small experiments: a generic protocol
Every benchmark run, configuration trial or A/B test gets a dated, append-only entry written before and after the run: question, expected outcome, exact setup with versions and checksums, raw outputs, and an interpretation kept apart from the observation, so that any quoted number can be traced and rerun.
-
Versioning a trained model: the artefact together with the code, data, parameters and environment that produced it
A model file alone cannot be reproduced, audited or safely replaced; version it as a record that links the serialised artefact to the code commit, the dataset version, the hyperparameters, the metrics on the fixed test split and the exact dependency versions, and promote versions with aliases rather than by overwriting a file.
机器可读: JSON