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

[FR] Support setting tags in custom importer class #4305

Closed
2 of 6 tasks
CourchesneA opened this issue Apr 24, 2024 · 1 comment
Closed
2 of 6 tasks

[FR] Support setting tags in custom importer class #4305

CourchesneA opened this issue Apr 24, 2024 · 1 comment
Labels
feature Work on a feature request

Comments

@CourchesneA
Copy link

Instructions

Proposal Summary

When creating a dataset importer, it would be great to have a way to specify what split the item belongs to. It seems fy.Sample have a tags field that can be used for that, but in the importer, the __next__ function returns (image_path, image_metadata, label), and I didn't find a way to set a Sample property from there.

Motivation

  • What is the use case for this feature?
    I would like to keep track of splits on my datasets, since I often only want to perform some operations on a subset of my dataset
  • Why is this use case valuable to support for FiftyOne users in general?
    I expect other people also want to keep track of their splits
  • Why is it currently difficult to achieve this use case?
    I don't see a way to set fo.Sample attributes from the importer class

What areas of FiftyOne does this feature affect?

  • App: FiftyOne application
  • Core: Core fiftyone Python library
  • Server: FiftyOne server

Details

Maybe the __next__ function could return a fo.Sample

Willingness to contribute

The FiftyOne Community welcomes contributions! Would you or another member of your organization be willing to contribute an implementation of this feature?

  • Yes. I can contribute this feature independently
  • Yes. I would be willing to contribute this feature with guidance from the FiftyOne community
  • No. I cannot contribute this feature at this time
@CourchesneA CourchesneA added the feature Work on a feature request label Apr 24, 2024
@brimoor
Copy link
Contributor

brimoor commented May 23, 2024

@CourchesneA there is a GenericSampleDatasetImporter interface that you can subclass from that allows the __next__ method to return an entire Sample object as you suggest!

@brimoor brimoor closed this as completed May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Work on a feature request
Projects
None yet
Development

No branches or pull requests

2 participants