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

ValueError error when importing the pip package #40

Closed
dsinkerii opened this issue Mar 31, 2023 · 5 comments
Closed

ValueError error when importing the pip package #40

dsinkerii opened this issue Mar 31, 2023 · 5 comments

Comments

@dsinkerii
Copy link

dsinkerii commented Mar 31, 2023

Hi there! So im kinda new to all of this, but when i try to import the pip package, i get this error:
Снимок экрана_2023-03-31_16-28-20
does anybody know a way to fix this error? Thanks!

@dsinkerii dsinkerii changed the title ValueError error when importing MuLaN ValueError error when importing the pip package Mar 31, 2023
@lucidrains
Copy link
Owner

@dsinkerii i don't think pytorch is even compatible with python 3.11

@lucidrains
Copy link
Owner

pytorch/pytorch#86566

@dsinkerii
Copy link
Author

Oh, i see. I will try to downgrade it and see if this is going to help. Thanks!

@dsinkerii
Copy link
Author

Yep, that was the issue! thanks!

@Birch-san
Copy link

Birch-san commented Apr 2, 2023

@dsinkerii i don't think pytorch is even compatible with python 3.11

@lucidrains pytorch 2.0 supports python 3.11, except for torch.compile. 3.11's JIT makes scripts start faster, so I've been using it a lot.

the problem reported here is unrelated to pytorch.

seems the @dataclass decorator from the Python standard library, underwent some kind of breaking change. this line is the one it's complaining about, I think:
https://github.com/facebookresearch/fairseq/blob/176cd934982212a4f75e0669ee81b834ee71dbb0/fairseq/dataclass/configs.py#L1129

the message says to use a factory for default initialization of fields. probably like this:

@dataclass
class FairseqConfig(FairseqDataclass):
-     common: CommonConfig = CommonConfig()
+     common: CommonConfig = field(default_factory=CommonConfig)

this is a Python 3.11 compatibility problem that needs to be raised against facebookresearch/fairseq has been raised already in facebookresearch/fairseq#5012.

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