Open-Source Readiness for GNN Research: A Practical Checklist
You finished the experiments and wrote the paper, and you are about to release the code with it. This checklist is what to do before you make the repository public.
The goal is not perfection. It is that a competent third party can clone your repository, follow your README and reproduce your headline numbers within a stated tolerance. The focus here is the release itself; for seeds and run configuration in more depth, see the GNN reproducibility checklist with code.
Repository structure
- [ ]
README.mdat the root. What the project does, how to install it, how to reproduce the headline result. - [ ] A
LICENSEfile. MIT, Apache 2.0 or BSD-3-Clause are common choices unless your institution requires otherwise; choosealicense.com compares them. Without a license, default copyright applies and others have no permission to reuse or redistribute your code. - [ ] Third-party licenses checked. Copied code and bundled data keep their own terms.
- [ ] A
CITATION.cfffile or a BibTeX block so people can cite the work correctly. GitHub shows a "Cite this repository" link whenCITATION.cffis present. To cite TGraphX itself, see how to cite. - [ ] Declared dependencies. A
pyproject.tomlorrequirements.txtstating what the code needs, with version ranges you believe work.
Before the repository goes public
- [ ] No secrets. API keys, tokens and passwords must be absent from the files and from the git history. A scanner such as gitleaks helps. If a key was ever committed, revoke it; deleting the line is not enough.
- [ ] No private data or paths. Look for personal data, internal host names, absolute home-directory paths and notebook outputs that show them.
- [ ] Nothing you may not redistribute, including datasets, pretrained weights and paper PDFs.
Environment
- [ ] A lock file. The declared dependencies say what should work; the lock file says what you actually ran.
pip freeze > requirements_lock.txt, run in a clean environment, records exact versions. It does not record the Python version, the CUDA toolkit or the driver, and it may list local paths, so read it before committing. - [ ] Python version range. State it and test the minimum.
- [ ] CUDA/CPU notes. Record the CUDA version and GPU model you used. Say if a GPU is required.
- [ ] A conda environment file (optional, helpful for reviewers).
Data
- [ ] Data acquisition documented. Link public datasets and state the version and terms.
- [ ] Preprocessing scripts in the repository. The exact code that turned raw data into model-ready tensors.
- [ ] A hash of the preprocessed data, so others can check they have the same input (example below).
- [ ] Split files or split code with its seed.
- [ ] Sample data for testing that exercises the pipeline without the full download.
Code
- [ ] The default branch runs. Not "see the
experimentalbranch". - [ ] One entry point (
main.pyor similar) that reproduces the headline result. - [ ] Configuration in files or command-line arguments, not hardcoded. YAML, JSON or
argparse: anything that lets a reviewer change a hyperparameter without editing source. (A YAML-config experiment shows one way.) - [ ] No notebook-only experiments. Notebooks are fine for exploration, but the publication-quality results should be runnable from the command line. (See turning a notebook into a reproducible experiment.)
Reproducibility
- [ ] Seeds documented and set: Python
random, NumPy, PyTorch, data loader workers and any sampler that takes its own seed.PYTHONHASHSEEDmust be set before the interpreter starts. - [ ] Multiple seeds reported, with mean and standard deviation. Decide the number before running.
- [ ] A single command per headline number, for example
python main.py --config configs/main.yaml --seed 42. - [ ] Deterministic algorithms where possible:
torch.use_deterministic_algorithms(True). Operations without a deterministic implementation then raise an error (or warn withwarn_only=True), and on CUDA some operations also require theCUBLAS_WORKSPACE_CONFIGenvironment variable. - [ ] One directory per run with configuration, metrics and environment information.
If your project uses TGraphX
classify_nodes writes files only when you pass out_dir. The config-driven Runner always writes a run directory, ./runs/<run_name>/<timestamp>/ if you set no run_dir (GridRunner defaults to ./runs/<run_name>/), so check or ignore runs/ before publishing.
tgx.reproducible(seed=42) seeds the generators and, by default, turns on deterministic algorithms in warn-only mode. It writes no files, does not set PYTHONHASHSEED or CUBLAS_WORKSPACE_CONFIG, and leaves the settings in place after the block ends.
To commit an environment record for the headline result, write it yourself. This example also hashes the input tensors (tested with TGraphX 1.5.1 on CPU):
import hashlib
import json
from pathlib import Path
import torch
import tgraphx as tgx
from tgraphx.reproducibility import reproducibility_report
def tensor_sha256(tensors):
"""Hash names, dtypes, shapes and values (not the file format)."""
digest = hashlib.sha256()
for name in sorted(tensors):
t = tensors[name].detach().cpu().contiguous()
digest.update(f"{name}:{t.dtype}:{tuple(t.shape)};".encode())
digest.update(t.numpy().tobytes())
return digest.hexdigest()
with tgx.reproducible(seed=42):
# stand-ins for your preprocessed tensors
data = {"x": torch.randn(10, 4), "edge_index": torch.randint(0, 10, (2, 30))}
record = reproducibility_report()
record.update(seed=42, tgraphx_version=tgx.__version__,
data_sha256=tensor_sha256(data))
out = Path("results/headline")
out.mkdir(parents=True, exist_ok=True)
(out / "reproducibility_report.json").write_text(json.dumps(record, indent=2))
print(sorted(record))
reproducibility_report() covers the Python and PyTorch versions, CUDA availability and determinism settings. It does not include the git commit, the package list, the GPU model or the CUDA version, so record those too.
- [ ]
reproducibility_report.jsoncommitted for the headline result, written as above. - [ ] Run directories audited.
tgx.audit_run_dir()looks forrun_metadata.json,metrics_summary.jsonandbenchmark_summary.json, and checks that they parse and thatrun_metadata.jsonrecordstgraphx_versionandseed.classify_nodes(..., out_dir=...)writes those three files with both keys; the config-drivenRunnerwrites a different set and does not pass the audit on its own. A passing audit says nothing about whether the numbers are correct.
Documentation
- [ ] A "Reproducing the paper" section in the README, step by step, tested by you and ideally by someone else.
- [ ] Expected runtime and hardware, measured on your machine.
- [ ] Expected results with the spread you observed, so a reproducer can tell whether a difference matters.
- [ ] Known issues. If results drift on some hardware, say by how much.
For documentation that stays true to the code, see source-grounded documentation.
Benchmark reporting
- [ ] Mean and standard deviation. A single-seed number does not show how much results vary.
- [ ] Hyperparameter search budget, for your method and for the baselines.
- [ ] Split methodology. Standard split or custom, and with which seed.
- [ ] Compute and model size.
More on this in research integrity in graph learning.
Testing
- [ ] A smoke test that runs the whole pipeline on a tiny dataset and fails on errors. Run it in CI.
- [ ] A regression check that repeats a short single-seed run and compares with stored values within a tolerance.
Sharing
- [ ] A public repository on a hosting service such as GitHub or GitLab, not only an archive on a lab page.
- [ ] A tagged release for the paper version:
git tag -a v1.0-paper -m "paper version", thengit push origin v1.0-paper. - [ ] An archived snapshot. Tags can be moved or deleted; a service such as Zenodo can archive a release and assign a DOI.
- [ ] An issue tracker, with an honest note about response times such as "best effort".
Beyond the basics
These are not required, but make the code more useful:
- [ ] A container image or Dockerfile, which removes many environment differences (not hardware ones).
- [ ] Continuous integration that runs the smoke test.
- [ ] Pretrained checkpoints attached to releases. Prefer
state_dictfiles that load withtorch.load(..., weights_only=True), because unpickling arbitrary objects can run code. - [ ] A small demo notebook.
- [ ] An FAQ in the README.
What this checklist does not solve
- It does not guarantee identical results across hardware or library versions.
- It does not guarantee long-term reproducibility: years from now, pinned versions may no longer install.
- It does not guarantee that anyone will use your code.
Why this is worth the time
Each item closes a specific gap: a missing seed, version pin, preprocessing script or configuration can each make a result impossible to rerun. You benefit first, when you return to the project after months. Reviewers can check claims without contacting you, and others can build on the work.
FAQ
Q: What if I can't release the data?
A: Document how to obtain it, provide synthetic data that exercises the pipeline, and say that synthetic runs will not reproduce the reported numbers.
Q: What if my model is too large to put in the repository?
A: Host the weights elsewhere, for example on the Hugging Face Hub or Zenodo, link them from the README with a checksum, or provide a smaller variant for verification.
Q: How much testing is necessary?
A: At least one fast smoke test that runs the pipeline end to end. More is useful; none leaves you unable to tell when the release breaks.
Q: What about closed-source dependencies?
A: Name them, state that reproduction depends on access to them, and say how a reviewer might obtain it.
Q: What if a dependency has moved or been deleted?
A: Record the exact version or commit. Vendor a copy only if its license allows redistribution.