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

Requires 1 positional argument 'Loader' #7

Open
SinichiKudo02 opened this issue May 11, 2023 · 2 comments
Open

Requires 1 positional argument 'Loader' #7

SinichiKudo02 opened this issue May 11, 2023 · 2 comments

Comments

@SinichiKudo02
Copy link

May I know what version of python did you used in this case since I'm having an error
Traceback (most recent call last):
File "test.py", line 22, in
config = HParams.load("run_config.yaml")
File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python37\BTC-ISMIR19\utils\hparams.py", line 29, in load
return cls(**yaml.load(f))
TypeError: load() missing 1 required positional argument: 'Loader'

@usingnamespacestc
Copy link

usingnamespacestc commented Jun 14, 2023

Try this: return cls(**yaml.load(f, yaml.Loader)).

And if you meet other two issues, replace "np.float" in "transformer_modules.py" to "np.fload32", and "np.int" to "np.int_" in the "mir_eval" library I remember. Follow the Traceback to find the file.

That works for me.

@palachute
Copy link

It seems the version of "pyyaml" and "numpy" is too high. When I use the 6.0.1 version of pyyaml and numpy version >=1.24 also encounters the two questions.
Set the versions: pyyaml==3.13, and numpy==1.23, That solves my problem.

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