Synthefy Python Client
synthefy is the lightweight SDK for Synthefy Nori. It owns the
SynthefyNoriClient, shared feature preparation, and backend-neutral
forecasting workflows. Hosted users do not install Torch or model weights;
local execution is supplied by the separate synthefy-nori distribution.
The retired ForecastV2 API and /v2/forecast endpoint are not part of
synthefy 7. Use SynthefyNoriClient directly for regression or
synthefy.nori_ts.NoriTSForecaster for Nori-backed forecasting.
Features
- One regression client: the same
SynthefyNoriClientcontract runs through hosted Baseten, a named SageMaker endpoint, or the local runtime. - Nori forecasting: optional feature preparation and result reconstruction use that same regression gateway.
- Prediction intervals: quantiles and full predictive distributions come from the same forward pass.
- DataFrame, categorical, and text preparation: shared preprocessing keeps local and hosted numeric requests aligned.
- Typed errors and requests: Pydantic request models and one HTTP error hierarchy across remote transports.
Installation
Hosted regression:
pip install synthefy
Local regression:
pip install synthefy-nori
Forecasting:
pip install "synthefy[forecasting]" # hosted or SageMaker
pip install "synthefy-nori[forecasting]" # local runtime
Optional text or SageMaker support:
pip install "synthefy[text]"
pip install "synthefy[aws]"
Nori — DataFrame Forecasting
NoriTSForecaster turns time-series DataFrames into regression requests and
runs every request through a configured SynthefyNoriClient. That keeps the
forecasting workflow identical across hosted Baseten, SageMaker, and local
execution.
Use future_df= when the forecast horizon includes values known in advance.
The target may use a domain-specific name such as sales:
import os
import pandas as pd
from synthefy import SynthefyNoriClient
from synthefy.nori_ts import NoriTSForecaster
history = pd.DataFrame({
"timestamp": pd.date_range("2026-01-01", periods=48, freq="h"),
"sales": [100.0 + hour for hour in range(48)],
"promotion": [0.0] * 48,
})
future = pd.DataFrame({
"timestamp": pd.date_range("2026-01-03", periods=12, freq="h"),
"promotion": [0.0] * 6 + [1.0] * 6,
})
client = SynthefyNoriClient(
mode="remote",
model="nori-6m",
api_key=os.environ["SYNTHEFY_NORI_API_KEY"],
)
forecaster = NoriTSForecaster(
client=client,
quantiles=[0.1, 0.5, 0.9],
)
forecast = forecaster.predict_df(
history,
future_df=future,
target_column="sales",
)
future_df must contain future timestamps and every numeric covariate used in
history. Its target must be absent or entirely missing; observed future targets
would leak the answer. When there are no future covariates, pass
prediction_length= instead and the forecaster generates the horizon.
target_column accepts one column name per call; multiple target columns are
not supported yet.
Nori — Tabular In-Context Regression
SynthefyNoriClient is the lightweight client for Synthefy Nori, an
in-context learning regressor. Each call supplies labeled context rows
(X_train, y_train) and query rows (X_test); the model returns one predicted
value per query row in a single forward pass — there is no training step.
The same client runs predictions against the hosted endpoint, a named AWS
SageMaker endpoint, or locally. Select mode="remote",
mode="sagemaker", or mode="local"; there is no automatic
backend selection and every constructor requires an explicit model=.
Use it from your AI coding assistant
Paste this into Claude Code, Cursor, or any AI coding assistant and it will wire Nori into your own project:
Look at my code/task/report here and figure out where Nori would best fit — it's
Synthefy's tabular foundation model for regression, used through the `synthefy`
client with no training loop and no hyperparameters. It runs fully on your own
machine (local mode, uses your GPU when one's available), or against the hosted
Synthefy API if you'd rather not run it locally.
1. Install it with this project's package manager, with the local runtime
(e.g. `uv add "synthefy-nori"`, or `pip install -U "synthefy-nori"`).
2. Use it wherever a tabular regression / prediction step fits:
```python
from synthefy import SynthefyNoriClient
# model is required -- name a size: "nori-100m" (~98.3M), "nori-30m" (~29.2M),
# or "nori-6m" (~6M base).
client = SynthefyNoriClient(mode="local", model="nori-30m") # runs on this machine, no API key
y_pred = client.predict(
X_train=X_train, # lists, numpy arrays, or pandas — NaNs OK, imputed for you
y_train=y_train, # continuous target
X_test=X_test, # rows to score
) # -> list of floats, one per X_test row (as_pandas=True for a Series)
# Prediction intervals come free — no conformal/quantile add-ons:
lo, mid, hi = client.predict(X_train, y_train, X_test,
output_type="quantiles", quantiles=[0.1, 0.5, 0.9])
```
X is a numeric feature matrix (or a pandas DataFrame — non-numeric columns are
encoded for you); y is a continuous target. If I already have a model, wire Nori
up alongside it on the same train/test split and metric so I can compare them. If
the best place to plug Nori in isn't obvious, show me where you'd put it and
confirm with me before making changes.
Prefer not to run it locally? Use the hosted API instead — create a key at
https://docs.synthefy.com/setup/api_key, then:
`client = SynthefyNoriClient(api_key="YOUR_API_KEY", model="nori-30m")` (or set
SYNTHEFY_NORI_API_KEY).
Hosted Usage (mode="remote")
from synthefy import SynthefyNoriClient
# The key is sent as `Authorization: Bearer <key>` (gateway default).
# Pass it explicitly or set the SYNTHEFY_NORI_API_KEY environment variable.
client = SynthefyNoriClient(api_key="your_api_key", model="nori-30m")
predictions = client.predict(
X_train=[[0.0, 1.0], [1.0, 0.0], [1.0, 1.0]], # context features
y_train=[1.0, 1.0, 2.0], # context targets
X_test=[[2.0, 2.0], [0.5, 0.5]], # query features
)
print(predictions) # -> [<float>, <float>] (one per X_test row)
X_train, y_train, and X_test accept Python lists, numpy arrays, or pandas
objects (a DataFrame for the feature matrices; a Series or single-column
DataFrame for y_train). When both X_train and X_test are DataFrames,
non-numeric columns are encoded for you — fit on X_train and applied
to X_test — so you can pass raw categorical columns directly:
import pandas as pd
X_train = pd.DataFrame({"price": [9.99, 4.50, 7.25], "region": ["NW", "SE", "NW"]})
y_train = pd.Series([120.0, 305.0, 180.0])
X_test = pd.DataFrame({"region": ["SE"], "price": [5.00]}) # order need not match
predictions = client.predict(X_train, y_train, X_test) # 'region' is encoded
By default (categorical_columns="auto") each remaining non-numeric column
becomes a single column of ordinal codes learned from X_train: retained
categories receive deterministic 0..K-1 codes, a rare or unseen value maps to
the bounded K other code, and a missing value stays NaN for server-side
imputation. Pass categorical_columns=["region"] to encode exactly named
columns and reject other strings, or categorical_columns=None to disable
categorical inference. Text and categorical declarations may not overlap. Pass
categorical_encoding="onehot" for the previous one-hot behavior (indicator
columns per category; missing values get their own indicator; unseen values map
to an all-zeros group). An automatically inferred column above
max_categorical_cardinality (default 100) raises an ambiguity error instead of
being silently dropped or embedded. Explicit categoricals use top-K plus
other. Temporal columns require explicit conversion. Numeric columns
(including bool) pass through unchanged,
with NaN imputed server-side. Any object-dtype column is treated as categorical
(including numeric-looking strings such as IDs or zip codes, and object date
values) — cast genuine numeric columns to a numeric dtype if you want them kept as
magnitudes. (Plain lists/numpy arrays must already be numeric — encoding needs
column names.)
For raw text columns, install pip install "synthefy[text]" and name them with
text_columns=. The client embeds those columns and optionally reduces them
with SVD before sending the resulting numeric matrix, so this works in both
local and remote modes:
predictions = client.predict(
X_train,
y_train,
X_test,
text_columns=["review"],
svd_dim=128,
)
Text embedding always happens on the client machine. By default,
text_device="auto" uses CUDA/ROCm when available, then Apple MPS, and falls
back to CPU. Pass text_device="cpu" (or another PyTorch device such as
"cuda:1") to override automatic selection. The remote service receives only
the widened numeric features; remote mode does not move the sentence encoder to
the server.
Shapes are validated client-side: X_train and y_train must have the same
number of rows, and X_test must have the same number of features as X_train.
When both X_train and X_test are DataFrames, X_test is aligned to
X_train's columns by name (so column order is irrelevant), and a mismatch
in the column sets raises. Missing values (NaN) are allowed — you don't need
to fill them in beforehand; the model imputes them server-side.
predict returns a plain list[float] by default. Pass as_pandas=True to
get a pandas Series instead — one value per X_test row, named after y_train
and indexed by X_test's index (when X_test is a DataFrame), so predictions
join straight back:
preds = client.predict(X_train, y_train, X_test, as_pandas=True)
# preds is a pd.Series named after y_train, sharing X_test's index
The client targets the Baseten inference gateway
(https://inference.baseten.co/predict); model= is required and names a size —
"nori-100m" (→ synthefy/nori-100m), "nori-30m" (→ synthefy/nori-30m), or
"nori-6m" (→ synthefy/nori-6m). The
gateway resolves that slug to a deployment, so you never name a deployment yourself.
timeout and max_retries are also configurable on the constructor.
Authentication
- The only credential is your Synthefy Nori API key, created in the Synthefy Console. It authenticates against the Baseten-hosted gateway, but you do not need a Baseten account.
- Provide it via the
api_keyargument or theSYNTHEFY_NORI_API_KEYenvironment variable. It is sent as the headerAuthorization: Bearer <key>, which is what the gateway requires.
Errors
The Nori client reuses the package's exception hierarchy:
- HTTP
400→BadRequestError, carrying the server'serrorstring as the message (e.g. a missing field or unsupported task). - HTTP
401→AuthenticationError(bad or missing key). - Transient errors (timeouts, connection errors,
429,5xx) are retried with exponential backoff, then surface asRateLimitError/InternalServerError/APITimeoutError/APIConnectionError.
Amazon SageMaker Usage (mode="sagemaker")
Install the optional AWS transport and invoke a named real-time endpoint:
pip install "synthefy[aws]"
from synthefy import SynthefyNoriClient
client = SynthefyNoriClient(
mode="sagemaker",
model="nori-30m",
endpoint_name="nori-30m-prod",
region_name="us-east-1",
)
predictions = client.predict(
X_train=[[0.0], [1.0]],
y_train=[0.0, 1.0],
X_test=[[2.0]],
)
The client creates an argument-free boto3.Session() and therefore uses
boto3's standard credential chain: environment/shared config, web identity
(including GitHub OIDC), container or instance roles, and SSO profiles. It does
not accept AWS access keys. model= and endpoint_name= are required: the
endpoint selects the deployed model specification, while the request model is
checked against it so a routing mistake fails closed. Backend selection is always
explicit; installing another package never changes where a request runs.
SageMaker's request is the same Nori JSON contract used by the hosted transport,
sent through InvokeEndpointWithResponseStream with application/json for all three
models. The server emits 15-second heartbeat chunks and one final JSON result, which
the client buffers into the normal predict() return value. This lets large 30M
requests use SageMaker's streaming processing window (up to eight minutes) instead of
the regular invocation's 60-second limit. Container errors retain
their original status/message through the normal Synthefy exception hierarchy;
AWS credential, signing, region, quota, and throttling errors remain native AWS
SDK exceptions. The constructor timeout is SageMaker's per-read inactivity timeout,
not a total stream deadline. Set timeout/retries on the constructor. HTTP-only
extra_headers= are rejected for SageMaker. Per-call timeout= is ignored with
a warning.
Streaming does not increase AWS Marketplace's 25,000,000-byte SageMaker endpoint request-body limit. The client checks the final encoded JSON before invoking the endpoint. It does not split oversized tables because every query must use the same complete in-context training set, so splitting can change the prediction. The planned large-input path is an explicit S3-backed SageMaker Asynchronous Inference API rather than a silent fallback; AWS documents payloads up to 1 GB and processing up to one hour for that service.
Local Usage (mode="local", Optional, No Network)
The same prediction can run locally — no network call and no API key — via the
optional synthefy-nori
package. Install the local runtime:
pip install "synthefy-nori"
Keep the installed synthefy-nori runtime current so it supports the
client options you use and reports recoverable degradation explicitly.
from synthefy import SynthefyNoriClient
client = SynthefyNoriClient(mode="local", model="nori-30m") # no API key needed
predictions = client.predict(
X_train=[[0.0, 1.0], [1.0, 0.0], [1.0, 1.0]],
y_train=[1.0, 1.0, 2.0],
X_test=[[2.0, 2.0]],
)
predict has the same signature in every mode. The synthefy-nori dependency
is imported lazily on first use; if it is not installed, a clear ImportError is
raised telling you to pip install "synthefy-nori".
Local mode also preserves synthefy-nori's degradation warnings and their messages.
With synthefy-nori>=0.13.1, an SVD failure warns under SvdFallbackWarning while
still returning a prediction. Scored or audited runs can turn that warning into an
exception around the client call; the client does not catch, wrap, or rewrite it:
from synthefy_nori import SvdFallbackWarning, strict_pipeline
with strict_pipeline(SvdFallbackWarning):
predictions = client.predict(X_train, y_train, X_test)
Backend selection is explicit. Use mode="local" for in-process execution or
mode="remote" for the hosted endpoint; installing synthefy-nori never changes
an existing client's routing.
Large Tables and Memory (memory_policy=)
Nori does in-context regression, so your table is input: one prediction keeps a
per-layer key/value cache over every context row, and that cache — not the
~6M-parameter model — is what exhausts GPU memory on a big table. memory_policy= decides
what to do about it. Omit it and the defaults handle almost every request.
# A preset...
preds = client.predict(X_train, y_train, X_test, memory_policy="exact") # never quantize
preds = client.predict(X_train, y_train, X_test, memory_policy="max_context") # fit the largest table
# ...individual fields...
preds = client.predict(X_train, y_train, X_test, memory_policy={"cache_dtype": "int8"})
preds = client.predict(X_train, y_train, X_test,
memory_policy={"stream_context": True}) # bounded GPU staging
# ...or the typed model, which ships with the client — no synthefy-nori needed. Validated
# before the request goes out, so a typo or an out-of-range value costs no round trip.
from synthefy import MemoryPolicy
preds = client.predict(X_train, y_train, X_test,
memory_policy=MemoryPolicy(cache_dtype="int8", gpu_budget_frac=0.5))
print(client.last_memory_report["rung"]) # e.g. "resident_bf16"
last_memory_report is how you learn what actually happened, and it is worth reading:
the fallback chosen depends on the replica's free VRAM at that moment, not on your
request, so it is not knowable from your side.
| field | meaning |
|---|---|
rung |
which path served it — ordinary resident_* / offload_*, explicit stream_bf16 / stream_int8, or a lower fallback |
est_cache_gb / resident_gb |
the cache's full-precision size, and its footprint at the chosen precision |
query_chunk |
query rows per forward pass |
dropped_context_rows |
context rows discarded to fit, 0 unless subsampling engaged |
clamped |
fields the server capped (host-RAM budgets only) |
notes |
remarks about the policy you sent, e.g. a budget that cannot take effect |
Only the int8 rungs quantize the cache. Ordinary offload_* moves bytes to host
RAM rather than approximating, so BF16 offload is bit-identical to staying resident.
Explicit streaming is numerically close but not bit-exact even at BF16 because bounded
online attention changes floating-point reduction order.
Use memory_policy={"stream_context": True} when context-attention GPU memory should
stop scaling with context length. It keeps the full context/KV state on the host, reports
stream_bf16 or stream_int8, disables cross-call context reuse, and defaults to a
maximum staged-row cap of 2048. Runtime may use smaller K/V blocks to honor its fixed
FP32 workspace cap; fit-time OOMs retry a bounded 2048 → 1024 → 512 → 256 row ladder.
If the full cache cannot fit the allowed host budget, the request fails clearly
instead of silently switching to plain_loop. Set
memory_policy={"allow_subsample": False} to turn ordinary element-budget context
shortening into an error as well.
One field behaves differently over the network: elements_budget. The cache is only
built when the query set spans more than one chunk, and at default settings that needs
far more query rows than the hosted request-body limit (~64 MiB) allows — so lowering
elements_budget is what lets a hosted request reach the cached path at all.
In mode="local" the same argument works when the installed synthefy-nori exposes
the field. An older runtime raises ImportError with an upgrade hint before inference.
last_memory_report exposes the resolved local report just as it does for hosted calls.
Choosing Context on Large Tables (large_context_policy=)
When a context table is larger than one Nori call can use effectively,
large_context_policy= makes row selection explicit instead of leaving it to a
memory-pressure subsample. It works in local, remote, and sagemaker
modes:
preds = client.predict(
X_train,
y_train,
X_test,
large_context_policy="cluster_route",
large_context_threshold=50_000,
large_context_seed=0,
)
print(client.last_large_context_report)
Here are some commonly used built-in policies:
| policy | hosted status |
|---|---|
"random" |
supported |
"cluster_route" |
supported; recommended default when enabled |
"cluster_route_g4" |
supported |
"safeboost" |
supported |
"boost" |
supported; prefer safeboost |
"target_rank[cap=N]" |
supported; compare caps through a policy-list gate |
Hosted and SageMaker support built-ins from the installed Nori version. See
policies.py for the complete
current list and configuration options. Hosted modes forward one policy-name string
or a list of up to eight names unchanged, including parameter strings such as
"safeboost[nu=0.25]". Custom
callables and module/file policies remain local-only.
large_context_cache_entries is also intentionally absent from the client:
each client call is one-shot, fits the supplied X_train again, and hosted
serving retains no customer context across requests.
For the 32k/64k target-rank comparison, send a list and choose the split that matches row semantics:
preds = client.predict(
X_train,
y_train,
X_test,
large_context_policy=[
"target_rank[cap=32768]",
"target_rank[cap=65536]",
],
large_context_holdout="tail", # chronological; use "random" for IID
)
The response echoes holdout_strategy; the client rejects a response that did
not honor it. The global 64k screen was 3.02x slower than 32k and lost 0.0129
mean R² on four LaDe temporal tables, so 64k is not a default.
The direct arms are measured; selecting between them with a tail gate still
needs a frozen temporal replay before that gate should become a default.
last_large_context_report is cleared before every call and works in all
three modes. It records whether the policy engaged, the honored policy,
threshold and seed, the context window, internal nori_calls, and whether
train-derived state was reused. A hosted client treats a missing or mismatched
report as an unsupported deployment and raises instead of returning a
valid-looking ordinary prediction.
Large-context policies currently return point predictions only
(output_type="mean" or "median"). Quantile/full distributions and Nori
Thinking variants reject the option before inference. Baseten and SageMaker
share this contract; Snowflake SPCS's positional four-value envelope cannot
carry it and rejects an appended options value.
Hosted use is still a full one-shot upload: X_train is sent and policy state
is recomputed on every call. Upload-once/query-many needs a separate,
tenant-isolated session API with authentication, routing, TTL cleanup, storage,
and billing. Also note that cluster_route can make up to eight internal model
calls while the existing gateway usage block still meters public request rows
and columns; production enablement therefore requires an explicit pricing/cost
decision after dev latency measurements.
Prediction Intervals (output_type= / quantiles=)
Nori's forward pass produces a whole predictive distribution, not just a point estimate, so prediction intervals cost nothing extra — no conformal wrapper, no separate quantile models:
lo, mid, hi = client.predict(
X_train, y_train, X_test,
output_type="quantiles", quantiles=[0.1, 0.5, 0.9], # an 80% interval
)
output_type selects what comes back. Shared selectors use the same meanings as
synthefy-nori's NoriRegressor.predict:
output_type |
Returns | Shape |
|---|---|---|
"mean" (default) |
distribution mean — optimal for squared error / R² | list[float], one per X_test row |
"median" |
distribution median — optimal for MAE | list[float] |
"quantiles" |
quantiles at the levels in quantiles= |
(n_levels, n_query) — level-major, so lo, mid, hi = ... unpacks |
"full" |
the whole quantile bank | dict with "quantiles" (n_query, K), "taus" (K,), "mean" (n_query,) |
quantiles= takes tau levels strictly inside (0, 1); it is required by — and
valid only with — output_type="quantiles". The returned rows follow your
order, so quantiles=[0.9, 0.1] gives you high-then-low. Values come back in
original-y units, sorted to a valid (monotone) quantile function per row.
as_pandas=True returns a DataFrame instead: one row per X_test row (indexed
by X_test, so the bands join straight back) and one column per level, named
"<target>[<level>]" — the same convention the forecasting client uses:
bands = client.predict(X_train, y_train, X_test, output_type="quantiles",
quantiles=[0.1, 0.9], as_pandas=True)
bands.columns # ['price[0.1]', 'price[0.9]'] (named after y_train)
Use "full" for CRPS / interval scoring and calibration work; the bank is the
checkpoint's full quantile head (K = 999 on the default checkpoint), so prefer
"quantiles" when you only need a few levels — it keeps the response small.
Capability differs by mode:
-
Local (
pip install synthefy-nori): everyoutput_typeworks. The installed runtime must support the requested distribution output; an older build raisesImportErrorwith an upgrade hint. Quantile and full output require a compatible pinball checkpoint. -
Remote: needs a hosted deployment that serves distribution output. The server echoes back the
output_typeit honored, and the client raises rather than accept a mismatch:ValueError: The hosted deployment did not serve output_type='median': it omitted the output_type field entirely, so it predates distribution output. Such a deployment answers with the distribution mean, which is indistinguishable from a real 'median' result, so this is raised rather than returning means as if they were what you asked for. Use local mode (pip install "synthefy-nori", then mode="local"), or point base_url/endpoint at a deployment that serves distribution output.
That handshake is the point: a deployment that ignores
output_typeanswers with means, which look exactly like a valid"median"result — so silence here would be a confidently wrong answer, not a missing feature.
output_type/quantiles= cannot be combined with discretize= /
categorical_levels= (below): discrete labels and a distribution summary are
different answers, so asking for both raises ValueError. An ordinary
predict(...) call is unaffected by any of this — the request body it sends is
byte-for-byte what it always was.
Categorical / Ordinal Targets (discretize= / categorical_levels=)
When the target only takes a small set of discrete values (a 1–5 rating, a
count, a quality score), pass discretize= and every returned prediction is
one of the target's own levels instead of a continuous estimate:
labels = client.predict(X_train, y_train, X_test, discretize="snap-mean")
labels = client.predict(
X_train, y_train, X_test,
discretize="snap-mean",
categorical_levels=[1, 2, 3, 4, 5], # the full scale, if the context may under-cover it
)
Discretization is strictly opt-in — nothing is snapped unless you ask.
categorical_levels is the set of values the target can take (numeric; order
and duplicates don't matter); it defaults to the distinct values of y_train, which is
leak-safe. A NaN prediction stays NaN rather than becoming a confident
label.
Capability differs by mode:
- Remote: the hosted endpoint returns point predictions (the distribution
mean), so the supported strategy is
discretize="snap-mean"— the nearest level to the point prediction, computed client-side and identical to local"snap-mean". Other strategies raise aValueErrorpointing here. - Local (
pip install "synthefy-nori", with asynthefy-norirecent enough to shipsynthefy_nori.discretize): the full strategy set is forwarded —"map-cell"(accuracy-optimal),"median-cell"(MAE-optimal),"snap-mean"(QWK),"snap-median","expected-level","prior-match". Choose by the metric you are scored on; see thesynthefy-noridocs. An oldersynthefy-noriraises anImportErrorwith an upgrade hint.
If your task is scored by squared error / R², don't discretize — the continuous mean is already optimal for those metrics.
API Reference
SynthefyNoriClient (Tabular Regression)
SynthefyNoriClient(api_key=None, *, mode="remote", timeout=300.0, max_retries=2, base_url=..., endpoint=..., model, user_agent=None, endpoint_name=None, region_name=None)—modelis required everywhere and accepts the released Nori variants (nori-6m,nori-30m,nori-100m, andnori-30m-thinking-medium) or an explicit custom HTTP slug; there is noNone/default model path. SageMaker uses response streaming for every variant so large 30M/100M requests can run beyond the regular-response limit whilepredict()still returns one normal result.mode:"remote"(hosted, default),"local"(in-process viasynthefy-nori), or"sagemaker"(a named SageMaker endpoint using the AWS credential chain).api_key(remote mode) falls back to theSYNTHEFY_NORI_API_KEYenvironment variable. Not required in local mode.- Hosted Nori is reached by gateway slug — that is the path Synthefy meters,
rate-limits and grants per key. To target a single-model endpoint you host
yourself, pass your own
base_url/endpointand an explicit custom model slug.
predict(X_train, y_train, X_test, task="regression", *, output_type="mean", quantiles=None, categorical_columns="auto", max_categorical_cardinality=100, categorical_encoding="ordinal", text_columns=None, svd_dim=128, embedder="minilm", text_device="auto", timeout=None, extra_headers=None) -> List[float]- Returns one predicted value per row of
X_test.timeout/extra_headersapply to remote mode only. output_type=picks what comes back from the predictive distribution:"mean"(default),"median","quantiles"(withquantiles=[...], returns(n_levels, n_query)), or"full"(the whole quantile bank as a dict). See Prediction Intervals. Everything other than"mean"needs local mode or a hosted deployment that serves distribution output.- Inputs accept Python lists, numpy arrays, or pandas DataFrames/Series.
Lists/arrays must be numeric. DataFrame
X_testis aligned toX_trainby column name and named categorical/text roles are replayed from training;categorical_encoding="ordinal"is the default and"onehot"is available; missing values (NaN) are imputed server-side. categorical_columnsis"auto", an exact sequence of names, orNoneto disable inference.max_categorical_cardinality(default 100) bounds retained levels; ambiguous auto columns above it raise, while explicitly named categoricals use top-K plusother.text_columnsembeds named raw-text DataFrame columns client-side. The defaulttext_device="auto"prefers CUDA/ROCm, then Apple MPS, then CPU; install thetextextra and passtext_device="cpu"or another PyTorch device string to override it.as_pandas=Truereturns a pandasSeries(named aftery_train, indexed byX_test) instead of the defaultlist[float]— or aDataFramewith one column per level ("<target>[<level>]") foroutput_type="quantiles"/"full".discretize=/categorical_levels=map predictions onto a discrete target's levels (see Categorical / Ordinal Targets); remote mode supportsdiscretize="snap-mean", local mode the full strategy set of the installedsynthefy-nori.
- Returns one predicted value per row of
mode: the explicitly selected execution mode.close()/ context manager support (with SynthefyNoriClient(...) as client:).
Exception Hierarchy
Import these exceptions from synthefy.errors; all inherit from SynthefyError:
APITimeoutError: Request timed outAPIConnectionError: Network/connection issuesAPIStatusError: Base class for HTTP status errorsBadRequestError(400, 422): Invalid request dataAuthenticationError(401): Invalid API keyPermissionDeniedError(403): Access deniedNotFoundError(404): Resource not foundRateLimitError(429): Rate limit exceededInternalServerError(5xx): Server errors
Each status error includes:
status_code: HTTP status coderequest_id: Request ID for debugging (if available)error_code: API-specific error code (if available)response_body: Raw response body
Configuration
Environment Variables
SYNTHEFY_NORI_API_KEY: Your hosted-Nori API key (SynthefyNoriClient)
Support
For support and questions:
- Email: contact@synthefy.com
License
Apache License 2.0 - see LICENSE file for details.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file synthefy-7.1.3.tar.gz.
File metadata
- Download URL: synthefy-7.1.3.tar.gz
- Upload date:
- Size: 122.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8db3b6646d55ffc96ed83cff96720dd248d119c99095fc92c92c48140888204d
|
|
| MD5 |
8f418ba904199942523629b2585aebb2
|
|
| BLAKE2b-256 |
b898f207372d2cf9969eb5bbe520a897b4a0e59d56a0c85b1857c57f32113158
|
Provenance
The following attestation bundles were made for synthefy-7.1.3.tar.gz:
Publisher:
publish-synthefy.yml on Synthefy/synthefy-nori
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
synthefy-7.1.3.tar.gz -
Subject digest:
8db3b6646d55ffc96ed83cff96720dd248d119c99095fc92c92c48140888204d - Sigstore transparency entry: 2835536734
- Sigstore integration time:
-
Permalink:
Synthefy/synthefy-nori@b486397388c96dd9dddd89547fc66bdd011e6507 -
Branch / Tag:
refs/tags/synthefy-v7.1.3 - Owner: https://github.com/Synthefy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-synthefy.yml@b486397388c96dd9dddd89547fc66bdd011e6507 -
Trigger Event:
release
-
Statement type:
File details
Details for the file synthefy-7.1.3-py3-none-any.whl.
File metadata
- Download URL: synthefy-7.1.3-py3-none-any.whl
- Upload date:
- Size: 112.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3edba88ae7911a9edc43e9200e776c0bcd429d6041a5c5b9aaeb961c9079921e
|
|
| MD5 |
d61a2fd57b724a5db09028da59ef7185
|
|
| BLAKE2b-256 |
aed3d123341d394bd6b44600dca0fd36e7ccd2ccf174ced4575fe247a54c359a
|
Provenance
The following attestation bundles were made for synthefy-7.1.3-py3-none-any.whl:
Publisher:
publish-synthefy.yml on Synthefy/synthefy-nori
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
synthefy-7.1.3-py3-none-any.whl -
Subject digest:
3edba88ae7911a9edc43e9200e776c0bcd429d6041a5c5b9aaeb961c9079921e - Sigstore transparency entry: 2835536771
- Sigstore integration time:
-
Permalink:
Synthefy/synthefy-nori@b486397388c96dd9dddd89547fc66bdd011e6507 -
Branch / Tag:
refs/tags/synthefy-v7.1.3 - Owner: https://github.com/Synthefy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-synthefy.yml@b486397388c96dd9dddd89547fc66bdd011e6507 -
Trigger Event:
release
-
Statement type: