Skip to content

Commit 762c979

Browse files
tomvdwThe TensorFlow Datasets Authors
authored and
The TensorFlow Datasets Authors
committed
Remove warning of deprecating supporting tf dtypes
PiperOrigin-RevId: 738415662
1 parent 27547b2 commit 762c979

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

tensorflow_datasets/core/utils/dtype_utils.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@
1515

1616
"""TFDS DType utils to handle both NumPy and TensorFlow DTypes."""
1717

18-
from typing import cast, Any, List, Type, Union
18+
from typing import Any, List, Type, Union, cast
1919

20-
from absl import logging
2120
from etils import enp
2221
import numpy as np
2322
from tensorflow_datasets.core.utils import py_utils
@@ -40,15 +39,6 @@ def cast_to_numpy(dtype: type_utils.TfdsDType) -> np.dtype:
4039
tf_already_loaded = enp.lazy.has_tf
4140
if tf_already_loaded and isinstance(dtype, tf.dtypes.DType):
4241
np_dtype = np.dtype(dtype.as_numpy_dtype)
43-
logging.log_first_n(
44-
logging.WARNING,
45-
(
46-
f'You use TensorFlow DType {dtype} in tfds.features '
47-
'This will soon be deprecated in favor of NumPy DTypes. '
48-
f'In the meantime it was converted to {np_dtype}.'
49-
),
50-
10,
51-
)
5242
return np_dtype
5343
# Strings are managed as np.object_ (rather than np.str_) in order to
5444
# optimize for memory and for consistency with tf.string:

0 commit comments

Comments
 (0)