Skip to content

Kafka.ipynb is broken in colab. #1272

Closed

Description

@MarkDaoust

Using tensorflow_io 0.17

The kafka.ipynb notebook fails in this block:

thread = threading.Thread(target=write_to_kafka_after_sleep,
                          args=("susy-train", zip(x_train, y_train)))
thread.daemon = True
thread.start()

for mini_ds in online_train_ds:
  mini_ds = mini_ds.shuffle(buffer_size=32)
  mini_ds = mini_ds.map(decode_kafka_online_item)
  mini_ds = mini_ds.batch(32)
  model.fit(mini_ds, epochs=3)
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-28-5ff39e4e4280> in <module>()
      8   mini_ds = mini_ds.map(decode_kafka_online_item)
      9   mini_ds = mini_ds.batch(32)
---> 10   model.fit(mini_ds, epochs=3)

/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py in fit(self, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, validation_batch_size, validation_freq, max_queue_size, workers, use_multiprocessing)
   1108 
   1109         if logs is None:
-> 1110           raise ValueError('Expect x to be a non-empty array or dataset.')
   1111         epoch_logs = copy.copy(logs)
   1112 

ValueError: Expect x to be a non-empty array or dataset.

Activity

  1. kvignesh1420 commented on Jan 15, 2021

    @kvignesh1420
    Member

    @MarkDaoust the online-training variant might not be stable in Colab env. I will fix this.

  2. kvignesh1420 commented on Feb 8, 2021

    @kvignesh1420
    Member

    closing the issue as #1274 has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions