build validation script, and cleaned-up major issues#72
Open
jsenellart wants to merge 3 commits into
Open
Conversation
Contributor
Author
|
remaining issues that will need to be fixed by reproducers:
|
There was a problem hiding this comment.
Pull request overview
Adds a repository-level validator to enforce the expected papers/<name>/... reproduction layout, and cleans up artifact hygiene by moving nearest_centroids_merlin run outputs to outdir/ while removing previously committed generated results/run_* directories.
Changes:
- Add
scripts/check_paper_structure.pyand wire it into pre-commit as a local hook. - Update
nearest_centroids_merlinconfigs to write tooutdir/and remove committed generatedresults/run_*artifacts. - Update contribution docs + template to reflect/align with the validator and recommended structure.
Reviewed changes
Copilot reviewed 30 out of 35 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/check_paper_structure.py | New paper-structure validation script (required/recommended entries, JSON validation, results/run_* rejection). |
| .pre-commit-config.yaml | Adds local pre-commit hook to run the paper-structure validator on staged files. |
| how_to_contribute.md | Documents required vs recommended layout, multi-part papers, and validator usage. |
| .gitignore | Ignores work/ directory at repo root. |
| papers/reproduction_template/.gitignore | Adds template-level ignores (incl. outdir/) to match recommended hygiene. |
| papers/reproduction_template/results/.gitkeep | Ensures results/ exists in the template. |
| papers/nearest_centroids_merlin/utils/.gitkeep | Ensures utils/ is present even when empty. |
| papers/nearest_centroids_merlin/results/.gitkeep | Ensures results/ directory exists after removing generated runs. |
| papers/nearest_centroids_merlin/configs/defaults.json | Switch default outdir from results to outdir. |
| papers/nearest_centroids_merlin/configs/mnist_0v1.json | Switch outdir from results to outdir. |
| papers/nearest_centroids_merlin/configs/mnist_2v7.json | Switch outdir from results to outdir. |
| papers/nearest_centroids_merlin/configs/mnist_4class.json | Switch outdir from results to outdir. |
| papers/nearest_centroids_merlin/configs/mnist_10class.json | Switch outdir from results to outdir. |
| papers/nearest_centroids_merlin/configs/iris_ns100.json | Switch outdir from results to outdir. |
| papers/nearest_centroids_merlin/configs/iris_ns500.json | Switch outdir from results to outdir. |
| papers/nearest_centroids_merlin/configs/iris_ns1000.json | Switch outdir from results to outdir. |
| papers/nearest_centroids_merlin/configs/synthetic_4q_2c.json | Switch outdir from results to outdir. |
| papers/nearest_centroids_merlin/configs/synthetic_4q_4c.json | Switch outdir from results to outdir. |
| papers/nearest_centroids_merlin/configs/synthetic_8q_2c.json | Switch outdir from results to outdir. |
| papers/nearest_centroids_merlin/configs/synthetic_8q_4c.json | Switch outdir from results to outdir. |
| papers/nearest_centroids_merlin/results/run_20251205-114409/summary_results.json | Removes committed generated run artifact under results/run_*. |
| papers/nearest_centroids_merlin/results/run_20251205-114409/run.log | Removes committed generated run artifact under results/run_*. |
| papers/nearest_centroids_merlin/results/run_20251205-114409/results_0_1_2_3.json | Removes committed generated run artifact under results/run_*. |
| papers/nearest_centroids_merlin/results/run_20251205-114409/figures/label_table_classes_0_1_2_3.txt | Removes committed generated run artifact under results/run_*. |
| papers/nearest_centroids_merlin/results/run_20251205-114409/done.txt | Removes committed generated run artifact under results/run_*. |
| papers/nearest_centroids_merlin/results/run_20251205-114409/config_snapshot.json | Removes committed generated run artifact under results/run_*. |
| papers/nearest_centroids_merlin/results/run_20251205-113816/run.log | Removes committed generated run artifact under results/run_*. |
| papers/nearest_centroids_merlin/results/run_20251205-113816/results_2_7.json | Removes committed generated run artifact under results/run_*. |
| papers/nearest_centroids_merlin/results/run_20251205-113816/results_0_1_2_3.json | Removes committed generated run artifact under results/run_*. |
| papers/nearest_centroids_merlin/results/run_20251205-113816/results_0_1.json | Removes committed generated run artifact under results/run_*. |
| papers/nearest_centroids_merlin/results/run_20251205-113816/config_snapshot.json | Removes committed generated run artifact under results/run_*. |
| papers/nearest_centroids_merlin/results/run_20251205-113343/run.log | Removes committed generated run artifact under results/run_*. |
| papers/nearest_centroids_merlin/results/run_20251205-113343/config_snapshot.json | Removes committed generated run artifact under results/run_*. |
| papers/nearest_centroids_merlin/results/run_20251205-112507/run.log | Removes committed generated run artifact under results/run_*. |
| papers/nearest_centroids_merlin/results/run_20251205-112507/config_snapshot.json | Removes committed generated run artifact under results/run_*. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| print(f" WARN: {issue}") | ||
|
|
||
|
|
||
| def main(argv: list[str] | None = None) -> int: |
|
|
||
|
|
||
| def main(argv: list[str] | None = None) -> int: | ||
| args = parse_args(argv or sys.argv[1:]) |
Comment on lines
+108
to
+112
| path = Path(raw_path) | ||
| parts = path.parts | ||
| if len(parts) < 2 or parts[0] != "papers": | ||
| continue | ||
| root_name = parts[1] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes output-directory hygiene and adds repo-level paper-structure validation.
It updates nearest_centroids_merlin configs to write run artifacts to outdir/ instead of results/, removes committed generated results/run_* artifacts there, and adds a pre-commit validator that checks paper layout against the contribution conventions. The validator supports nested multi-part papers such as fock_state_expressivity/PARTX, treats .gitignore, models/, and results/ as recommended rather than required, and now rejects any committed run_* directory anywhere under a paper’s results/ tree.
It also updates how_to_contribute.md to document the validator usage, required vs recommended structure entries, and the multi-part paper layout, and brings papers/reproduction_template in line with the recommended structure by adding .gitignore and results/.