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

Use datum dataset for PyTorch #1212

Closed
CourchesneA opened this issue Nov 30, 2023 · 3 comments
Closed

Use datum dataset for PyTorch #1212

CourchesneA opened this issue Nov 30, 2023 · 3 comments
Assignees

Comments

@CourchesneA
Copy link

CourchesneA commented Nov 30, 2023

I would like to use datumaro as a standard dataset format, but in order to use it for pytorch I need to create a pytorch.Dataset wrapper for it. The dataset interface requires to implement the __getitem__(idx:int) function, which is not available on a datumaro dataset.

I am currently using the code from datumaro.FrameworkConverter, which keeps a list of item ids in a list and use indexes from this list. However, once it is converted this way, I can no longer use datumaro dataset manipulation utilities such as split and merge.

Would it be possible to get access to an integer __getitem__ function directly on the datumaro dataset ?

@sooahleex
Copy link
Contributor

Hi @CourchesneA, Sorry for late response.

We plan to incorporate the mentioned __getitem__ functionality into the Datumaro Dataset. Once this feature is implemented, you will be able to retrieve datasetitem within the dataset using an index as you desire. I will provide further updates once this enhancement is included in the release.

Thank you for your patience and understanding.

@CourchesneA
Copy link
Author

That is great news. Thanks for the update !

@wonjuleee
Copy link
Contributor

Dear @CourchesneA, as following your suggestion, we have implemented random accessing method with __getitem__ at #1247. This will be publicly released with Datumaro 2.0 at the mid of March. Sincerely thank you for your continued interests and suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants