Skip to content

got multiple values for keyword argument 'training #46

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

Open
Raul-araya-secchi opened this issue Mar 13, 2025 · 0 comments
Open

got multiple values for keyword argument 'training #46

Raul-araya-secchi opened this issue Mar 13, 2025 · 0 comments

Comments

@Raul-araya-secchi
Copy link

I managed to successfully instal alphaflow but now when trying to run inference I'm getting the following error:

This is my command line:
python ~/bin/alphaflow/predict.py --mode alphafold --input_csv r26g.csv --msa_dir r26g_short.fasta --weights ~/bin/alphaflow/weights/alphaflow_12l_md_templates_distilled_202406.pt --samples 1000 --outpdb .

This is the error:

"/home/raraya/miniconda3/envs/alphaflow/lib/python3.9/site-packages/Bio/pairwise2.py:278: BiopythonDeprecationWarning: Bio.pairwise2 has been deprecated, and we intend to remove it in a future release of Biopython. As an alternative, please consider using Bio.Align.PairwiseAligner as a replacement, and contact the Biopython developers if you still need the Bio.pairwise2 module.
warnings.warn(
2025-03-13 15:47:12,215 [chamaco:2079704] [INFO] Loading the model
/home/raraya/bin/alphaflow/predict.py:76: FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
ckpt = torch.load(args.weights, map_location='cpu')
Traceback (most recent call last):
File "/home/raraya/bin/alphaflow/predict.py", line 133, in
main()
File "/home/raraya/miniconda3/envs/alphaflow/lib/python3.9/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "/home/raraya/bin/alphaflow/predict.py", line 77, in main
model = model_class(**ckpt['hyper_parameters'], training=False)
TypeError: alphaflow.model.wrapper.AlphaFoldWrapper() got multiple values for keyword argument 'training'"

Please help!

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

1 participant