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

Breakdown extras #372

Merged
merged 7 commits into from
Oct 29, 2021
Merged

Conversation

aCampello
Copy link
Contributor

@aCampello aCampello commented Oct 29, 2021

Description

Fixes #366.

In particular, this reduces the "vanilla" environment to 109MB and the all environment to about 2.1GB.

It makes a bit more complicated to add new functionality. When you import something you need to check which extra it is part of, and throw the correct error message. Maybe in the future we can automate that, but for now it is fine.

The idea is that this will encourage people to use io functionalities, but also potentially EPMC api wrapper, dataset downloaders etc.

How to review:

Check setup.py and README.md and then really just skim through the rest.

Checklist

  • Added link to Github issue or Notion card
  • Added tests

@aCampello aCampello changed the title Modify tox Breakdown extras Oct 29, 2021
@codecov-commenter
Copy link

codecov-commenter commented Oct 29, 2021

Codecov Report

Merging #372 (dfcbf91) into main (2f2eb6c) will decrease coverage by 56.52%.
The diff coverage is 78.44%.

❗ Current head dfcbf91 differs from pull request most recent head 03b32bd. Consider uploading reports for the commit 03b32bd to get more accurate results
Impacted file tree graph

@@             Coverage Diff             @@
##             main     #372       +/-   ##
===========================================
- Coverage   84.78%   28.25%   -56.53%     
===========================================
  Files          42       42               
  Lines        2576     2651       +75     
===========================================
- Hits         2184      749     -1435     
- Misses        392     1902     +1510     
Impacted Files Coverage Δ
wellcomeml/ml/attention.py 37.50% <0.00%> (-25.00%) ⬇️
wellcomeml/utils.py 89.65% <33.33%> (-6.90%) ⬇️
wellcomeml/ml/spacy_entity_linking.py 20.22% <66.66%> (-60.24%) ⬇️
wellcomeml/ml/spacy_knowledge_base.py 21.33% <66.66%> (-48.53%) ⬇️
wellcomeml/spacy/spacy_doc_to_prodigy.py 36.36% <66.66%> (-53.64%) ⬇️
wellcomeml/metrics/ner_classification_report.py 20.68% <71.42%> (-79.32%) ⬇️
wellcomeml/ml/sent2vec_vectorizer.py 36.00% <71.42%> (-39.00%) ⬇️
wellcomeml/ml/vectorizer.py 33.33% <71.42%> (-57.58%) ⬇️
wellcomeml/metrics/f1.py 38.09% <75.00%> (-55.24%) ⬇️
wellcomeml/ml/keras_utils.py 24.41% <75.00%> (-44.63%) ⬇️
... and 46 more

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 2f2eb6c...03b32bd. Read the comment docs.

@aCampello aCampello marked this pull request as ready for review October 29, 2021 12:14
Copy link
Contributor

@ivyleavedtoadflax ivyleavedtoadflax left a comment

Choose a reason for hiding this comment

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

This looks great. I see what you mean about the errors, but i think what you have done looks good 👍

@nsorros
Copy link
Contributor

nsorros commented Oct 29, 2021

@aCampello this is super, awesome contributions, much kudos 👍 👍 🚀

@ivyleavedtoadflax
Copy link
Contributor

Codecov Report

Merging #372 (dfcbf91) into main (2f2eb6c) will decrease coverage by 56.52%.
The diff coverage is 78.44%.

exclamation Current head dfcbf91 differs from pull request most recent head 03b32bd. Consider uploading reports for the commit 03b32bd to get more accurate results
Impacted file tree graph

@@             Coverage Diff             @@
##             main     #372       +/-   ##
===========================================
- Coverage   84.78%   28.25%   -56.53%     
===========================================
  Files          42       42               
  Lines        2576     2651       +75     
===========================================
- Hits         2184      749     -1435     
- Misses        392     1902     +1510     

Impacted Files Coverage Δ
wellcomeml/ml/attention.py 37.50% <0.00%> (-25.00%)
wellcomeml/utils.py 89.65% <33.33%> (-6.90%)
wellcomeml/ml/spacy_entity_linking.py 20.22% <66.66%> (-60.24%)
wellcomeml/ml/spacy_knowledge_base.py 21.33% <66.66%> (-48.53%)
wellcomeml/spacy/spacy_doc_to_prodigy.py 36.36% <66.66%> (-53.64%)
wellcomeml/metrics/ner_classification_report.py 20.68% <71.42%> (-79.32%)
wellcomeml/ml/sent2vec_vectorizer.py 36.00% <71.42%> (-39.00%)
wellcomeml/ml/vectorizer.py 33.33% <71.42%> (-57.58%)
wellcomeml/metrics/f1.py 38.09% <75.00%> (-55.24%)
wellcomeml/ml/keras_utils.py 24.41% <75.00%> (-44.63%)
... and 46 more
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 2f2eb6c...03b32bd. Read the comment docs.

hang on a minute, what happened here? This looked good a minute ago

@aCampello
Copy link
Contributor Author

Some usual codecov weirdness with the GitHub action that we get from time to time. If we go to the actual link, it tells that it doesn't change much

https://app.codecov.io/gh/wellcometrust/WellcomeML/pulls?page=1&state=open&order=-pullid

@aCampello aCampello merged commit 2ebbdc5 into main Oct 29, 2021
@aCampello aCampello deleted the feature/add-more-extras-and-more-error-messages branch October 29, 2021 13:08
@nsorros
Copy link
Contributor

nsorros commented Oct 29, 2021

No excuse not to use WellcomeML @ivyleavedtoadflax, let's use it more over at Mantis as well :)

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.

Make WellcomeML light to install
4 participants