IBM / zshot

Zero and Few shot named entity & relationships recognition
https://ibm.github.io/zshot
MIT License
350 stars 20 forks source link

Added possibility of changing pretrained smxm model #37

Closed marmg closed 2 years ago

marmg commented 2 years ago
Status Type ⚠️ Core Change Issue
Ready Feature Yes

Problem

SMXM may have different pre-trained models. Currently only one can be used.

Solution

Add a parameter in the __init__ to allow usage of different models.

Other changes (e.g. bug fixes, small refactors)

codecov[bot] commented 2 years ago

Codecov Report

Base: 92.14% // Head: 92.18% // Increases project coverage by +0.03% :tada:

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

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #37 +/- ## ========================================== + Coverage 92.14% 92.18% +0.03% ========================================== Files 67 67 Lines 2726 2765 +39 ========================================== + Hits 2512 2549 +37 - Misses 214 216 +2 ``` | [Impacted Files](https://codecov.io/gh/IBM/zshot/pull/37?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=IBM) | Coverage Δ | | |---|---|---| | [zshot/linker/linker\_smxm.py](https://codecov.io/gh/IBM/zshot/pull/37/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=IBM#diff-enNob3QvbGlua2VyL2xpbmtlcl9zbXhtLnB5) | `96.77% <100.00%> (+0.10%)` | :arrow_up: | | [...shot/mentions\_extractor/mentions\_extractor\_smxm.py](https://codecov.io/gh/IBM/zshot/pull/37/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=IBM#diff-enNob3QvbWVudGlvbnNfZXh0cmFjdG9yL21lbnRpb25zX2V4dHJhY3Rvcl9zbXhtLnB5) | `100.00% <100.00%> (ø)` | | | [zshot/utils/displacy/displacy.py](https://codecov.io/gh/IBM/zshot/pull/37/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=IBM#diff-enNob3QvdXRpbHMvZGlzcGxhY3kvZGlzcGxhY3kucHk=) | `73.07% <0.00%> (-2.44%)` | :arrow_down: | | [zshot/tests/evaluation/test\_datasets.py](https://codecov.io/gh/IBM/zshot/pull/37/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=IBM#diff-enNob3QvdGVzdHMvZXZhbHVhdGlvbi90ZXN0X2RhdGFzZXRzLnB5) | `100.00% <0.00%> (ø)` | | | [...ot/evaluation/dataset/med\_mentions/med\_mentions.py](https://codecov.io/gh/IBM/zshot/pull/37/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=IBM#diff-enNob3QvZXZhbHVhdGlvbi9kYXRhc2V0L21lZF9tZW50aW9ucy9tZWRfbWVudGlvbnMucHk=) | `100.00% <0.00%> (ø)` | | | [zshot/tests/utils/test\_displacy.py](https://codecov.io/gh/IBM/zshot/pull/37/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=IBM#diff-enNob3QvdGVzdHMvdXRpbHMvdGVzdF9kaXNwbGFjeS5weQ==) | `93.93% <0.00%> (+0.83%)` | :arrow_up: | | [zshot/evaluation/dataset/dataset.py](https://codecov.io/gh/IBM/zshot/pull/37/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=IBM#diff-enNob3QvZXZhbHVhdGlvbi9kYXRhc2V0L2RhdGFzZXQucHk=) | `93.75% <0.00%> (+1.44%)` | :arrow_up: | | [zshot/evaluation/dataset/ontonotes/onto\_notes.py](https://codecov.io/gh/IBM/zshot/pull/37/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=IBM#diff-enNob3QvZXZhbHVhdGlvbi9kYXRhc2V0L29udG9ub3Rlcy9vbnRvX25vdGVzLnB5) | `70.17% <0.00%> (+5.59%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=IBM). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=IBM)

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