Fix compatibility with newer PyTorch Lightning, torch_geometric, and SciPy#1
Open
supergolem wants to merge 1 commit into
Open
Fix compatibility with newer PyTorch Lightning, torch_geometric, and SciPy#1supergolem wants to merge 1 commit into
supergolem wants to merge 1 commit into
Conversation
…SciPy - abstract_datatype.py: replace removed LightningDataset (torch_geometric) with pl.LightningDataModule; fix validation hook name validation_dataloader -> val_dataloader (correct PL API); add None guard for missing val dataset - setup.py: use check_val_every_n_epoch=None (not 0) to disable validation in newer PL; add num_sanity_val_steps=0 when validation is off - evaluation_statistics.py: drop return_sensitivity=True which raises ValueError in newer SciPy versions; catch ValueError alongside LinAlgError - MERFISH_mouse_cortex.ipynb: restore relative data path, remove machine-specific training cell, clear execution outputs Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Changes
utils/data/abstract_datatype.pyLightningDataset(torch_geometric) has been removed in newer versions.pl.LightningDataModulewith manual dataloader wiring.validation_dataloader->val_dataloader(the original was silently never called by PyTorch Lightning).
Noneguard so the module works when no validation set is provided.utils/diffusion_model/setup/setup.pycheck_val_every_n_epoch=0no longer disables validation in newer PL —changed to
None.num_sanity_val_steps=0to suppress the sanity check when validation is disabled.metrics/evaluation_statistics.pyreturn_sensitivity=TrueraisesValueErrorin newer SciPy versions(documented in the README as "use SciPy 1.9.1").
ValueErrorexplicitly.example/MERFISH_mouse_cortex.ipynbTested on Python 3.10, PyTorch 2.x, PyTorch Lightning 2.x, torch_geometric 2.x.