Skip to content

Commit 30bc3b3

Browse files
committed
Deprecate WAVDataset, and pylint fix
Signed-off-by: Yong Tang <[email protected]>
1 parent 732579c commit 30bc3b3

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

tensorflow_io/audio/python/ops/audio_ops.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,18 @@
1717
from __future__ import division
1818
from __future__ import print_function
1919

20+
import warnings
21+
2022
import tensorflow as tf
2123
from tensorflow_io.core.python.ops import data_ops
2224

25+
warnings.warn(
26+
"The tensorflow_io.audio.WAVDataset is "
27+
"deprecated. Please look for tfio.IOTensor.from_audio "
28+
"for reading WAV files into tensorflow.",
29+
DeprecationWarning)
30+
31+
2332
class AudioDataset(data_ops.Dataset):
2433
"""A Audio File Dataset that reads the audio file."""
2534

tensorflow_io/core/python/ops/io_tensor.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def from_kafka(cls,
260260
"""
261261
with tf.name_scope(kwargs.get("name", "IOFromKafka")):
262262
return kafka_io_tensor_ops.KafkaIOTensor(
263-
subscription,
264-
servers=kwargs.get("servers", None),
265-
configuration=kwargs.get("configuration", None),
266-
internal=True)
263+
subscription,
264+
servers=kwargs.get("servers", None),
265+
configuration=kwargs.get("configuration", None),
266+
internal=True)

0 commit comments

Comments
 (0)