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

Dynamic label field upgrades #3152

Merged
merged 16 commits into from
Jun 12, 2023
Merged

Dynamic label field upgrades #3152

merged 16 commits into from
Jun 12, 2023

Conversation

benjaminpkane
Copy link
Contributor

@benjaminpkane benjaminpkane commented Jun 1, 2023

Resolves #3157
Resolves #3183
Resolves #3178

Upgrades the SDK to fully support label fields stored as embedded document fields.

Change log

Example usage

import fiftyone as fo
import fiftyone.zoo as foz
import fiftyone.utils.annotations as foua

dataset = (
    foz.load_zoo_dataset("quickstart", max_samples=10)
    .select_fields("ground_truth")
    .limit(10)
    .clone()
)

# Move labels to an embedded document field
dataset.add_sample_field(
    "dynamic",
    fo.EmbeddedDocumentField,
    embedded_doc_type=fo.DynamicEmbeddedDocument,
)
dataset.rename_sample_field("ground_truth", "dynamic.ground_truth")

# Automatically locates labels in `dynamic.ground_truth` field
dataset.export(
    export_dir="/tmp/coco",
    dataset_type=fo.types.COCODetectionDataset,
)

# Automatically locates labels in `dynamic.ground_truth` field
dataset.draw_labels("/tmp/anno")

@benjaminpkane benjaminpkane added bug Bug fixes core Issues related to Core features labels Jun 1, 2023
@benjaminpkane benjaminpkane self-assigned this Jun 1, 2023
@codecov
Copy link

codecov bot commented Jun 1, 2023

Codecov Report

Patch coverage: 6.66% and project coverage change: -34.07 ⚠️

Comparison is base (19b434f) 49.18% compared to head (104c2c1) 15.12%.

Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #3152       +/-   ##
============================================
- Coverage    49.18%   15.12%   -34.07%     
============================================
  Files          230      560      +330     
  Lines        34478    68959    +34481     
  Branches       325      597      +272     
============================================
- Hits         16957    10428     -6529     
- Misses       17521    58531    +41010     
Flag Coverage Δ
app 15.12% <6.66%> (-34.07%) ⬇️

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

Impacted Files Coverage Δ
...ges/core/src/components/ColorModal/SidebarList.tsx 0.00% <0.00%> (ø)
...p/packages/core/src/components/ColorModal/utils.ts 0.00% <0.00%> (ø)
...es/core/src/components/FieldLabelAndInfo/index.tsx 0.00% <0.00%> (ø)
app/packages/looker/src/elements/common/tags.ts 11.19% <0.00%> (-3.49%) ⬇️
app/packages/looker/src/elements/common/util.ts 22.66% <21.42%> (-0.99%) ⬇️

... and 473 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@benjaminpkane benjaminpkane force-pushed the bugfix/select-labels branch from 14b3752 to ea05303 Compare June 1, 2023 18:23
@brimoor brimoor self-requested a review June 5, 2023 12:51
Copy link
Contributor

@brimoor brimoor left a comment

Choose a reason for hiding this comment

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

We discussed offline and I'll be adding some follow-up changes to this PR to omit label fields nested within other label fields.

@brimoor brimoor force-pushed the bugfix/select-labels branch from 0d87d38 to f10aa56 Compare June 11, 2023 18:43
@brimoor brimoor self-requested a review June 11, 2023 18:46
Copy link
Contributor

@brimoor brimoor left a comment

Choose a reason for hiding this comment

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

LGTM

@brimoor brimoor changed the title Dynamic label field fixes Dynamic label field upgrades Jun 11, 2023
@brimoor brimoor merged commit 3026474 into develop Jun 12, 2023
@brimoor brimoor deleted the bugfix/select-labels branch June 12, 2023 01:00
@brimoor brimoor restored the bugfix/select-labels branch June 12, 2023 01:01
brimoor added a commit that referenced this pull request Jun 12, 2023
@brimoor brimoor deleted the bugfix/select-labels branch June 12, 2023 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug fixes core Issues related to Core features
Projects
None yet
2 participants