Applies to version 2.0.1 or later of the Archetype platform.
POST /lens/query), you embedded sensor
windows with Newton Omega 1.4, OmegaEncoder::omega_embeddings_1_4. On the Inference
API, the encoder is Newton Omega 1.5, named omega-embedding
(also newton-omega-1.5). For text, image, and video models, see Migrating from the Direct Query
API.
The Direct Query API is still available and still serves Omega 1.4. Each API serves one version:
Omega 1.4 only on the Direct Query API, Omega 1.5 only on the Inference API. Moving means moving to
Omega 1.5 and rebuilding what you built on Omega 1.4; see Current
Limitations for when to wait.
The request body is the one you know, a data.numeric_array event, but three things change:
- The embeddings are new. Omega 1.5 vectors aren’t comparable with Omega 1.4 vectors, so every library, threshold, and model built on Omega 1.4 embeddings has to be rebuilt.
- The window length is set by a session. Without one, every window is 1024 timesteps. To
embed shorter windows, open a session with the
window_sizeyou want. - All channels go in one request. The answer is one row per window, with each channel’s 768 values in order.
What Changed
Current Limitations
Omega 1.5 on the Inference API was faster than Omega 1.4 on the Direct Query API on each demo we moved. On held-out data, drilling-state accuracy rose from 89% to 95%, water-treatment attack detection stayed about the same with no false alarms, and the wind-turbine demo lost its false alarm but flagged the fault later (see What Changed in Practice). These are the cases where the Direct Query API still fits better:Moving a Script
1
Change the URL and the model
Send the same
data.numeric_array body to /inference/query with "model": "omega-embedding". Without a session, each channel needs exactly 1024 timesteps per window.2
Open a session if your windows aren't 1024 timesteps
Create a session with
window_size and step_size set to your window length, send each
window to the session, and cancel the session when you’re done. See Setting the Window
Length.3
Send all channels in one request
Put every channel of a window in
contents, channel first, and split the channels across
requests only if the body would pass 2 MiB. Channels are encoded independently, so splitting
them gives the same vectors.4
Read the new answer
Each window is one row at
response.response. Slice it into 768 values per channel, in the
order you sent the channels. Check response.success: it’s false when the input is shorter
than the window.5
Rebuild everything built on Omega 1.4 embeddings
Re-embed your reference libraries, recompute thresholds, and retrain any model that reads the
vectors. Then compare a few window lengths again; the best one can change. See What Changed
in Practice.
The Request
On the Direct Query API, a typical client sent one request per channel:Before
After
contents is channel first: one list per sensor, each with the same number of timesteps. Leave
timestamps out; a timestamp column sent as a channel is embedded like any other signal.
The answer keeps the Direct Query shape, with one row per window at response.response:
row[0:768], channel 2 is
row[768:1536], and so on.
Setting the Window Length
Without a session,omega-embedding cuts its input into 1024-timestep windows. To embed a
different length, open a session on the model with window_size and step_size:
window_size can be from 16 to 1024. Windows shorter than 1024 are padded and masked inside the
model, so the padding isn’t read as signal. Set step_size to the same value, so that one slice
of window_size timesteps is exactly one window.
This script embeds the first three 256-timestep windows of a CSV, one row per timestep with a
column per sensor:
embed_windows.py
Session Lifecycle
- Close sessions you’re done with. An organization can keep up to 16 sessions open on a
model. Opening another returns
429with the codesession_limit_reached. A session that isn’t cancelled stays open until it ends on its own. - Reopen a session that has ended. A session ends when it expires, when it’s cancelled, or
when the copy of the model serving it is replaced, for example during a release. Its queries
then return
409with the codesession_not_running. Open a new session and resend the window. - Use one window length per session. To compare lengths, open one session per length.
Normalization
normalize_input is accepted and has no effect: the answer is the same with true or false.
Omega 1.5 standardizes each window itself and passes the window’s original scale to the encoder
alongside it, so a quiet window and a loud window with the same shape still embed differently.
Keep the scaler you used with Omega 1.4: fit one mean and standard deviation per channel on your
reference data and apply it to every window before you send it. On the single-channel quickstart,
the shared scaler still added 7 to 10 points of accuracy at windows of 64 and 256 timesteps.
What Changed in Practice
These notes come from moving our Omega agent skills, the quickstart, and a wind-turbine monitoring demo to the Inference API.Rebuild, Then Re-Measure
For the same four-channel window, the Omega 1.4 and Omega 1.5 vectors had a cosine similarity between -0.03 and 0.02: unrelated. A library built with one version gives wrong answers on vectors from the other, without any error. Rebuild first, then measure again, because results move:
That is the bearing sample from the Omega agent
skill: a
3-nearest-neighbour classifier over four channels, scored on 1000 held-out windows at each
length, with the same scaler for both versions. With Omega
1.4, 256 timesteps did best; with Omega 1.5, 1024 did. With one channel instead of four, 64 did
best (see the quickstart). Compare a few window lengths on your
own data rather than keeping the one you had.
On the wind-turbine demo, Omega 1.5 raised no alert on the healthy turbine, where Omega 1.4 had
raised one, but flagged the faulty turbine about 1.8 days later. Replay a known event before you
rely on new alerts.