Skip to content

Add support for lightning.pytorch and extend optional dependencies for GraphGym #10147

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jherasdo
Copy link

Dear PyG Team,

This PR introduces compatibility with the new lightning package (formerly pytorch_lightning), which is now the actively maintained version of the PyTorch Lightning framework.

Changes Included:

  • Adds fallback import logic to support both lightning.pytorch and the legacy pytorch_lightning, preserving backward compatibility.
  • Updates the graph_gym as-is with pytorch-lightning dependency.
  • Introducing a new optional group graphgym-lightning for users adopting the newer lightning package.

Motivation & Benefits:

  • Ensures GraphGym modules remain functional with current and future Lightning versions.
  • Maintains support for users with legacy setups.
  • Aligns with Lightning AI's latest rebranding and package structure.

Validation:
This compatibility approach has been tested on my own research projects, including multi-modal deep learning models built with PyTorch Geometric and Lightning. The fallback logic and both dependency setups work reliably in real-world scientific workflows.

Let me know if you'd like me to add tests or docs for this update - Happy to help!

@jherasdo jherasdo requested a review from mananshah99 as a code owner March 27, 2025 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant