question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dictionary update sequence element #0 has length 1; 2 is required

See original GitHub issue

I’m trying to forecast a time series. For that, I decided to redo the tutorial “Demand forecasting with the Temporal Fusion Transformer”. As the version that is on the GitHub seems to be more recent, I solved the instructions that are there. However, when executing the instruction trainer.fit(tft, train_dataloaders = train_dataloader, val_dataloaders = val_dataloader,), the following error message appears: “dictionary update sequence element #0 has length 1; 2 is required”.

I’ve tried all the possibilities I knew, but the error persists.

My notebook on Google Colab: https://colab.research.google.com/drive/1NX-ah_Nuqyt6m2Wsn2WcKkadRariISFu?usp=sharing

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:9
  • Comments:17

github_iconTop GitHub Comments

5reactions
cristianegeacommented, Sep 4, 2021

Hi! I received the suggestion to change the version of the torchmetrics package. Apparently, the version (0.5.1) being used is buggy. I made the change and apparently the notebook is running without error (it’s still running)…

The torchmetrics package version must be <= 0.5. The version 0.51 is buggy.

4reactions
rafmacalabacommented, Sep 3, 2021

same error, encountered. +1

Read more comments on GitHub >

github_iconTop Results From Across the Web

"dictionary update sequence element #0 has length 1; 2 is ...
If you give the sequence and any element length is 1 and required two then we will get this kind of error. See...
Read more >
dictionary update sequence element #0 has length N; 2 is ...
The Python "ValueError: dictionary update sequence element #0 has length N; 2 is required" occurs when we use the dict.update() method ...
Read more >
dictionary update sequence element #0 has length 1; 2
The error is saying that G.add_edges_from is expecting to be passed an iterable that has each item being an iterable of 2.
Read more >
dictionary update sequence element #0 has length 1 - YouTube
dictionary update sequence element # 0 has length 1; 2 is required #djangoerror #updatesequenceelement #Python #motechapp.
Read more >
PYTHON : dictionary update sequence element #0 has length 3
PYTHON : dictionary update sequence element # 0 has length 3; 2 is required [ Gift : Animated Search Engine ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found