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.

Cannot use Dict ExecutionParameter at `tfx>=0.28`

See original GitHub issue

System information

  • Have I specified the code to reproduce the issue(Yes/No): Yes
  • Environment in which the code is executed: Linux, MacOS, Interactive Notebook
  • TensorFlow version (you are using): 2.4.1
  • TFX Version: tfx>=0.28
  • Python version: 3.7, 3.8

Describe the current behavior

In tfx>=0.28, when using ExecutionParameter with Dict type, I got the error like ValueError: Unexpected type <class 'dict'>.

Describe the expected behavior

If I run the same code in tfx==0.27, it works.

Standalone code to reproduce the issue

Other info / logs

https://github.com/tensorflow/tfx/blob/68637c1faa9c3d7a27e43d87ae85c1639ef1a32a/tfx/types/component_spec.py#L302-L307

As the above comments, it looks like using ExecutionParameter with Dict type should behave normally.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
chongkongcommented, Mar 22, 2021

It would definitely help, but I can’t tell we will as we should also consider the backward compatibility and API consistency. Let me try to bring this issue to the internal discussions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why can't I use a list as a dict key in python? - Stack Overflow
I had some vague idea that that the key has to be "hashable" but I'm just going to admit my own ignorance about...
Read more >
Create a Dictionary in Python – Python Dict Methods
In this article, you will learn the basics of dictionaries in Python. You will learn how to create dictionaries, access the elements inside ......
Read more >
Python Dictionary - GeeksforGeeks
Values in a dictionary can be of any data type and can be duplicated, whereas keys can't be repeated and must be immutable....
Read more >
Class 'dict' does not define '__getitem__', so the ... - YouTrack
Class 'dict' does not define '__getitem__', so the '[]' operator cannot be used on its instances. 11.
Read more >
Supported Python features - Numba
Users cannot use list-of-list as an argument because of this limitation. ... Numba only supports the use of dict() without any arguments.
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