Optionaloptions: MLSidecarOptionsStatic ReadonlyDefaultDefault per-request timeout (ms) — training can be slow.
Static ReadonlyDefaultDefault startup timeout (ms) for the managed Python process.
Static ReadonlyPythonEnv var naming an explicit interpreter for the managed sidecar (and its test runners).
Whether this client is in remote (connect-only) mode.
Whether the sidecar is reachable: remote always counts; managed needs a live child.
The port the managed Python service is listening on, or null (remote / not started).
Use Health.
Check sidecar liveness via GET /health.
Score 1..N rows by POSTing the artifact + frozen preprocessing to /predict.
Use Start.
Start the sidecar.
/health against the configured URL.If already running, this is a no-op.
Use Stop.
Stop the managed Python service. Resolves once the process has exited. In remote mode this is a no-op (the client never owned the process).
Train a model by POSTing the assembled feature matrix to /train.
StaticResolvePick the managed sidecar's interpreter: the explicit pythonPath option, then PREDICTIVE_STUDIO_PYTHON,
then the package's bundled .venv, then python3. Blank strings count as absent at every step.
Self-managing TypeScript client for the Predictive Studio Python ML sidecar.
Two topologies, chosen automatically:
src/python/server.py) on 127.0.0.1 with an ephemeral port, readsPREDICTIVE_STUDIO_SIDECAR_PORT=<n>from its stdout, polls/healthuntil ready, and registers SIGINT/SIGTERM/exit cleanup. On macOS it injectsDYLD_LIBRARY_PATH=/opt/homebrew/opt/libomp/libso xgboost/lightgbm load.urloption is given ORPREDICTIVE_STUDIO_SIDECAR_URLis set, it connects only — no child process is spawned — and start just verifies/health.The request/response contract is owned by
@memberjunction/predictive-studio-core; this client adds no business logic.Example