-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
dictionary update sequence element #0 has length 1; 2 is required #9318
Comments
Hi @cristianegea this looks like the error from Lightning-AI/torchmetrics#492 - could you try installing |
Hi @ethanwharris! Thank you for your help. I installed the package however the error persists. I performed the test on both Google Colab and Anaconda.... The message below is the one that appears on Anaconda (it is more detailed than on Google Colab) :
|
It's possible something went wrong with the downgrade. @cristianegea could you double check your torchmetrics version with:
It should show 0.5.0 or lower, 0.5.1 is the only version with the bug afaik. |
Hi @ethanwharris ! Once again, thank you so much for your help!!!! I changed the version of the |
Hi @cristianegea, did you solve the problem by downgrading torchmetrics to 0.5.0? When I did it, the dictionary problem went away, but I am getting another AttributeError: 'functools.partial' object has no attribute 'name'. Any idea? |
@jcha7071, After I downgraded the package version no more error appeared. However, I noticed much longer time during the cnn training. At the moment, I can't think of a solution. I can give you the versions of some packages I'm using. |
Hi @jcha7071! I am currently working on Google Colab and this error message does not appear for me. However, when trying to run the notebook on my personal computer, the error message also appears. Have you ever tried running your notebook on Google Colab? |
yaml/pyyaml#541, you can downgrad your pandas to solver this problem, pandas==1.2.4 worked |
I see this issue in version
|
I'm using a 0.5 version
De: Zahra Vaseqi ***@***.***>
Enviada em: sexta-feira, 1 de outubro de 2021 05:03
Para: PyTorchLightning/pytorch-lightning ***@***.***>
Cc: Cristiane Gea ***@***.***>; Mention ***@***.***>
Assunto: Re: [PyTorchLightning/pytorch-lightning] dictionary update sequence element #0 has length 1; 2 is required (#9318)
It's possible something went wrong with the downgrade. @cristianegea <https://github.com/cristianegea> could you double check your torchmetrics version with:
import torchmetrics
print(torchmetrics.__version__)
It should show 0.5.0 or lower, 0.5.1 is the only version with the bug afaik.
I see this issue in version 0.4.1
>> print(torchmetrics.__version__)
0.4.1
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#9318 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/APBJGSZQ3BRT5APGW26JIN3UEVTL5ANCNFSM5DMPXEYQ> . <https://github.com/notifications/beacon/APBJGS447ZXB6IOJTBSYCFTUEVTL5A5CNFSM5DMPXEY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOG6GVVYA.gif>
|
Thanks for the reply! switching to version |
Hi, I also encounter this issue. May I know how to solve it? |
Encountering this issue with |
Same Problem, how to solve it? |
I also still get this error after downgrading to 0.5.0 |
I might have a clue for this problem.
The error I met is also ValueError: dictionary update sequence element #0 has length 1; 2 is required. The method to solve it is easy. We can simply add "ignore='some_method'" in self.save_hyperparameters().
|
Do not save the weights of the model to hparams.yaml. This could solve this problem!
|
I previously opened an issue in the pytorch-forecasting repository about a problem I'm having while trying to play the "Demand forecasting with the Temporal Fusion Transformer" tutorial. When trying to run the command
trainer.fit(tft, train_dataloaders = train_dataloader, val_dataloaders = val_dataloader,)
the following error message is returned "dictionary update sequence element #0 has length 1; 2 is required". However, when looking at this message I found that it is related to the file representer.py, which is part of the pytorch-lightning package.I've tried all the possibilities I knew, but the error persists.
Issue link opened in pytorch-forecasting repository: jdb78/pytorch-forecasting#665
My notebook on Google Colab: https://colab.research.google.com/drive/1NX-ah_Nuqyt6m2Wsn2WcKkadRariISFu?usp=sharing
Error message:
The text was updated successfully, but these errors were encountered: