Skip to main content

Create Listener

Two ways to define listener​

from superduper import Listener
db.apply(
Listener(
key='key_name',
model=model,
select=select,
)
)

Data passed into the model​

# Model predict function definition: model.predict(x)
# Data example in database: {"key_name": 10}
# Then the listener will call model.predict(10)
from superduper import Listener
db.apply(
Listener(
key='key_name',
model=model,
select=select,
)
)