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

check if view is group before assigning slice #4066

Merged
merged 1 commit into from Feb 6, 2024

Conversation

sashankaryal
Copy link
Contributor

@sashankaryal sashankaryal commented Feb 6, 2024

This PR makes sure that for grouped datasets with videos, if SelectGroupSlices view stage is applied with only one slice, the resulting view is only assigned group_slice if it's media type is fom.GROUP.

import fiftyone as fo
import fiftyone.zoo as foz

dataset = fo.Dataset("video-slice-bug")

# qsv = fo.load_dataset("quickstart-video")
qsv = foz.load_zoo_dataset("quickstart-video", max_samples=1)

group = fo.Group()
sample = fo.Sample(qsv.first().filepath, group=group.element("video"))
dataset.add_sample(sample)

view = dataset.select_group_slices(["video"])
fo.launch_app(view)

@sashankaryal sashankaryal self-assigned this Feb 6, 2024
@sashankaryal sashankaryal marked this pull request as ready for review February 6, 2024 19:51
@sashankaryal sashankaryal added the bug Bug fixes label Feb 6, 2024
Copy link

codecov bot commented Feb 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (release/v0.23.5@757fa81). Click here to learn what that means.

Additional details and impacted files
@@                Coverage Diff                 @@
##             release/v0.23.5    #4066   +/-   ##
==================================================
  Coverage                   ?   16.00%           
==================================================
  Files                      ?      732           
  Lines                      ?    81989           
  Branches                   ?     1110           
==================================================
  Hits                       ?    13123           
  Misses                     ?    68866           
  Partials                   ?        0           
Flag Coverage Δ
app 16.00% <0.00%> (?)

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.

@sashankaryal sashankaryal changed the base branch from develop to release/v0.23.5 February 6, 2024 20:49
@sashankaryal sashankaryal force-pushed the bugfix/video-select-group-slice-bug branch from 0388486 to 7f4812a Compare February 6, 2024 20:52
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 ✅

@sashankaryal sashankaryal merged commit bd817b8 into release/v0.23.5 Feb 6, 2024
6 of 7 checks passed
@sashankaryal sashankaryal deleted the bugfix/video-select-group-slice-bug branch February 6, 2024 21:07
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

2 participants