Skip to content
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

Migrate Codebase to Latest PyTorch Lightning and NumPy #29

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ruddyscent
Copy link

Description:

This PR updates the project to be compatible with the latest version of PyTorch Lightning and NumPy. The key changes include:

  1. Remove Deprecated compute_on_step Argument from Metrics:

    • Updated metric classes to remove the deprecated compute_on_step argument, ensuring they work correctly with the latest TorchMetrics and PyTorch Lightning.
    • Refactored metric initialization and handling to follow current best practices.
  2. Replace Deprecated np.int Usage:

    • Replaced the deprecated use of np.int with the appropriate integer type, ensuring compatibility with newer versions of NumPy.
  3. Update Hyperparameter Handling in TrainingModule:

    • Refactored the TrainingModule class to use self.save_hyperparameters() for managing hyperparameters, replacing the direct assignment of self.hparams. This aligns with the latest PyTorch Lightning guidelines and prevents potential errors.
  4. Migrate Classes to the Latest PyTorch Lightning:

    • Updated several classes and methods to be compatible with the latest PyTorch Lightning API, ensuring smooth operation and future-proofing the codebase.
  5. Add requirements.txt to Specify Project Dependencies:

    • Introduced a requirements.txt file to clearly define and manage the project's dependencies.

Testing:

These changes have been tested and confirmed to work within containers based on the nvcr.io/nvidia/pytorch:24.07-py3 image. This ensures compatibility and smooth integration in the specified environment.

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