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

Support latest version of BaaL (1.5.2) and add necessary utilities #1315

Merged
merged 13 commits into from
May 6, 2022

Conversation

krshrimali
Copy link
Contributor

@krshrimali krshrimali commented Apr 28, 2022

What does this PR do?

Fixes #1297.

This PR attempts to add support for latest version of BaaL. PR: baal-org/baal#194 changed the way dropout layers were changed. Please also note that vissl dependencies were in conflict with BaaL, because of the way vissl decided to be way too strict with its requirements. Following error is raised when attempting to install BaaL with vissl:

The conflict is caused by:

    baal 1.5.2 depends on numpy<2.0.0 and >=1.21.2
    vissl 0.1.6 depends on numpy==1.19.5
    vissl 0.1.5 depends on faiss>=1.5.3
    vissl 0.1.4 depends on faiss>=1.5.3
    vissl 0.1.3 depends on faiss==1.5.3
    vissl 0.1.2 depends on opencv-python==3.4.2.17

The solution I'm proposing is to have a separate requirements file for BaaL. Locally, it will still raise some errors but BaaL will still be installed with warnings for conflicts (NumPy and scikit-learn).

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 🙃

cc: @ethanwharris

@krshrimali krshrimali added tests / CI Tests and continuous integration bug / fix Something isn't working labels Apr 28, 2022
@codecov
Copy link

codecov bot commented Apr 28, 2022

Codecov Report

Merging #1315 (534d097) into master (07d63e3) will decrease coverage by 0.00%.
The diff coverage is 88.23%.

@@            Coverage Diff             @@
##           master    #1315      +/-   ##
==========================================
- Coverage   91.47%   91.47%   -0.01%     
==========================================
  Files         287      287              
  Lines       12881    12892      +11     
==========================================
+ Hits        11783    11793      +10     
- Misses       1098     1099       +1     
Flag Coverage Δ
unittests 91.47% <88.23%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
.../image/classification/integrations/baal/dropout.py 92.30% <85.71%> (-2.94%) ⬇️
flash/core/utilities/imports.py 91.42% <90.00%> (-0.29%) ⬇️
...ash/image/classification/integrations/baal/data.py 87.85% <0.00%> (-0.94%) ⬇️
...ash/image/classification/integrations/baal/loop.py 94.92% <0.00%> (ø)
flash/text/question_answering/collate.py 97.64% <0.00%> (+2.35%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 07d63e3...534d097. Read the comment docs.

@ethanwharris ethanwharris added this to the 0.7.x milestone May 5, 2022
Copy link
Collaborator

@ethanwharris ethanwharris left a comment

Choose a reason for hiding this comment

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

Getting there 😃 Couple of suggestions / comments

flash/core/utilities/imports.py Outdated Show resolved Hide resolved
.github/workflows/ci-testing.yml Outdated Show resolved Hide resolved
Copy link
Collaborator

@ethanwharris ethanwharris left a comment

Choose a reason for hiding this comment

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

LGTM 😃

@ethanwharris ethanwharris enabled auto-merge (squash) May 6, 2022 10:29
@ethanwharris ethanwharris disabled auto-merge May 6, 2022 11:41
@ethanwharris ethanwharris merged commit 88227d8 into master May 6, 2022
@ethanwharris ethanwharris deleted the baal_integration/req_1 branch May 6, 2022 11:41
ethanwharris added a commit that referenced this pull request May 11, 2022
…1315)

Co-authored-by: Ethan Harris <ethanwharris@gmail.com>
ethanwharris added a commit that referenced this pull request May 11, 2022
…1315)

Co-authored-by: Ethan Harris <ethanwharris@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug / fix Something isn't working tests / CI Tests and continuous integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot import BaaL integrations
2 participants