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

feat(#951): new uncovered_by_rules records filter #991

Merged
merged 9 commits into from
Jan 19, 2022

Conversation

frascuchon
Copy link
Member

This PR includes at API level a filter param for text classification to enable only uncovered records in search results (in addition with other search parameters)

See #951

Copy link
Contributor

@dcfidalgo dcfidalgo left a comment

Choose a reason for hiding this comment

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

Nice! Just a question, did you consider making rules an attribute of the TextClassificationQuery? Seems more natural to me, but maybe there are obstacles I don't see.

src/rubrix/server/tasks/text_classification/api/model.py Outdated Show resolved Hide resolved
src/rubrix/server/tasks/text_classification/api/model.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jan 18, 2022

Codecov Report

Merging #991 (6316d8c) into master (6c743ab) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #991   +/-   ##
=======================================
  Coverage   95.50%   95.50%           
=======================================
  Files         110      110           
  Lines        4247     4250    +3     
=======================================
+ Hits         4056     4059    +3     
  Misses        191      191           
Flag Coverage Δ
pytest 95.50% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...rc/rubrix/client/sdk/text_classification/models.py 100.00% <100.00%> (ø)
...brix/server/tasks/text_classification/api/model.py 99.40% <100.00%> (+<0.01%) ⬆️

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 6c743ab...6316d8c. Read the comment docs.

@frascuchon frascuchon changed the title feat(api): new only_uncovered records filter feat(api): new uncovered_by_rules records filter Jan 18, 2022
@frascuchon frascuchon changed the title feat(api): new uncovered_by_rules records filter feat(#951): new uncovered_by_rules records filter Jan 18, 2022
Copy link
Contributor

@dcfidalgo dcfidalgo left a comment

Choose a reason for hiding this comment

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

💯 Just a few inline suggestions

src/rubrix/client/sdk/text_classification/models.py Outdated Show resolved Hide resolved
src/rubrix/server/tasks/text_classification/api/model.py Outdated Show resolved Hide resolved
src/rubrix/server/tasks/text_classification/api/model.py Outdated Show resolved Hide resolved
@frascuchon frascuchon merged commit 164440b into master Jan 19, 2022
@frascuchon frascuchon deleted the feat/api-uncovered-records-filter branch January 19, 2022 10:01
dvsrepo added a commit that referenced this pull request Jan 25, 2022
* 'master' of https://github.com/recognai/rubrix: (28 commits)
  chore(#994): simplify server start (#1014)
  refactor(#945): elasticsearch index configuration per task (#1018)
  docs(#980): Add majorityvote example to weak supervision guide (#1004)
  fix(#1015): manage emojis in Token Classification records (#1016)
  fix(#1010): fix WeakLabels when not providing rules (#1011)
  fix(Breadcrumbs): Copy text function (#1003)
  fix(statics): handle 404 errors for static files (#1006)
  refactor: Rename 'exclude_missing_annotation' argument for WeakLabels.annotation (#1005)
  docs: update video for spacy ner tutorial (#1000)
  fix(#977) Remove redirection when accessing login (#996)
  feat(#951): new uncovered_by_rules records filter (#991)
  feat(#735): add warning when agent but no prediction/annotation is provided (#987)
  fix(#800): limit number of metadata fields (#993)
  docs: improve annotate records section in web app reference (#985)
  fix(#844) Keep header layout when errors occurred in dataset view (#992)
  fix(#974): display the dropdown in the last record of the scroll (#986)
  refactor: compute common aggregations one by one (#990)
  feat(#953): add additional metrics to `LabelModel.score` method (#979)
  refactor(rules): using labeling rules management with vuex store (#878)
  feat(#955): add default for `rules` in WeakLabels (#976)
  ...
frascuchon added a commit that referenced this pull request Feb 7, 2022
* feat(api): new only_uncovered records filter

* feat: add uncovered_by_rules filter param

* feat(text-class): update query request model

* refactor: configure must_not filters

* test: add missing tests

* revert: list rules prior to generate query

* Apply suggestions from code review

Co-authored-by: David Fidalgo <david@recogn.ai>

* test: add functional test

Co-authored-by: David Fidalgo <david@recogn.ai>
(cherry picked from commit 164440b)
frascuchon pushed a commit that referenced this pull request Feb 17, 2022
feat(#951): Filter uncovered records (#1156)

This PR allows filtering of records by uncovered by rules

* perf: initialize text classification with load rules definition

* chore: remove fetch rules from common filters

* persist uncovered_by_rules filter

* condition and selected filter state

* allow remove from "remove all filters"

* test FilterUncoveredByRules

* uncovered filter display condition

* checkbox label copy

* update snapshot

Co-authored-by: Francisco Aranda <francisco@recogn.ai>
(cherry picked from commit 6510f4c)
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