Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Add support for Lightning 1.8 + Fixes for the CI #1479

Merged
merged 39 commits into from
Nov 5, 2022
Merged

Conversation

krshrimali
Copy link
Contributor

@krshrimali krshrimali commented Nov 3, 2022

What does this PR do?

Fixes #1481 and adds support for Lightning 1.8

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests? [not needed for typos/docs]
  • Did you verify new and existing tests pass locally with your changes?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

PR review

  • Is this pull request ready for review? (if not, please submit in draft mode)

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

requirements.txt Outdated Show resolved Hide resolved
@@ -128,7 +127,7 @@ jobs:
if: contains( matrix.topic , 'serve' )
run: |
sudo apt-get install libsndfile1
pip install '.[all,audio]' icevision effdet --upgrade
pip install '.[all,audio]' icevision sahi==0.8.19 effdet --upgrade
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why icevision, sahi, effdet are not part of the requirements?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are. We don't need these modules for serve though, but for serve testing we need them. Hence explicit installation. @Borda

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pip install '.[all,audio]' icevision sahi==0.8.19 effdet --upgrade
pip install '.[all,audio,serve]' --upgrade

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but still why all does not include all?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uhmm, because we only need icevision, effdet for the serve tests. And these are in requirements/datatype_image_extras.txt (which has a lot more than we need for serve tests).

So basically:

  • icevision, effdet are not needed for serve in Lightning Flash.
  • icevision, effdet are only needed for "serve tests" in Flash.

Hence the explicit mention of sahi, icevision, effdet (sahi because we need to pin it).

Does that help, @Borda ? Please let me know if you have any questions or suggestions.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still, sahi, icevision, effdet shall be in a requirement file for reproducibility in case you would need to restrict versions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are here: https://github.com/Lightning-AI/lightning-flash/blob/c506d590aebb9e339b159c6aa0d48c97ec1fb733/requirements/datatype_image_extras.txt#L4-L8

And we already use this^ for image.

And this is only temporary, once icevision is fixed for the latest sahi release, this will go.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's do these requirements cleaning in another PR, and lets link this discussion 🦦

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! ^ From an off-line discussion with @Borda, I fully agree that we should make reproducible environments for users to have the same testing environment as the CI. Nobody will read the CI dependencies to figure out why it fails in the CI.

So, we'll do something similar to what TorchMetrics has: https://github.com/Lightning-AI/metrics/tree/master/requirements

I'll make a PR and link the discussion here. Thank you, @Borda!!

@codecov
Copy link

codecov bot commented Nov 4, 2022

Codecov Report

Base: 71.32% // Head: 86.33% // Increases project coverage by +15.00% 🎉

Coverage data is based on head (c506d59) compared to base (58ee3a7).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #1479       +/-   ##
===========================================
+ Coverage   71.32%   86.33%   +15.00%     
===========================================
  Files         292      292               
  Lines       13079    13158       +79     
===========================================
+ Hits         9329    11360     +2031     
+ Misses       3750     1798     -1952     
Flag Coverage Δ
pytest 13.03% <100.00%> (?)
tpu 13.03% <100.00%> (?)
unittests 86.83% <100.00%> (+15.50%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
flash/core/trainer.py 88.52% <100.00%> (+3.65%) ⬆️
flash/core/utilities/imports.py 94.15% <100.00%> (+0.03%) ⬆️
flash/image/segmentation/cli.py 83.33% <0.00%> (-16.67%) ⬇️
flash/pointcloud/detection/cli.py 83.33% <0.00%> (-16.67%) ⬇️
flash/pointcloud/segmentation/cli.py 83.33% <0.00%> (-16.67%) ⬇️
flash/audio/speech_recognition/cli.py 83.33% <0.00%> (-16.67%) ⬇️
flash/audio/classification/cli.py 84.61% <0.00%> (-15.39%) ⬇️
flash/tabular/classification/cli.py 84.61% <0.00%> (-15.39%) ⬇️
flash/image/style_transfer/cli.py 85.71% <0.00%> (-14.29%) ⬇️
flash/graph/classification/cli.py 80.00% <0.00%> (-12.31%) ⬇️
... and 99 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@krshrimali krshrimali changed the title Debug with Lightning 1.8 Add support for Lightning 1.8 + Fixes for the CI Nov 4, 2022
@krshrimali krshrimali self-assigned this Nov 4, 2022
@krshrimali krshrimali added this to the 0.8.x milestone Nov 4, 2022
@krshrimali krshrimali enabled auto-merge (squash) November 5, 2022 08:50
@krshrimali krshrimali merged commit 6e95997 into master Nov 5, 2022
@krshrimali krshrimali deleted the debug-lightning-18 branch November 5, 2022 09:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ModuleNotFoundError: No module named 'sahi.model'
3 participants