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

Add support for multi sample item in optimize and yielding from the _getitem_ of the StreamingDataset #317

Open
tchaton opened this issue Aug 8, 2024 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@tchaton
Copy link
Collaborator

tchaton commented Aug 8, 2024

🚀 Feature

Motivation

It would be great to be able to create a batch of sub sample from a given sample. Right now, you can't do that.

However a user could support this.

def optimize(...):

    sample = 
	return MultiSample(sample, num_samples=X)

Under the hood, we know this sample could be used to generate multiple random samples.

class MyStreamingDataset(StreamingDataset):

	def __getitem__(self, index, sample_id):
			sample  = super().__getitem__(index)
            
            # do some transformation
            return  data

A use case would be image detection where each image can be used to generate multiple sub boxes and we might want to have them as different training samples.

Pitch

Alternatives

Additional context

@tchaton tchaton added enhancement New feature or request help wanted Extra attention is needed labels Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant