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

Fixing ColorScheme serialization #4092

Merged
merged 1 commit into from Feb 20, 2024

Conversation

brimoor
Copy link
Contributor

@brimoor brimoor commented Feb 19, 2024

Fixes ColorScheme serialization by using the same ID field pattern used by Label classes.

The existing logic did not satisfy the following requirement, which, for example, was causing the @voxel51/utils/edit_dataset_info operator to be unable to understand custom color schemes.

import fiftyone as fo

color_scheme = fo.ColorScheme()
d = color_scheme.to_dict(extended=True)

# previously raised an error; now succeeds
also_color_scheme = fo.ColorScheme.from_dict(d, extended=True)

assert color_scheme == also_color_scheme

@brimoor brimoor added the bug Bug fixes label Feb 19, 2024
@brimoor brimoor self-assigned this Feb 19, 2024
Copy link

codecov bot commented Feb 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6086bf2) 15.99% compared to head (cc894e5) 15.99%.
Report is 2 commits behind head on release/v0.23.6.

Additional details and impacted files
@@               Coverage Diff                @@
##           release/v0.23.6    #4092   +/-   ##
================================================
  Coverage            15.99%   15.99%           
================================================
  Files                  732      732           
  Lines                82062    82062           
  Branches              1110     1110           
================================================
  Hits                 13123    13123           
  Misses               68939    68939           
Flag Coverage Δ
app 15.99% <ø> (ø)

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

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

Copy link
Contributor

@benjaminpkane benjaminpkane left a comment

Choose a reason for hiding this comment

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

LGTM. @lanzhenw can confirm

@benjaminpkane benjaminpkane merged commit 6c201ea into release/v0.23.6 Feb 20, 2024
9 checks passed
@benjaminpkane benjaminpkane deleted the bug/color-scheme-serialization branch February 20, 2024 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants