Skip to content
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

Exception ignored in: <function AtomicFunction.__del__ at 0x71926a728940> #5355

Closed
Nugine opened this issue Apr 6, 2024 · 23 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@Nugine
Copy link

Nugine commented Apr 6, 2024

/!\ PLEASE INCLUDE THE FULL STACKTRACE AND CODE SNIPPET

Short description
Description of the bug.

Environment information

  • Operating System: Ubuntu 22.04

  • Python version: 3.10.12

  • tensorflow-datasets/tfds-nightly version: tfds-nightly 4.9.4.dev202404060044

  • tensorflow/tf-nightly version: tensorflow 2.16.1

  • Does the issue still exists with the last tfds-nightly package (pip install --upgrade tfds-nightly) ? Yes.

Reproduction instructions

import tensorflow_datasets as tfds

examples, metadata = tfds.load("ted_hrlr_translate/pt_to_en", with_info=True, as_supervised=True)
python3 a.py
Exception ignored in: <function AtomicFunction.__del__ at 0x71926a728940>
Traceback (most recent call last):
  File "/home/nugine/.local/lib/python3.10/site-packages/tensorflow/python/eager/polymorphic_function/atomic_function.py", line 291, in __del__
TypeError: 'NoneType' object is not subscriptable
Exception ignored in: <function AtomicFunction.__del__ at 0x71926a728940>
Traceback (most recent call last):
  File "/home/nugine/.local/lib/python3.10/site-packages/tensorflow/python/eager/polymorphic_function/atomic_function.py", line 291, in __del__
TypeError: 'NoneType' object is not subscriptable
Exception ignored in: <function AtomicFunction.__del__ at 0x71926a728940>
Traceback (most recent call last):
  File "/home/nugine/.local/lib/python3.10/site-packages/tensorflow/python/eager/polymorphic_function/atomic_function.py", line 291, in __del__
TypeError: 'NoneType' object is not subscriptable
Exception ignored in: <function AtomicFunction.__del__ at 0x71926a728940>
Traceback (most recent call last):
  File "/home/nugine/.local/lib/python3.10/site-packages/tensorflow/python/eager/polymorphic_function/atomic_function.py", line 291, in __del__
TypeError: 'NoneType' object is not subscriptable
Exception ignored in: <function AtomicFunction.__del__ at 0x71926a728940>
Traceback (most recent call last):
  File "/home/nugine/.local/lib/python3.10/site-packages/tensorflow/python/eager/polymorphic_function/atomic_function.py", line 291, in __del__
TypeError: 'NoneType' object is not subscriptable
Exception ignored in: <function AtomicFunction.__del__ at 0x71926a728940>
Traceback (most recent call last):
  File "/home/nugine/.local/lib/python3.10/site-packages/tensorflow/python/eager/polymorphic_function/atomic_function.py", line 291, in __del__
TypeError: 'NoneType' object is not subscriptable
Exception ignored in: <function AtomicFunction.__del__ at 0x71926a728940>
Traceback (most recent call last):
  File "/home/nugine/.local/lib/python3.10/site-packages/tensorflow/python/eager/polymorphic_function/atomic_function.py", line 291, in __del__
TypeError: 'NoneType' object is not subscriptable
Exception ignored in: <function AtomicFunction.__del__ at 0x71926a728940>
Traceback (most recent call last):
  File "/home/nugine/.local/lib/python3.10/site-packages/tensorflow/python/eager/polymorphic_function/atomic_function.py", line 291, in __del__
TypeError: 'NoneType' object is not subscriptable
Exception ignored in: <function AtomicFunction.__del__ at 0x71926a728940>
Traceback (most recent call last):
  File "/home/nugine/.local/lib/python3.10/site-packages/tensorflow/python/eager/polymorphic_function/atomic_function.py", line 291, in __del__
TypeError: 'NoneType' object is not subscriptable

If you share a colab, make sure to update the permissions to share it.

Link to logs
If applicable, <link to gist with logs, stack trace>

Expected behavior
What you expected to happen.

Additional context
Add any other context about the problem here.

@Nugine Nugine added the bug Something isn't working label Apr 6, 2024
@marcenacp
Copy link
Collaborator

@Nugine I don't reproduce the issue on https://colab.sandbox.google.com.

Can you maybe try with tensorflow==2.15? We should adapt to the latest version of tf though.

@wen020
Copy link

wen020 commented Apr 12, 2024

I also encountered the same problem, is there any progress?

@marcenacp
Copy link
Collaborator

I can reproduce in colab. https://colab.research.google.com/drive/1OmXca6IkoirknPNyDGlxoG6U8w105SpE?usp=sharing

In this colab, you pip install tfds-nightly (tensorflow==2.16), can you instead use tensorflow==2.15? We're working on making TFDS fully compatible with the last version of TF.

Thanks!

@Nugine
Copy link
Author

Nugine commented Apr 17, 2024

tensorflow==2.15 has the same issue.

2024-04-17 07:45:47.987249: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2024-04-17 07:45:47.987331: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2024-04-17 07:45:47.989799: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2024-04-17 07:45:48.004805: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-04-17 07:45:49.531209: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
tf 2.15.0
tfds 4.9.4+nightly
Exception ignored in: <function AtomicFunction.__del__ at 0x7965e32c6e60>
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/eager/polymorphic_function/atomic_function.py", line 291, in __del__
TypeError: 'NoneType' object is not subscriptable
Exception ignored in: <function AtomicFunction.__del__ at 0x7965e32c6e60>
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/eager/polymorphic_function/atomic_function.py", line 291, in __del__
TypeError: 'NoneType' object is not subscriptable
Exception ignored in: <function AtomicFunction.__del__ at 0x7965e32c6e60>
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/eager/polymorphic_function/atomic_function.py", line 291, in __del__
TypeError: 'NoneType' object is not subscriptable
Exception ignored in: <function AtomicFunction.__del__ at 0x7965e32c6e60>
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/eager/polymorphic_function/atomic_function.py", line 291, in __del__
TypeError: 'NoneType' object is not subscriptable
Exception ignored in: <function AtomicFunction.__del__ at 0x7965e32c6e60>
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/eager/polymorphic_function/atomic_function.py", line 291, in __del__
TypeError: 'NoneType' object is not subscriptable
Exception ignored in: <function AtomicFunction.__del__ at 0x7965e32c6e60>
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/eager/polymorphic_function/atomic_function.py", line 291, in __del__
TypeError: 'NoneType' object is not subscriptable
Exception ignored in: <function AtomicFunction.__del__ at 0x7965e32c6e60>
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/eager/polymorphic_function/atomic_function.py", line 291, in __del__
TypeError: 'NoneType' object is not subscriptable
Exception ignored in: <function AtomicFunction.__del__ at 0x7965e32c6e60>
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/eager/polymorphic_function/atomic_function.py", line 291, in __del__
TypeError: 'NoneType' object is not subscriptable
Exception ignored in: <function AtomicFunction.__del__ at 0x7965e32c6e60>
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/eager/polymorphic_function/atomic_function.py", line 291, in __del__
TypeError: 'NoneType' object is not subscriptable
@marcenacp
Copy link
Collaborator

@Nugine
Copy link
Author

Nugine commented Apr 17, 2024

@Nugine, can you share the full notebook? It works on https://colab.research.google.com/drive/1ZYxKQRONh259y6BzxfvVjlLHl-PK7S2B

The error occurs when python process exits. You won't see it in jupyter environment.

https://colab.research.google.com/drive/1OmXca6IkoirknPNyDGlxoG6U8w105SpE?usp=sharing

2024-04-17_19-56-31

@javierjuan
Copy link

Is there any progress in getting a solution? I have the same problem

@congcongke
Copy link

congcongke commented May 13, 2024

same problem for me!
It seems the corrupt happened in tensorflow.python package, although I avoid using it as much as I can!

@marcenacp marcenacp reopened this May 13, 2024
@marcenacp
Copy link
Collaborator

I just re-opened the bug with the tensorflow team. The exception seems to be caught too late in the code. Let's see what they say, thanks for your patience!

@LouisMareschal
Copy link

Same problem for me. Please keep us updated :)

@WesleyHsieh0806
Copy link

Same issue

@abdalhafid
Copy link

same issue

@chengcongdu
Copy link

+1

@ChaosAdmStudent
Copy link

Following the same issue

@marcenacp
Copy link
Collaborator

Update: the TensorFlow team is actively working on this issue. Thanks for your patience!

@Antoniodevy
Copy link

Exception ignored in: <function AtomicFunction.del at 0x791a7d1a9c60>
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/eager/polymorphic_function/atomic_function.py", line 291, in del
TypeError: 'NoneType' object is not subscriptable
Exception ignored in: <function AtomicFunction.del at 0x791a7d1a9c60>
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/eager/polymorphic_function/atomic_function.py", line 291, in del
TypeError: 'NoneType' object is not subscriptable can someone help

@livanosg
Copy link

Problem still exists

Exception ignored in: <function AtomicFunction.__del__ at 0x7c7daba2ef20>
Traceback (most recent call last):
.../lib/python3.11/site-packages/tensorflow/python/eager/polymorphic_function/atomic_function.py", line 291, in __del__
TypeError: 'NoneType' object is not subscriptable
Exception ignored in: <function AtomicFunction.__del__ at 0x7c7daba2ef20>
Traceback (most recent call last):
.../lib/python3.11/site-packages/tensorflow/python/eager/polymorphic_function/atomic_function.py", line 291, in __del__
TypeError: 'NoneType' object is not subscriptable

Process finished with exit code 0
@Haiyang-W
Copy link

Any update? I also meet this problem.

@marcenacp
Copy link
Collaborator

The issue is fixed in the newest versions:

!pip install -U tensorflow=="2.17.0rc1" tfds-nightly

Thanks everyone for your patience!

@Lucien1999s
Copy link

Lucien1999s commented Jul 11, 2024

The issue is fixed in the newest versions:

!pip install -U tensorflow=="2.17.0rc1" tfds-nightly

Thanks everyone for your patience!

After I use this newest version, stopping here when I try training something... this code work in 2.16.0 version...:

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  y["variety"] = encoder.fit_transform(y["variety"])
/opt/homebrew/Caskroom/miniconda/base/envs/deep-learning/lib/python3.11/site-packages/keras/src/layers/core/dense.py:87: UserWarning: Do not pass an `input_shape`/`input_dim` argument to a layer. When using Sequential models, prefer using an `Input(shape)` object as the first layer in the model instead.
  super().__init__(activity_regularizer=activity_regularizer, **kwargs)
Epoch 1/32
@Lucien1999s
Copy link

After trying it, I found that as long as you don't specify the python environment of conda, and then use conda install tensorflow and tensorflow_datasets, it can run normally.

@alvaro-stylesage
Copy link

Any way of solving it but keeping TF 2.15.* ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working