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

add ModelManager #66

Merged
merged 1 commit into from
Mar 24, 2023
Merged

add ModelManager #66

merged 1 commit into from
Mar 24, 2023

Conversation

lkeegan
Copy link
Member

@lkeegan lkeegan commented Mar 23, 2023

  • ModelManager features
    • load() imports a spacy model created by DataManager
    • metadata dict exposes metadata the user should edit such as author, license, etc
    • save() saves changes (currently only the updated metadata can be changed)
    • publish() publishes the model to hugging face
  • add test_model_manager notebook with example of use
  • add spacy-huggingface-hub and wheel to dependencies

also

Result from running example notebook with my hugging face API token:

https://huggingface.co/lkeegan/de_test_pipeline

@lkeegan lkeegan force-pushed the model_manager branch 2 times, most recently from 0525285 to 5edfaf8 Compare March 23, 2023 15:30
@codecov
Copy link

codecov bot commented Mar 23, 2023

Codecov Report

Merging #66 (69059dd) into main (e56486a) will increase coverage by 0.68%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #66      +/-   ##
==========================================
+ Coverage   94.79%   95.48%   +0.68%     
==========================================
  Files          15       17       +2     
  Lines         826      952     +126     
==========================================
+ Hits          783      909     +126     
  Misses         43       43              
Impacted Files Coverage Δ
moralization/model_manager.py 100.00% <100.00%> (ø)
moralization/tests/conftest.py 100.00% <100.00%> (ø)
moralization/tests/test_model_manager.py 100.00% <100.00%> (ø)

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

- ModelManager features
  - `load()` imports a spacy model created by DataManager
  - `metadata` dict exposes metadata the user should edit such as author, license, etc
  - `save()` saves changes (currently only the updated metadata can be changed)
  - `publish()` publishes the model to hugging face
- add `test_model_manager` notebook with example of use
- add `spacy-huggingface-hub` and `wheel` to dependencies

also

- refactor tests
  - simplify fixtures code in conftest.py
  - add `model_path` fixture to conftest.py that provides a trained spacy model
- pin ipywidgets<8.0.5 for now to avoid test failures in CI
  - looks like it is due to this change: jupyter-widgets/ipywidgets#3533
@sonarcloud
Copy link

sonarcloud bot commented Mar 24, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Member

@iulusoy iulusoy left a comment

Choose a reason for hiding this comment

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

looks great!

@lkeegan lkeegan merged commit e5341be into main Mar 24, 2023
@lkeegan lkeegan deleted the model_manager branch March 24, 2023 09:59
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