run
Given a path to pre-trained (.pt) MODEL, starts a sessions for real-time inference, via OSC.
The following OSC routes are available:
Input routes
-
/input <list>: Triggers a new prediction, given an list of event features. The number of event features must match either the masked or unmasked event size. -
/sample: Generates a random sample from the learned distribution. Useful for kicking off an auto-regressive loop. -
/reset: Resets the model's hidden state (i.e., it's context), as well as cancelling any scheduled predictions, if the model is temporal.
Output routes
/output: Predicted event (unmasked). The predicted event can be sent as is back to/inputfor auto-regression, even if the model is trained on masked features.
tip
Note that, in some cases, running the model on CPU results in lower prediction latency.
Usage
hxmx run <MODEL> [--in-port <INTEGER>] [--out-port <INTEGER>] [--address <TEXT>] [-d <CHOICE>] [--debug] [--help]
Arguments
| Name | Type | Required | Default |
|---|---|---|---|
MODEL | path — must exist, file | ✓ | — |
Options
| Name | Type | Default | Description |
|---|---|---|---|
--in-port | integer | 8000 | Input OSC port. |
--out-port | integer | 9000 | Output OSC port. |
--address | string | 127.0.0.1 | OSC IP address |
--device, -d | choice (auto|cpu| ...) | cpu | Computing device. To list all available devices, run hxmx devices. |
--debug | boolean | False | Debug mode. Includes traceback when an error is raised. |
-h, --help | boolean | False | Open documentation in browser. |