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

Fix package build dependencies #20015

Merged
merged 4 commits into from
Jun 25, 2024
Merged

Conversation

awaelchli
Copy link
Contributor

@awaelchli awaelchli commented Jun 25, 2024

What does this PR do?

  1. Limits the max version of the package build dependencies such that external version updates don't compromise our CI stability. This recently happened here: Add atomic save to checkpoint routine #20011, https://github.com/Lightning-AI/pytorch-lightning/actions/runs/9668066713/job/26671522244?pr=20011

    Traceback (most recent call last):
      File "/opt/hostedtoolcache/Python/3.9.19/x64/bin/twine", line 5, in <module>
        from twine.__main__ import main
      File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/twine/__init__.py", line 43, in <module>
        __license__ = metadata["license"]
      File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/importlib_metadata/_adapters.py", line 54, in __getitem__
        raise KeyError(item)
    KeyError: 'license'
    

    Because the twine package has a dependency on importlib-metadata which brought an update.

  2. Restricts the NumPy package since deepdiff is not compatible with numpy 2.0:

    tests_app/conftest.py:13: in <module>
        from lightning_app.core import constants
    ../src/lightning_app/__init__.py:33: in <module>
        from lightning_app.core.app import LightningApp  # noqa: E402
    ../src/lightning_app/core/__init__.py:1: in <module>
        from lightning_app.core.app import LightningApp
    ../src/lightning_app/core/app.py:25: in <module>
        from deepdiff import DeepDiff, Delta
    ../../../../hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/deepdiff/__init__.py:10: in <module>
        from .diff import DeepDiff
    ../../../../hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/deepdiff/diff.py:19: in <module>
        from deepdiff.helper import (strings, bytes_type, numbers, uuids, datetimes, ListItemRemovedOrAdded, notpresent,
    ../../../../hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/deepdiff/helper.py:67: in <module>
        np_float_ = np.float_
    ../../../../hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/numpy/__init__.py:[39](https://github.com/Lightning-AI/pytorch-lightning/actions/runs/9668637901/job/26673295463?pr=20015#step:16:40)7: in __getattr__
        raise AttributeError(
    E   AttributeError: `np.float_` was removed in the NumPy 2.0 release. Use `np.float64` instead.
    

cc @carmocca @Borda

@awaelchli awaelchli added the ci Continuous Integration label Jun 25, 2024
@awaelchli awaelchli added this to the 2.3.x milestone Jun 25, 2024
@github-actions github-actions bot added the dependencies Pull requests that update a dependency file label Jun 25, 2024
Copy link
Contributor

github-actions bot commented Jun 25, 2024

⚡ Required checks status: All passing 🟢

Groups summary

🟢 lightning_app: Tests workflow
Check ID Status
app-pytest (macOS-11, lightning, 3.8, latest) success
app-pytest (macOS-11, lightning, 3.8, oldest) success
app-pytest (macOS-11, app, 3.9, latest) success
app-pytest (macOS-12, app, 3.11, latest) success
app-pytest (ubuntu-20.04, lightning, 3.8, latest) success
app-pytest (ubuntu-20.04, lightning, 3.8, oldest) success
app-pytest (ubuntu-20.04, app, 3.9, latest) success
app-pytest (ubuntu-22.04, app, 3.11, latest) success
app-pytest (windows-2022, lightning, 3.8, latest) success
app-pytest (windows-2022, lightning, 3.8, oldest) success
app-pytest (windows-2022, app, 3.8, latest) success
app-pytest (windows-2022, app, 3.11, latest) success

These checks are required after the changes to requirements/app/app.txt.

🟢 lightning_app: Examples
Check ID Status
app-examples (macOS-11, lightning, 3.9, latest) success
app-examples (macOS-11, lightning, 3.9, oldest) success
app-examples (macOS-11, app, 3.9, latest) success
app-examples (ubuntu-20.04, lightning, 3.9, latest) success
app-examples (ubuntu-20.04, lightning, 3.9, oldest) success
app-examples (ubuntu-20.04, app, 3.9, latest) success
app-examples (windows-2022, lightning, 3.9, latest) success
app-examples (windows-2022, lightning, 3.9, oldest) success
app-examples (windows-2022, app, 3.9, latest) success

These checks are required after the changes to requirements/app/app.txt.

🟢 lightning_app: Docs
Check ID Status
docs-make (app, doctest) success
docs-make (app, html) success

These checks are required after the changes to requirements/app/app.txt.

🟢 mypy
Check ID Status
mypy success

These checks are required after the changes to requirements/app/app.txt, requirements/ci.txt.

🟢 install
Check ID Status
install-pkg (ubuntu-22.04, app, 3.8) success
install-pkg (ubuntu-22.04, app, 3.11) success
install-pkg (ubuntu-22.04, fabric, 3.8) success
install-pkg (ubuntu-22.04, fabric, 3.11) success
install-pkg (ubuntu-22.04, pytorch, 3.8) success
install-pkg (ubuntu-22.04, pytorch, 3.11) success
install-pkg (ubuntu-22.04, lightning, 3.8) success
install-pkg (ubuntu-22.04, lightning, 3.11) success
install-pkg (ubuntu-22.04, notset, 3.8) success
install-pkg (ubuntu-22.04, notset, 3.11) success
install-pkg (macOS-12, app, 3.8) success
install-pkg (macOS-12, app, 3.11) success
install-pkg (macOS-12, fabric, 3.8) success
install-pkg (macOS-12, fabric, 3.11) success
install-pkg (macOS-12, pytorch, 3.8) success
install-pkg (macOS-12, pytorch, 3.11) success
install-pkg (macOS-12, lightning, 3.8) success
install-pkg (macOS-12, lightning, 3.11) success
install-pkg (macOS-12, notset, 3.8) success
install-pkg (macOS-12, notset, 3.11) success
install-pkg (windows-2022, app, 3.8) success
install-pkg (windows-2022, app, 3.11) success
install-pkg (windows-2022, fabric, 3.8) success
install-pkg (windows-2022, fabric, 3.11) success
install-pkg (windows-2022, pytorch, 3.8) success
install-pkg (windows-2022, pytorch, 3.11) success
install-pkg (windows-2022, lightning, 3.8) success
install-pkg (windows-2022, lightning, 3.11) success
install-pkg (windows-2022, notset, 3.8) success
install-pkg (windows-2022, notset, 3.11) success

These checks are required after the changes to requirements/app/app.txt, requirements/ci.txt.


Thank you for your contribution! 💜

Note
This comment is automatically generated and updates for 60 minutes every 180 seconds. If you have any other questions, contact carmocca for help.

@github-actions github-actions bot added the app (removed) Generic label for Lightning App package label Jun 25, 2024
Copy link

codecov bot commented Jun 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81%. Comparing base (55b95f2) to head (12f691b).
Report is 80 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master   #20015     +/-   ##
=========================================
- Coverage      84%      81%     -3%     
=========================================
  Files         426      426             
  Lines       35296    35296             
=========================================
- Hits        29695    28692   -1003     
- Misses       5601     6604   +1003     

@awaelchli awaelchli merged commit d0d01d3 into master Jun 25, 2024
164 checks passed
@awaelchli awaelchli deleted the ci/fix-package-build-dependencies branch June 25, 2024 22:44
awaelchli added a commit that referenced this pull request Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app (removed) Generic label for Lightning App package ci Continuous Integration dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants