Run a NERDD module as a Kafka service
Project description
NERDD Kafka
Run a NERDD module as a Kafka service that consumes input molecules and produces prediction tuples.
Installation
pip install -U nerdd-kafka
Usage
When a class inherits from nerdd_module.AbstractModel
(see
NERDD Module Github page), it can be
used to create a Kafka service.
# run a Kafka service for NerddModel on localhost:9092
run_nerdd_server package.path.to.NerddModel
# modify broker url, input topic and batch size
run_nerdd_server package.path.to.NerddModel \
--broker-url my-cluster-kafka-bootstrap.kafka:9092 \
--input-topic examples \
--batch-size 10
# more information via --help
run_nerdd_server --help
If the model class is called ExamplePredictionModel
, the server will read input
tuples from the input topic example-prediction-inputs
in batches of size 100
and write results to the results
topic. The batch size specifies the number
of input tuples that are given to the model at once.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nerdd_kafka-0.2.1.tar.gz
(12.1 kB
view hashes)
Built Distribution
Close
Hashes for nerdd_kafka-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 831522d5a66e53ff37f26400a2767bc2a2430636ff9ea6d27dd2bb492a6f03c4 |
|
MD5 | b8c7af4f96a63ba9a9b816f336a0c0de |
|
BLAKE2b-256 | 5c01595cebfff826f4b705ada5256e6302a8f46c5f282dd47ce45e9982cc01cb |