@model-match/api 3.81.0 → 3.82.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/RELEASE_NOTES.md +7 -0
- package/dist/{index-lozh1XVx.d.mts → index-CgMbNPzN.d.mts} +25 -11
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/slim/index.d.mts +3 -3
- package/dist/slim/index.mjs +3 -3
- package/dist/{src-M8s5qk6q.mjs → src-BY9XwetN.mjs} +2 -2
- package/openapi.json +47 -13
- package/package.json +1 -1
package/RELEASE_NOTES.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Changes to `@model-match/api` that affect how you use it. Each version is generated from the ModelMatch API's OpenAPI spec, so new endpoints and fields appear in the [API reference](https://docs.modelmatch.com/developers) as they ship.
|
|
4
4
|
|
|
5
|
+
## 3.82.0
|
|
6
|
+
|
|
7
|
+
- **Studio models: neighborhood data points need to be enabled for your organization.** Data points marked `needsFairLendingReview` describe the neighborhood a home is in, and a model that uses them needs a fair-lending review before it decides who gets an offer. All response changes are additive.
|
|
8
|
+
- `getStudioModelOptions` returns `neighborhoodDataAllowed`. When it is `false`, show those data points as locked: ask your ModelMatch admin to enable neighborhood data.
|
|
9
|
+
- Until then, `createStudioModel` (including a new version, a model `basedOn` another, or one that leaves `features` out) and `refreshStudioModel` with `retrain: true` answer `403 entitlement_missing` for a model that uses them, naming them in `details.dataPoints` (with `details.entitlementKey`). If access cannot be confirmed right now they answer `502 entitlement_unavailable`: try again in a minute.
|
|
10
|
+
- Refreshing the scores of an existing model is not affected.
|
|
11
|
+
|
|
5
12
|
## 3.81.0
|
|
6
13
|
|
|
7
14
|
- **Studio: a job's alerts can email its creator.** When an alert rule on a saved job matches on a scheduled run, the person who created the job gets one email, and an entry in their notifications, listing every job of theirs that fired. All response changes are additive.
|
|
@@ -14722,16 +14722,18 @@ type StudioModelDeleted = {
|
|
|
14722
14722
|
};
|
|
14723
14723
|
type StudioModelError = {
|
|
14724
14724
|
/**
|
|
14725
|
-
* Stable code. The request: `invalid_request`, `invalid_model`, `invalid_model_name`, `unknown_outcome`, `unknown_data_point`, `blocked_data_point` (a data point that describes today, not the as-of date), `unknown_table`, `unknown_column`, `unsupported_key`. The model: `model_not_found`, `model_exists`, `model_limit_reached`, `model_training_in_progress`, `model_not_ready`. Your own data: `no_date_column`, `data_point_is_outcome`, `data_point_is_key`, `data_point_after_outcome`, `data_point_needs_outcomes_table`, `data_points_missing_for_population`, `too_few_examples`, `too_few_positives`, `outcomes_all_one_class`, `outcome_dates_in_future`, `match_rate_too_low`. Shared: `busy`, `rate_limited`, `no_organization`, `models_unavailable`, `studio_unavailable`.
|
|
14725
|
+
* Stable code. The request: `invalid_request`, `invalid_model`, `invalid_model_name`, `unknown_outcome`, `unknown_data_point`, `blocked_data_point` (a data point that describes today, not the as-of date), `unknown_table`, `unknown_column`, `unsupported_key`. The model: `model_not_found`, `model_exists`, `model_limit_reached`, `model_training_in_progress`, `model_not_ready`. Your own data: `no_date_column`, `data_point_is_outcome`, `data_point_is_key`, `data_point_after_outcome`, `data_point_needs_outcomes_table`, `data_points_missing_for_population`, `too_few_examples`, `too_few_positives`, `outcomes_all_one_class`, `outcome_dates_in_future`, `match_rate_too_low`. Access: `entitlement_missing` (the model uses neighborhood data points your organization has not enabled; `details.dataPoints`), `entitlement_unavailable`. Shared: `busy`, `rate_limited`, `no_organization`, `models_unavailable`, `studio_unavailable`.
|
|
14726
14726
|
*/
|
|
14727
14727
|
code: string;
|
|
14728
14728
|
/**
|
|
14729
|
-
* What the error is about, when known: the `table`, `column` or `dataPoint`, `suggestions`, and the numbers behind a refusal (`examples`, `positives`, `minimum`, `rows`, `matched`, `matchRate`, `limit`, `retryAfterSeconds`).
|
|
14729
|
+
* What the error is about, when known: the `table`, `column` or `dataPoint`, `suggestions`, and the numbers behind a refusal (`examples`, `positives`, `minimum`, `rows`, `matched`, `matchRate`, `limit`, `retryAfterSeconds`); for `entitlement_missing`, the neighborhood `dataPoints` the model uses and the `entitlementKey` to enable.
|
|
14730
14730
|
*/
|
|
14731
14731
|
details?: {
|
|
14732
14732
|
availableTables?: Array<string>;
|
|
14733
14733
|
column?: string;
|
|
14734
14734
|
dataPoint?: string;
|
|
14735
|
+
dataPoints?: Array<string>;
|
|
14736
|
+
entitlementKey?: string;
|
|
14735
14737
|
examples?: number;
|
|
14736
14738
|
function?: string;
|
|
14737
14739
|
limit?: number;
|
|
@@ -14799,7 +14801,7 @@ type StudioModelOptions = {
|
|
|
14799
14801
|
kind: 'number' | 'category';
|
|
14800
14802
|
label: string;
|
|
14801
14803
|
/**
|
|
14802
|
-
* True for data points about the neighbourhood: a model that uses them needs a fair-lending review before it decides who gets an offer.
|
|
14804
|
+
* True for data points about the neighbourhood: a model that uses them needs a fair-lending review before it decides who gets an offer. Training a model on them needs neighborhood data enabled for the organization (`neighborhoodDataAllowed` on the options answer); without it they are locked.
|
|
14803
14805
|
*/
|
|
14804
14806
|
needsFairLendingReview: boolean;
|
|
14805
14807
|
/**
|
|
@@ -14855,6 +14857,10 @@ type StudioModelOptions = {
|
|
|
14855
14857
|
};
|
|
14856
14858
|
type StudioModelOptionsResult = {
|
|
14857
14859
|
data: StudioModelOptions;
|
|
14860
|
+
/**
|
|
14861
|
+
* Whether your organization may train models on the data points marked `needsFairLendingReview`. False: show those data points as locked — they need a fair-lending review; ask your ModelMatch admin to enable neighborhood data. A model that uses them is refused with `403 entitlement_missing` until then. Every other data point is available.
|
|
14862
|
+
*/
|
|
14863
|
+
neighborhoodDataAllowed: boolean;
|
|
14858
14864
|
pricing: {
|
|
14859
14865
|
note: string;
|
|
14860
14866
|
refreshCredits: number;
|
|
@@ -32892,7 +32898,7 @@ type ListStudioModelsErrors = {
|
|
|
32892
32898
|
*/
|
|
32893
32899
|
401: StudioModelError;
|
|
32894
32900
|
/**
|
|
32895
|
-
* `no_organization` — models belong to an organization; select one and try again.
|
|
32901
|
+
* `no_organization` — models belong to an organization; select one and try again. `entitlement_missing` (creating or retraining a model) — the model uses neighborhood data points, which need a fair-lending review: ask your ModelMatch admin to enable neighborhood data, or leave those data points out. `details.dataPoints` names them and `details.entitlementKey` what to enable. Refreshing the scores of an existing model is not affected.
|
|
32896
32902
|
*/
|
|
32897
32903
|
403: StudioModelError;
|
|
32898
32904
|
/**
|
|
@@ -32940,7 +32946,7 @@ type CreateStudioModelErrors = {
|
|
|
32940
32946
|
*/
|
|
32941
32947
|
401: StudioModelError;
|
|
32942
32948
|
/**
|
|
32943
|
-
* `no_organization` — models belong to an organization; select one and try again.
|
|
32949
|
+
* `no_organization` — models belong to an organization; select one and try again. `entitlement_missing` (creating or retraining a model) — the model uses neighborhood data points, which need a fair-lending review: ask your ModelMatch admin to enable neighborhood data, or leave those data points out. `details.dataPoints` names them and `details.entitlementKey` what to enable. Refreshing the scores of an existing model is not affected.
|
|
32944
32950
|
*/
|
|
32945
32951
|
403: StudioModelError;
|
|
32946
32952
|
/**
|
|
@@ -32959,6 +32965,10 @@ type CreateStudioModelErrors = {
|
|
|
32959
32965
|
* `rate_limited` — too many model requests from your organization in the last minute; or `busy` — every training slot across all organizations is taken; try again later. Wait `details.retryAfterSeconds` (also sent as `Retry-After`).
|
|
32960
32966
|
*/
|
|
32961
32967
|
429: StudioModelError;
|
|
32968
|
+
/**
|
|
32969
|
+
* `entitlement_unavailable` — whether your organization can train on neighborhood data could not be confirmed right now; nothing was started. Try again in a minute.
|
|
32970
|
+
*/
|
|
32971
|
+
502: StudioModelError;
|
|
32962
32972
|
/**
|
|
32963
32973
|
* `models_unavailable` — training is switched off right now (reading models and querying published scores still work); `studio_unavailable` — try again in a minute. `billing_unavailable` — the model is finished but could not be charged for right now, so it is not published yet; read it again in a minute (it is never charged twice).
|
|
32964
32974
|
*/
|
|
@@ -32988,7 +32998,7 @@ type GetStudioModelOptionsErrors = {
|
|
|
32988
32998
|
*/
|
|
32989
32999
|
401: StudioModelError;
|
|
32990
33000
|
/**
|
|
32991
|
-
* `no_organization` — models belong to an organization; select one and try again.
|
|
33001
|
+
* `no_organization` — models belong to an organization; select one and try again. `entitlement_missing` (creating or retraining a model) — the model uses neighborhood data points, which need a fair-lending review: ask your ModelMatch admin to enable neighborhood data, or leave those data points out. `details.dataPoints` names them and `details.entitlementKey` what to enable. Refreshing the scores of an existing model is not affected.
|
|
32992
33002
|
*/
|
|
32993
33003
|
403: StudioModelError;
|
|
32994
33004
|
/**
|
|
@@ -33086,7 +33096,7 @@ type DeleteStudioModelErrors = {
|
|
|
33086
33096
|
*/
|
|
33087
33097
|
401: StudioModelError;
|
|
33088
33098
|
/**
|
|
33089
|
-
* `no_organization` — models belong to an organization; select one and try again.
|
|
33099
|
+
* `no_organization` — models belong to an organization; select one and try again. `entitlement_missing` (creating or retraining a model) — the model uses neighborhood data points, which need a fair-lending review: ask your ModelMatch admin to enable neighborhood data, or leave those data points out. `details.dataPoints` names them and `details.entitlementKey` what to enable. Refreshing the scores of an existing model is not affected.
|
|
33090
33100
|
*/
|
|
33091
33101
|
403: StudioModelError;
|
|
33092
33102
|
/**
|
|
@@ -33143,7 +33153,7 @@ type GetStudioModelErrors = {
|
|
|
33143
33153
|
*/
|
|
33144
33154
|
402: StudioModelPaymentRequired;
|
|
33145
33155
|
/**
|
|
33146
|
-
* `no_organization` — models belong to an organization; select one and try again.
|
|
33156
|
+
* `no_organization` — models belong to an organization; select one and try again. `entitlement_missing` (creating or retraining a model) — the model uses neighborhood data points, which need a fair-lending review: ask your ModelMatch admin to enable neighborhood data, or leave those data points out. `details.dataPoints` names them and `details.entitlementKey` what to enable. Refreshing the scores of an existing model is not affected.
|
|
33147
33157
|
*/
|
|
33148
33158
|
403: StudioModelError;
|
|
33149
33159
|
/**
|
|
@@ -33200,7 +33210,7 @@ type RefreshStudioModelErrors = {
|
|
|
33200
33210
|
*/
|
|
33201
33211
|
402: StudioModelPaymentRequired;
|
|
33202
33212
|
/**
|
|
33203
|
-
* `no_organization` — models belong to an organization; select one and try again.
|
|
33213
|
+
* `no_organization` — models belong to an organization; select one and try again. `entitlement_missing` (creating or retraining a model) — the model uses neighborhood data points, which need a fair-lending review: ask your ModelMatch admin to enable neighborhood data, or leave those data points out. `details.dataPoints` names them and `details.entitlementKey` what to enable. Refreshing the scores of an existing model is not affected.
|
|
33204
33214
|
*/
|
|
33205
33215
|
403: StudioModelError;
|
|
33206
33216
|
/**
|
|
@@ -33219,6 +33229,10 @@ type RefreshStudioModelErrors = {
|
|
|
33219
33229
|
* `rate_limited` — too many model requests from your organization in the last minute; or `busy` — every training slot across all organizations is taken; try again later. Wait `details.retryAfterSeconds` (also sent as `Retry-After`).
|
|
33220
33230
|
*/
|
|
33221
33231
|
429: StudioModelError;
|
|
33232
|
+
/**
|
|
33233
|
+
* `entitlement_unavailable` — whether your organization can train on neighborhood data could not be confirmed right now; nothing was started. Try again in a minute.
|
|
33234
|
+
*/
|
|
33235
|
+
502: StudioModelError;
|
|
33222
33236
|
/**
|
|
33223
33237
|
* `models_unavailable` — training is switched off right now (reading models and querying published scores still work); `studio_unavailable` — try again in a minute. `billing_unavailable` — the model is finished but could not be charged for right now, so it is not published yet; read it again in a minute (it is never charged twice).
|
|
33224
33238
|
*/
|
|
@@ -35510,7 +35524,7 @@ declare class Studio {
|
|
|
35510
35524
|
/**
|
|
35511
35525
|
* Create a prediction model and start training it
|
|
35512
35526
|
*
|
|
35513
|
-
* Define a model — what to predict, for whom, in which state, and the data points to use — and start training it. It answers at once with `status: training` and `expectedMinutes`, a range that depends on the size of the state: a couple of minutes for a small state, 15 to 25 for the largest (an estimate; say the range, and say it is an estimate). Read the model with getStudioModel until it is `ready` or `refused`: `progress` gives the numbered step it is on and how long is left. `features` is the heart of it: the data points the person believes matter. Their own knowledge can be data points too — columns of their uploaded outcomes table such as a lead source or a rating their team gives. To learn from their own results instead of a market outcome, pass `outcomeSource` (an uploaded table with a home, a date and what happened on every row); that usually helps most. Everything a model learns from is taken strictly before each case's date, and a data point that could show it the answer is refused with the reason. To try a different list of data points, send the same `name` with `replace: true`, or a new name with `basedOn`: the new report card says what changed. An uploaded file's table is named `upload_<name>` (the upload `my_deals` is the table `upload_my_deals`); a wrong name is refused with the names that exist. A request that cannot work is refused now with a clear reason (`error`, `code`, and the numbers in `details`). An organization can have a few models running at once (3 by default; past that, `409 model_training_in_progress` says how many are running and the limit), and a model runs once at a time; up to 10 models. 50 credits for a model that passes its checks, charged once when it has finished: by the first call that reads it or, if nobody does, on its own within about two hours. A model that is refused or fails is free.
|
|
35527
|
+
* Define a model — what to predict, for whom, in which state, and the data points to use — and start training it. It answers at once with `status: training` and `expectedMinutes`, a range that depends on the size of the state: a couple of minutes for a small state, 15 to 25 for the largest (an estimate; say the range, and say it is an estimate). Read the model with getStudioModel until it is `ready` or `refused`: `progress` gives the numbered step it is on and how long is left. `features` is the heart of it: the data points the person believes matter. Their own knowledge can be data points too — columns of their uploaded outcomes table such as a lead source or a rating their team gives. To learn from their own results instead of a market outcome, pass `outcomeSource` (an uploaded table with a home, a date and what happened on every row); that usually helps most. Everything a model learns from is taken strictly before each case's date, and a data point that could show it the answer is refused with the reason. To try a different list of data points, send the same `name` with `replace: true`, or a new name with `basedOn`: the new report card says what changed. An uploaded file's table is named `upload_<name>` (the upload `my_deals` is the table `upload_my_deals`); a wrong name is refused with the names that exist. Data points marked `needsFairLendingReview` describe the neighborhood and need neighborhood data enabled for the organization (`neighborhoodDataAllowed` on getStudioModelOptions): without it a model that uses them — including one that leaves `features` out, which means every data point — is refused with `403 entitlement_missing`, naming them in `details.dataPoints`; tell the person to ask their ModelMatch admin, or pick other data points. A request that cannot work is refused now with a clear reason (`error`, `code`, and the numbers in `details`). An organization can have a few models running at once (3 by default; past that, `409 model_training_in_progress` says how many are running and the limit), and a model runs once at a time; up to 10 models. 50 credits for a model that passes its checks, charged once when it has finished: by the first call that reads it or, if nobody does, on its own within about two hours. A model that is refused or fails is free.
|
|
35514
35528
|
*/
|
|
35515
35529
|
static createStudioModel<ThrowOnError extends boolean = false>(options: Options<CreateStudioModelData, ThrowOnError>): RequestResult<CreateStudioModelResponses, CreateStudioModelErrors, ThrowOnError>;
|
|
35516
35530
|
/**
|
|
@@ -35540,7 +35554,7 @@ declare class Studio {
|
|
|
35540
35554
|
/**
|
|
35541
35555
|
* Refresh a model's scores with the latest data
|
|
35542
35556
|
*
|
|
35543
|
-
* Score the model's population again as of today, with the trained model as it is. The current scores stay queryable until the new ones are ready; read the model with getStudioModel to see when (`refresh` goes back to null and `scores.asOf` moves); `expectedMinutes` says how long it is expected to take, and `progress` which step it is on. Pass `retrain: true` to also train it again on the latest data (the same data points, a fresh report card; if it no longer passes its checks it becomes `refused` and its scores are taken down). While it retrains the model stays `ready` with its current `card` and scores, and `progress` shows the training exactly as for a new model — the numbered step, the time left and the live `progress.trace`; the new card (with its final `trace`) replaces the current one when the run is published. A model with a `weekly` or `monthly` schedule is refreshed on its own. 10 credits for refreshed scores, charged once, the same way (a scheduled refresh too). 50 credits for a model that passes its checks, charged once when it has finished: by the first call that reads it or, if nobody does, on its own within about two hours. A model that is refused or fails is free.
|
|
35557
|
+
* Score the model's population again as of today, with the trained model as it is. The current scores stay queryable until the new ones are ready; read the model with getStudioModel to see when (`refresh` goes back to null and `scores.asOf` moves); `expectedMinutes` says how long it is expected to take, and `progress` which step it is on. Pass `retrain: true` to also train it again on the latest data (the same data points, a fresh report card; if it no longer passes its checks it becomes `refused` and its scores are taken down). A retrain of a model that uses neighborhood data points needs neighborhood data enabled for the organization, like creating one (`403 entitlement_missing` otherwise); a plain refresh of the scores does not. While it retrains the model stays `ready` with its current `card` and scores, and `progress` shows the training exactly as for a new model — the numbered step, the time left and the live `progress.trace`; the new card (with its final `trace`) replaces the current one when the run is published. A model with a `weekly` or `monthly` schedule is refreshed on its own. 10 credits for refreshed scores, charged once, the same way (a scheduled refresh too). 50 credits for a model that passes its checks, charged once when it has finished: by the first call that reads it or, if nobody does, on its own within about two hours. A model that is refused or fails is free.
|
|
35544
35558
|
*/
|
|
35545
35559
|
static refreshStudioModel<ThrowOnError extends boolean = false>(options: Options<RefreshStudioModelData, ThrowOnError>): RequestResult<RefreshStudioModelResponses, RefreshStudioModelErrors, ThrowOnError>;
|
|
35546
35560
|
/**
|