SDK reference · Python SDK

prov.trace.probes.create

prov.trace.probes.create in Python SDK.

Signature

prov.trace.probes.create(model_version: str, name: str, weights_b64: str, threshold: float, card: dict, bias: float = …) -> Any

Parameters

model_versionstrRequired
namestrRequired
weights_b64strRequired
thresholdfloatRequired
carddictRequired
biasfloat

Request fields

Idempotency-Keystringheader
Retry a create safely: the same key + request returns the stored response (24 h, per caller).
model_versionstringRequired
The model version, as a registry model ID.
namestringRequired
A name you choose.
weights_b64stringRequired
The probe's weights, base64-encoded float32 values.
biasnumber
The probe's bias term.
thresholdnumberRequired
The trip threshold.
cardobjectRequired
The family's concept card.
Show child attributes
precisionnumber | nullRequired
Measured precision, from 0 to 1.
recallnumber | nullRequired
Measured recall, from 0 to 1.
aurocnumber | nullRequired
Area under the ROC curve, from 0 to 1.
datasetstringRequired
The dataset it was measured on.
nintegerRequired
The number of samples it's based on.
positivesinteger
How many positive examples.
descriptionstring | null
A longer description.

Returns

Any The probe.

HTTP operation

POST /v1/trace/probes: Register a probe

Errors

Example

const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/trace/probes`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "model_version": "qwen2.5-0.5b-instruct@7ae55760",
    "name": "refund_fraud",
    "weights_b64": "AAAAAA",
    "threshold": 0.7,
    "card": {
      "precision": 0.91,
      "recall": 0.84,
      "auroc": 0.95,
      "n": 400,
      "dataset": "Refund-fraud eval set, 400 labeled prompts"
    }
  }),
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.