Skip to content
Example of using TensorFlow with IBM Event Streams
Python Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
sample-output
.gitignore
0_load_topics.py
1_train_model.py
2_train_and_try_model.py
3_train_and_test_model.py
4_train_and_stream_model.py
README.md
config.env
config.py
fashion.avsc
requirements.txt
run-cleanup-99.sh
run-step-0.sh
run-step-1.sh
run-step-2.sh
run-step-3.sh
run-step-4.sh
schemas.py
simulate_test_stream.py
train_model.py

README.md

event-streams-tensorflow

Example of using TensorFlow with IBM Event Streams, to explain how to get started creating machine learning applications using the data you have on Kafka topics.

This is a simple demo app, not intended for production use (there is no error-handling at all, the ML model isn't hosted, etc.). The aim is to provide an easy-to-understand working example of how to integrate Kafka with TensorFlow.

I've explained how it all works in https://dalelane.co.uk/blog/?p=3924

It's written for Python 3. To run it:

  1. pip install -r requirements.txt
  2. Edit config.env with the properties of your cluster
  3. Run run-step-0.sh to set up your Kafka topics
  4. Run run-step-1.sh to train a machine learning model using data from a Kafka training topic
  5. Run run-step-2.sh to train a machine learning model and use it to classify an image
  6. Run run-step-3.sh to train a machine learning model and test it using data from a Kafka test topic
  7. Run run-step-4.sh to use a machine learning model to classify a stream of events on a Kafka topic

To wipe everything if you want to start again, run run-cleanup-99.sh.

You can’t perform that action at this time.