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

[BUG] dataloader only return the first element of the sequence #2043

Open
wjfwzzc opened this issue Dec 7, 2022 · 3 comments
Open

[BUG] dataloader only return the first element of the sequence #2043

wjfwzzc opened this issue Dec 7, 2022 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@wjfwzzc
Copy link

wjfwzzc commented Dec 7, 2022

🐛🐛 Bug Report

⚗️ Current Behavior

When I build a dataset with a sequence of images (like frames), everything works fine. But if I tranfer it to a pytorch dataloader, the loader can only return the first element of the sequence.

Input Code
"Creating Datasets with Sequences" official colab example

Append following code to the end:

print(ds[0]["frames"].shape)
print(ds[1]["frames"].shape)
dataloader = ds.pytorch()
data_iter = iter(dataloader)
print(next(data_iter)["frames"].shape)
print(next(data_iter)["frames"].shape)

It returns:

(600, 1080, 1920, 3)
(1050, 1080, 1920, 3)
torch.Size([1, 1080, 1920, 3])
torch.Size([1, 1080, 1920, 3])

But I hope It returns something like:

(600, 1080, 1920, 3)
(1050, 1080, 1920, 3)
torch.Size([1, 600, 1080, 1920, 3])
torch.Size([1, 1050, 1080, 1920, 3])
@wjfwzzc wjfwzzc added the bug Something isn't working label Dec 7, 2022
@mikayelh
Copy link
Collaborator

mikayelh commented Dec 7, 2022

hi there, sorry you've run into this issue. We will look into this shortly!

@tatevikh
Copy link
Collaborator

tatevikh commented Dec 7, 2022

Hi @wjfwzzc! Thanks a lot for raising the issue. We are aware of it and currently working on a fix. Will update you as soon as it's fixed.

@istranic
Copy link
Contributor

istranic commented Dec 7, 2022

Hey @wjfwzzc. Unfortunately, there's a fundamental issue with supporting sequences in the python implementation of our dataloader, so we've decided not to support them for now, and we will add appropriate error messages so you don't encounter the issue above.

Sequences is supported in the c++ dataloader (ds.dataloader() - details here), but this dataloader is only available if you use datasets hosted by Activeloop, or is you are on the Growth or Enterprise plan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants