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

fix: LSDV-5222: custom weights reset following labeling interface changes #4611

Merged
merged 6 commits into from
Aug 14, 2023

Conversation

dredivaris
Copy link
Contributor

PR fulfills these requirements

  • Commit message(s) and PR title follows the format [fix|feat|ci|chore|doc]: TICKET-ID: Short description of change made ex. fix: DEV-XXXX: Removed inconsistent code usage causing intermittent errors
  • Tests for the changes have been added/updated (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)
  • Best efforts were made to ensure docs/code are concise and coherent (checked for spelling/grammatical errors, commented out code, debug logs etc.)
  • Self-reviewed and ran all changes on a local instance (for bug fixes/features)

Change has impacts in these area(s)

(check all that apply)

  • Product design
  • Backend (Database)
  • Backend (API)
  • Frontend

What does this fix?

When custom weight is set to zero and anything is changed in the labeling interface, the custom weight is reset to 1.0. This is because a check in the code interprets zero as False.

What is the new behavior?

The fix it to update the check to only interpret None as not set (0 will now qualify as being set and not trigger an update to the default).

Does this PR introduce a breaking change?

(check only one)

  • Yes, and covered entirely by feature flag(s)
  • Yes, and covered partially by feature flag(s)
  • No
  • Not sure (briefly explain the situation below)

What level of testing was included in the change?

(check all that apply)

  • e2e
  • integration
  • unit

Which logical domain(s) does this change affect?

Labeling Interface / Custom Weights

@netlify
Copy link

netlify bot commented Aug 7, 2023

Deploy Preview for label-studio-docs-new-theme canceled.

Name Link
🔨 Latest commit 0937b17
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-docs-new-theme/deploys/64d53e4391afd000081465d4

@netlify
Copy link

netlify bot commented Aug 7, 2023

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit 0937b17
🔍 Latest deploy log https://app.netlify.com/sites/heartex-docs/deploys/64d53e432599d000085f54f1

@codecov
Copy link

codecov bot commented Aug 7, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.08% 🎉

Comparison is base (1931354) 75.73% compared to head (0937b17) 75.81%.
Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4611      +/-   ##
===========================================
+ Coverage    75.73%   75.81%   +0.08%     
===========================================
  Files          157      157              
  Lines        12457    12466       +9     
===========================================
+ Hits          9434     9451      +17     
+ Misses        3023     3015       -8     

see 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dredivaris dredivaris changed the title Fix: LSDV-5222: custom weights reset following labeling interface changes fix: LSDV-5222: custom weights reset following labeling interface changes Aug 10, 2023
@dredivaris dredivaris merged commit b162ec3 into develop Aug 14, 2023
37 checks passed
shayantabatabaee pushed a commit to shayantabatabaee/label-studio that referenced this pull request Sep 19, 2023
…nges (HumanSignal#4611)

* feat: LSDV-5222: Add ids to labels to allow for persistence of custom label weights when changing label names

* Revert changes related to using a label id and add fix for resetting labels set to 0

* Update get_label so it doesn't have to be called twice in comprehension

* Update so overall section is also covered when it is set to 0

* Fix fetching of overall weight as there are subtle issues with the default values
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants