-
Notifications
You must be signed in to change notification settings - Fork 74.1k
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
WARNING:tensorflow:Entity <function <lambda> at 0x000002343DCF24C8> could not be transformed and will be executed as-is. #38691
Comments
@Saduf2019, I read the issues you linked to but I'm afraid none of them solve the problem. While the code seems to run without warnings on Colab, the warnings appear on two different machines I've tested it on (Windows 10 and Debian). The exact versions of the packages are as follows:
|
Please note that the problem persists even with the following upgrades:
|
@laghaout Can you please test with |
The following versions should work (note that pip install should pull the correct dependencies in TF 2.2 and later):
To make sure you have the correct version installed, please try force-installing it: |
@mdanatg, @jvishnuvardhan: I followed your suggestions, but just to double-check, my packages are
and
However, the mystery has now thickened: The message does not show up when the code is run in Jupyter, but persists when the code is run in Spyder. In the latter case, it is only when the code is re-run, i.e., the warning does not show the first time it is run. Furthermore, the warning is still the same as that I posted initially but it has a slightly different wording:
|
Thanks for checking. So long as you don't see any To get a bit more information, could you set this env var: |
@laghaout Thank you. The log doesn't seem to contain any errors - did the warning appear while collecting it? |
Thank you, that helped! It seems that Spyder may decide to unload modules. Will send a fix. |
Actually, this should already be fixed in tf-nightly. The fix will be released in TF 2.3. Closing the issue for now, but please re-open if you still see the warnings with tf-nightly. |
Hello, Linux : Ubuntu 18.04 Command: WARNING:tensorflow:Entity <function at 0x7ff0f804fb70> could not be transformed and will be executed as-is. Please report this to the AutoGraph team. When filing the bug, set the verbosity to 10 (on Linux, Any idea why I am seeing this problem and how to fix it? Unfortunately, I cannot verify it in TF 2.X because I cannot install it easily on this machine as it needs other dependencies to be correctly (CUDA > 11.0) installed. |
Hi @ssnirgudkar, it appears that the error message indicates an environment related incompatibility. The root cause it indicated by this piece in the message: "Original error: could not get source code". This section in the docs has a few details why. Given that the lambda function is simple, you could try to wrap it into a Are you getting this error when trying to run the code in an interactive Python or IPython shell? I know those to be incompatible. Running the code as a Python file, or using something like Jupyter should work though. |
What can be done to solve this warning?
Warning message
Below is the full warning:
Minimum working example
The code that generated the warning was discussed in #38471 and stored in this gist.
Environment
Running on Windows 10 under conda 4.8.3.
The text was updated successfully, but these errors were encountered: