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

1.0 HF conversion script fails on Python 3.8 #875

Closed
syskn opened this issue Apr 7, 2023 · 7 comments · Fixed by #877
Closed

1.0 HF conversion script fails on Python 3.8 #875

syskn opened this issue Apr 7, 2023 · 7 comments · Fixed by #877
Assignees
Labels
bug Something isn't working

Comments

@syskn
Copy link

syskn commented Apr 7, 2023

Describe the bug

While the official recommended Python version for NeoX is 3.8, convert_v1.0_to_hf.py only works with Python 3.9 or later due to minor incompatibility (tested on Python 3.8.10).

TypeError: 'type' object is not subscriptable

Suggested change

Modify list[torch.Tensor] at the line 42 to List[torch.Tensor] (capitalized L)
Add import from typing import List

@cateto
Copy link

cateto commented May 10, 2023

same here.

will it merge to main branch?

@haileyschoelkopf
Copy link
Contributor

Hi, this should be fixed in #877 --can you share what commit you experience this error in?

@cateto
Copy link

cateto commented May 10, 2023

@haileyschoelkopf sure!
3719533

@StellaAthena
Copy link
Member

@cateto Try checking out the fix-convert-py3.8 branch and see if that works.

@StellaAthena StellaAthena reopened this May 11, 2023
@haileyschoelkopf
Copy link
Contributor

It looks like this got reverted in 29b968d by merge conflicts accidentally, I’ll re-fix this as soon as I’m back to a computer!

@cateto
Copy link

cateto commented May 15, 2023

thank you 😸

@haileyschoelkopf
Copy link
Contributor

This is fixed in #931 !

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

Successfully merging a pull request may close this issue.

4 participants