Fix issue #105: test.ipynb fails on fresh setup due to missing pretrained weights and grid artifacts #107
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