set_brightness and main_video from the model below.
The spinning-logo model from the quickstart has different commands.
Use the separate workspace below to keep both examples available.
Create a test workspace
Install the CLI and start Docker. You also need Python 3.10 or newer for the client script. Run the model and client on the same machine. Stop any model already using port 8080 before starting this one.reactor.yaml, including its build.runtime_version and
runtime.import: model:MyModel. Keep numpy in requirements.txt.
Replace model.py in this workspace with the following:
model.py
(height, width, 3) and dtype uint8.
The three channels are red, green, and blue. The runtime paces output at fps.
A new session starts at brightness 128. The command accepts values from 0 to 255.
Build and run the model
From thebrightness-test workspace, run:
model.py or its dependencies, stop the model and run both commands again.
reactor run reuses an existing image, so rebuild to include your changes.
Check video and commands
Open a second terminal in thebrightness-test workspace.
Install the Python client SDK and NumPy in a virtual environment:
check_model.py in that workspace:
check_model.py
set_brightness with values 128 and 220.
For each command, it waits for a video frame with the expected brightness.
The tolerance allows small differences from video compression.
On success, it prints:
model.py in brightness-test and rebuilt the image.
The spinning-logo model from the quickstart does not accept set_brightness.
Test your own model
Replace the sample with your model, then rebuild and run it. Adapt the command, payload, track name, and frame check in the script to your model. Also test invalid inputs and state reset in a new session. For this sample, brightness values outside0 to 255 produce a validation error.
A new session restores brightness to 128.
A health response or command reply alone does not prove that media reached the client.
This check verifies video delivery and command effects. It does not test GPU inference or model quality.
See Using the SDK for other client operations.