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

Use uv for dev and CI environments #1625

Merged

Conversation

guarin
Copy link
Contributor

@guarin guarin commented Aug 7, 2024

Changes

  • Use uv for dev and CI environments
  • Make library compatible with torch 1.10, torchvision 0.11, and pytorch lightning 1.6
  • Add optional matplotlib dependency
  • Remove unused minimal dependencies
  • Only import from numpy.typing when type checking to keep backwards compatibility with old numpy versions

This PR does not change the minimal required dependencies to use the package. In the future we should make a breaking change that moves the torch, torchvision, and pytorch lightning dependencies from minimal to the main dependencies.

The PR contains quite a lot of smaller changes that were necessary to get everything working using uv and CI. I left comments to explain the changes.

This PR also fixes the issue regarding numpy versions from #1490

Copy link

codecov bot commented Aug 7, 2024

Codecov Report

Attention: Patch coverage is 53.84615% with 12 lines in your changes missing coverage. Please review.

Project coverage is 84.71%. Comparing base (898c171) to head (ae70b5b).

Files Patch % Lines
lightly/loss/wmse_loss.py 57.14% 3 Missing ⚠️
lightly/utils/embeddings_2d.py 0.00% 3 Missing ⚠️
lightly/utils/debug.py 0.00% 2 Missing ⚠️
lightly/api/api_workflow_selection.py 75.00% 1 Missing ⚠️
lightly/embedding/embedding.py 75.00% 1 Missing ⚠️
lightly/models/utils.py 0.00% 1 Missing ⚠️
lightly/utils/io.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1625      +/-   ##
==========================================
- Coverage   85.70%   84.71%   -1.00%     
==========================================
  Files         150      150              
  Lines        6387     6403      +16     
==========================================
- Hits         5474     5424      -50     
- Misses        913      979      +66     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@guarin guarin marked this pull request as ready for review August 7, 2024 15:33
@guarin guarin merged commit ff730e2 into master Aug 8, 2024
11 of 13 checks passed
@guarin guarin deleted the guarin-lig-5331-lightly-ssl-use-uv-for-dev-environments branch August 8, 2024 08:11
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.

2 participants