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

refactor(rules): using labeling rules management with vuex store #878

Merged
merged 35 commits into from
Jan 17, 2022

Conversation

frascuchon
Copy link
Member

@frascuchon frascuchon commented Jan 5, 2022

This PR changes app interactions for labeling rules management. Rules and metrics are stored in vuex store and components use the store for communication. Reduce drastically the number of calls done to api server and improve overall performance.

@leiyre take a look carefully since a lot of changes was made.

@frascuchon frascuchon changed the title wip refactor(rules): using labeling rules management with vuex store Jan 5, 2022
@frascuchon frascuchon force-pushed the refactor/using-store-for-rules-management branch from a35569b to 41ef6c5 Compare January 5, 2022 17:40
@frascuchon frascuchon force-pushed the refactor/using-store-for-rules-management branch from 41ef6c5 to 360823a Compare January 5, 2022 23:26
@frascuchon frascuchon marked this pull request as ready for review January 5, 2022 23:26
@frascuchon frascuchon requested a review from leiyre January 5, 2022 23:26
@frascuchon frascuchon added app type: enhancement Indicates new feature requests labels Jan 5, 2022
@codecov
Copy link

codecov bot commented Jan 13, 2022

Codecov Report

Merging #878 (6489709) into master (fb67c58) will increase coverage by 0.00%.
The diff coverage is n/a.

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

@@           Coverage Diff           @@
##           master     #878   +/-   ##
=======================================
  Coverage   95.50%   95.51%           
=======================================
  Files         109      109           
  Lines        4208     4212    +4     
=======================================
+ Hits         4019     4023    +4     
  Misses        189      189           
Flag Coverage Δ
pytest 95.51% <ø> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...rubrix/labeling/text_classification/weak_labels.py 100.00% <0.00%> (ø)
...ubrix/labeling/text_classification/label_models.py 100.00% <0.00%> (ø)
src/rubrix/server/datasets/dao.py 97.77% <0.00%> (+0.02%) ⬆️

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 fb67c58...56b140f. Read the comment docs.

Copy link
Member

@leiyre leiyre left a comment

Choose a reason for hiding this comment

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

Much better, please check my latest changes

Copy link
Member Author

@frascuchon frascuchon left a comment

Choose a reason for hiding this comment

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

  • We must compute number of affected records when a query is defined(before select label)
  • The update metrics button should refresh dataset rules too (getch rules changes from server in order to compute metrics properly)

@frascuchon frascuchon requested a review from leiyre January 17, 2022 08:50
@frascuchon frascuchon merged commit c40af4f into master Jan 17, 2022
@frascuchon frascuchon deleted the refactor/using-store-for-rules-management branch January 17, 2022 15:57
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 pushed a commit that referenced this pull request Feb 2, 2022
* feat(app): using vuex store for labeling rules

* fix lint

* fix merge conflict

* fix initialize

* remove description param

* fix rebase conflict

* fix "Save rule" condition

* calc precision average any rule has not precision

* fix rebase conflict

* set field for search rule

* fix lint

* clean unused data

* remove unused data

* get updated rules when updating summary

* fix check if rule exist

* get rule info when saving/updating

* clean up

* set active rule when refreshing page

* active label when the query has an associated rule

* fix lint

* clean unused watch

* computed rules condition

* fetch if rules are empty

* fix: await method and fetch rules

* remove --fixed class when destroyed

* show 0 for empty rules overall metrics

* fix lint

* fix: show rule was saved after save a rule

* show non labelled rule metrics

* refresh rules when updating rules summary

* update metrics when rule is saved and other label is selected

* fix: show active label when changing query

* fix: prevent undefined metrics error

Co-authored-by: leiyre <leire@recogn.ai>

(cherry picked from commit c40af4f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Indicates new feature requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants