Fix issue #105: test.ipynb fails on fresh setup due to missing pretrained weights and grid artifacts#107
Open
iamsarvrath wants to merge 1 commit intoML4SCI:mainfrom
Conversation
…ipynb - Add file validation cell in test.ipynb that checks for all required files - Define GRID_MATRICES_DIR variable to fix undefined variable error - Add clear error messages with instructions when files are missing - Update README.md with prerequisites and instructions for running test.ipynb - Document how to obtain vdl_weights.pt and regenerate grid matrices
|
Thanks for the thorough fix and clear documentation! The setup cell and README updates address the issue perfectly and will make Really appreciate you taking this up so quickly. |
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.
Fix issue #105: test.ipynb fails on fresh setup due to missing pretrained weights and grid artifacts
Problem
When running
test.ipynbon a fresh environment, the notebook fails withFileNotFoundErrorwhen attempting to load pretrained artifacts that are not present in the repository. The README did not document where these files should be obtained from, whether they are pretrained or generated locally, or what steps a new user should follow to runtest.ipynbend-to-end.Solution
This PR addresses the issue by:
test.ipynbthat checks for all required files before attempting to load themChanges Made
test.ipynbimport osto support file path operationsGRID_MATRICES_DIR = 'grid_matrices'to fix the undefined variable errorgrid_matrices/directory:scatter_to_log_128.ptforward_from_log_128.ptscatter_from_log_128.ptsparse_grid_fracs_euclid_backward.ptvdl_weights.pttorch.load()calls to useos.path.join(GRID_MATRICES_DIR, ...)for correct path resolution to thegrid_matrices/subdirectoryREADME.mdvdl_weights.pt:python train.py --exp-name vdlcreate_log_grid.ipynb→ generatesscatter_to_log_128.ptcreate_log_forward_grid.ipynb→ generatesforward_from_log_128.ptcreate_log_crop_grid.ipynb→ generatesscatter_from_log_128.ptcreate_backward_grid.ipynb→ generatessparse_grid_fracs_euclid_backward.ptExpected Behavior After This Fix
New contributors will now:
test.ipynbafter following the documented setup stepsTesting
grid_matrices/subdirectoryRelated Issue
Fixes #105