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

Intialization sample error - ImportError: cannot import name 'AutoregressiveWrapper' from 'zeta.structs' #21

Open
js333031 opened this issue Apr 17, 2024 · 2 comments

Comments

@js333031
Copy link

js333031 commented Apr 17, 2024

Created a venv, using python 3.10 on Ubuntu 22.04 LTS

Then, used Installation and Initialization steps from the project.

Initialization step error:

(rt2) student@nuc21:~/rt2$ python test.py
Traceback (most recent call last):
  File "/mnt/LexLinux/student/rt2/test.py", line 2, in <module>
    from rt2.model import RT2
  File "/mnt/LexLinux/student/rt2/lib/python3.10/site-packages/rt2/__init__.py", line 1, in <module>
    from rt2.model import RT2
  File "/mnt/LexLinux/student/rt2/lib/python3.10/site-packages/rt2/model.py", line 3, in <module>
    from zeta.structs import (
ImportError: cannot import name 'AutoregressiveWrapper' from 'zeta.structs' (/mnt/LexLinux/student/rt2/lib/python3.10/site-packages/zeta/structs/__init__.py)
(rt2) student@nuc21:~/rt2$

Test app:

import torch
from rt2.model import RT2

# img: (batch_size, 3, 256, 256)
# caption: (batch_size, 1024)
img = torch.randn(1, 3, 256, 256)
caption = torch.randint(0, 20000, (1, 1024))

# model: RT2
model = RT2()

# Run model on img and caption
output = model(img, caption)
print(output)  # (1, 1024, 20000)

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@Eric-Thu
Copy link

I found the 'AutoregressiveWrapper' class in zeta is renamed 'AutoRegressiveWrapper' now. So try to replace 'AutoregressiveWrapper' by 'AutoRegressiveWrapper' in model.py. It works fine for me.

@js333031
Copy link
Author

Thanks, that worked

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

2 participants