Skip to main content

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 /input for 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

NameTypeRequiredDefault
MODELpath — must exist, file

Options

NameTypeDefaultDescription
--in-portinteger8000Input OSC port.
--out-portinteger9000Output OSC port.
--addressstring127.0.0.1OSC IP address
--device, -dchoice (auto|cpu| ...)cpuComputing device. To list all available devices, run hxmx devices.
--debugbooleanFalseDebug mode. Includes traceback when an error is raised.
-h, --helpbooleanFalseOpen documentation in browser.