@model-match/api 3.80.1 → 3.81.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/openapi.json CHANGED
@@ -47430,6 +47430,18 @@
47430
47430
  "nullable": true,
47431
47431
  "type": "string"
47432
47432
  },
47433
+ "notify": {
47434
+ "additionalProperties": false,
47435
+ "properties": {
47436
+ "email": {
47437
+ "type": "boolean"
47438
+ }
47439
+ },
47440
+ "required": [
47441
+ "email"
47442
+ ],
47443
+ "type": "object"
47444
+ },
47433
47445
  "schedule": {
47434
47446
  "enum": [
47435
47447
  "manual",
@@ -47785,7 +47797,7 @@
47785
47797
  "additionalProperties": false,
47786
47798
  "properties": {
47787
47799
  "alerts": {
47788
- "description": "Changes between one run and the next worth flagging. A rule that matches is recorded on the run and returned with the job; nothing is sent yet.",
47800
+ "description": "Changes between one run and the next worth flagging. A match is recorded on the run and, on a scheduled run, emailed to the job's creator.",
47789
47801
  "items": {
47790
47802
  "properties": {
47791
47803
  "column": {
@@ -47844,6 +47856,18 @@
47844
47856
  "pattern": "^[a-z][a-z0-9_]{0,62}$",
47845
47857
  "type": "string"
47846
47858
  },
47859
+ "notify": {
47860
+ "additionalProperties": false,
47861
+ "properties": {
47862
+ "email": {
47863
+ "type": "boolean"
47864
+ }
47865
+ },
47866
+ "required": [
47867
+ "email"
47868
+ ],
47869
+ "type": "object"
47870
+ },
47847
47871
  "schedule": {
47848
47872
  "description": "`manual` — runs only when asked. `daily` — about every 24 hours. `weekly` — every 7 days. Counted from when the job is saved.",
47849
47873
  "enum": [
@@ -48050,6 +48074,36 @@
48050
48074
  ],
48051
48075
  "type": "object"
48052
48076
  },
48077
+ "delivery": {
48078
+ "description": "The email about `alerts`. Only a scheduled run where an alert matched has one.",
48079
+ "properties": {
48080
+ "at": {
48081
+ "description": "When it last changed.",
48082
+ "type": "string"
48083
+ },
48084
+ "email": {
48085
+ "description": "`pending` — waiting for the next scheduler tick. `sent` — emailed. `inbox` — in the creator's notifications, but their email for these is off. `off` — the job's `notify.email` is false. `skipped` — nobody to send to (`reason`). `expired` — not sent within a day. `failed` — could not be confirmed sent; never retried.",
48086
+ "enum": [
48087
+ "pending",
48088
+ "sent",
48089
+ "inbox",
48090
+ "off",
48091
+ "skipped",
48092
+ "expired",
48093
+ "failed"
48094
+ ],
48095
+ "type": "string"
48096
+ },
48097
+ "reason": {
48098
+ "type": "string"
48099
+ }
48100
+ },
48101
+ "required": [
48102
+ "email",
48103
+ "at"
48104
+ ],
48105
+ "type": "object"
48106
+ },
48053
48107
  "elapsedMs": {
48054
48108
  "type": "number"
48055
48109
  },
@@ -48169,6 +48223,27 @@
48169
48223
  ],
48170
48224
  "type": "object"
48171
48225
  },
48226
+ "StudioJobUpdate": {
48227
+ "additionalProperties": false,
48228
+ "properties": {
48229
+ "notify": {
48230
+ "additionalProperties": false,
48231
+ "properties": {
48232
+ "email": {
48233
+ "type": "boolean"
48234
+ }
48235
+ },
48236
+ "required": [
48237
+ "email"
48238
+ ],
48239
+ "type": "object"
48240
+ }
48241
+ },
48242
+ "required": [
48243
+ "notify"
48244
+ ],
48245
+ "type": "object"
48246
+ },
48172
48247
  "StudioModel": {
48173
48248
  "properties": {
48174
48249
  "asOf": {
@@ -48179,7 +48254,7 @@
48179
48254
  "additionalProperties": {
48180
48255
  "nullable": true
48181
48256
  },
48182
- "description": "The report card (`ready` and `refused`). Read it to the person as it is written; do not round it up. Show the sentences and the fields named `label`, `…Label`, `sentence`, `detail`, `reason`, `summary` and `note`: they are written in plain words. The fields named `id`, `code`, `verdict`, `better`, `kind`, `table` and `column`, and everything under `technical` and `details`, are for programs: never show them to a person (say `verdictLabel` \"helped a little\", not `verdict` `helped_a_little`). `headline` — one sentence. `outcome.label` — what it predicts. `learnedFrom` — how many past cases and over what dates, and the later cases it was tested on; for a model on the person's own outcomes, `learnedFrom.funnel` — the rows in their file, then how many had a date and an outcome, matched a home, had history before their date and were used, each with the reason rows were dropped (`funnel.sentence` says it in one line). `lift.top10` (and `lift.top1` on large tests) — `modelPer100`, `randomPer100`, `bestSimpleRulePer100` and a ready-made `sentence`. `checks` — three, each `passed` true or false, with a `label` and a `detail`: beats the best simple rule, finds nothing when the outcomes are shuffled, holds up across time periods. `dataPoints.ranking` — each data point's `label`, its share, a `verdictLabel` and a `sentence`, and `dataPoints.summary`. `comparison` — the person's picks against every available data point (`sentence`, `betterLabel`) and `worthAdding`. `changeFromPrevious.sentence` — what changed since the version it replaced or was based on. `calibration.calibrated` — only when true may a home's estimated chance be called a chance; otherwise scores are a ranking; `calibration.note` says it. `caution` — when present, say it first. `caveats` — say them. `refusal` — `reason` and `whatWouldHelp` when refused.",
48257
+ "description": "The report card (`ready` and `refused`). Read it to the person as it is written; do not round it up. Show the sentences and the fields named `label`, `…Label`, `sentence`, `detail`, `reason`, `summary` and `note`: they are written in plain words. The fields named `id`, `code`, `verdict`, `better`, `kind`, `table` and `column`, and everything under `technical` and `details`, are for programs: never show them to a person (say `verdictLabel` \"helped a little\", not `verdict` `helped_a_little`). `headline` — one sentence. `outcome.label` — what it predicts. `learnedFrom` — how many past cases and over what dates, and the later cases it was tested on; for a model on the person's own outcomes, `learnedFrom.funnel` — the rows in their file, then how many had a date and an outcome, matched a home, had history before their date and were used, each with the reason rows were dropped (`funnel.sentence` says it in one line). `lift.top10` (and `lift.top1` on large tests) — `modelPer100`, `randomPer100`, `bestSimpleRulePer100` and a ready-made `sentence`. `checks` — three, each `passed` true or false, with a `label` and a `detail`: beats the best simple rule, finds nothing when the outcomes are shuffled, holds up across time periods. `dataPoints.ranking` — each data point's `label`, its share, a `verdictLabel` and a `sentence`, and `dataPoints.summary`. `comparison` — the person's picks against every available data point (`sentence`, `betterLabel`) and `worthAdding`. `changeFromPrevious.sentence` — what changed since the version it replaced or was based on. `calibration.calibrated` — only when true may a home's estimated chance be called a chance; otherwise scores are a ranking; `calibration.note` says it. `caution` — when present, say it first. `caveats` — say them. `refusal` — `reason` and `whatWouldHelp` when refused. `trace` — the final training trace, the same shape as `progress.trace`, kept so a progress screen can replay how the model learned (getStudioModel only: listStudioModels leaves it out to stay small).",
48183
48258
  "nullable": true,
48184
48259
  "type": "object"
48185
48260
  },
@@ -48322,7 +48397,7 @@
48322
48397
  "type": "string"
48323
48398
  },
48324
48399
  "progress": {
48325
- "description": "While the model trains: the step it is on, how long it has been, and how long is left (an estimate). Tell the person the step and the remaining range, as a range.",
48400
+ "description": "While a run is going — a new model training, a retrain of a ready model (which stays `ready`, with its current card and scores, until the new version is published) or a re-score: the step it is on, how long it has been, and how long is left (an estimate). Tell the person the step and the remaining range, as a range. Null when nothing is running.",
48326
48401
  "nullable": true,
48327
48402
  "properties": {
48328
48403
  "elapsedSeconds": {
@@ -48346,6 +48421,14 @@
48346
48421
  ],
48347
48422
  "type": "object"
48348
48423
  },
48424
+ "kind": {
48425
+ "description": "`train` — a new model, a new version or a retrain (`refresh` with `retrain: true`): the report card is rebuilt, and `trace` appears once learning starts. `score` — a re-score with the trained model as it is: three steps and no trace.",
48426
+ "enum": [
48427
+ "train",
48428
+ "score"
48429
+ ],
48430
+ "type": "string"
48431
+ },
48349
48432
  "note": {
48350
48433
  "description": "Says that the times are estimates, or that the run is past its estimate and still going. Pass it on.",
48351
48434
  "type": "string"
@@ -48379,6 +48462,306 @@
48379
48462
  },
48380
48463
  "steps": {
48381
48464
  "type": "number"
48465
+ },
48466
+ "trace": {
48467
+ "description": "The live training trace, once training has started (absent before). Poll the model every few seconds to animate it; when the model is done the final one is `card.trace`. What a progress screen can draw while a model trains, and replay after: the backtest grid, the score by round, and how much each chosen data point matters as the model learns. Rewritten about once a second while learning; at most about 16 KB. Aggregates only: no home, row or id, and data points by their labels.",
48468
+ "properties": {
48469
+ "backtest": {
48470
+ "description": "The backtest replay: in each period the model had not seen, its cases ranked by the model's score and cut into columns, best-scored first.",
48471
+ "properties": {
48472
+ "frames": {
48473
+ "description": "The grid as the model learned, oldest first, for replay (thinned to fit; the first and the latest are kept). Column sizes are the period's `columnCases`.",
48474
+ "items": {
48475
+ "properties": {
48476
+ "final": {
48477
+ "description": "True on the last frame: the model that was kept (at `bestRound`).",
48478
+ "type": "boolean"
48479
+ },
48480
+ "hits": {
48481
+ "description": "`hits` for each period, in the order of `periods`.",
48482
+ "items": {
48483
+ "items": {
48484
+ "type": "number"
48485
+ },
48486
+ "type": "array"
48487
+ },
48488
+ "type": "array"
48489
+ },
48490
+ "round": {
48491
+ "type": "number"
48492
+ },
48493
+ "seq": {
48494
+ "description": "Counts up with every frame drawn.",
48495
+ "type": "number"
48496
+ }
48497
+ },
48498
+ "required": [
48499
+ "seq",
48500
+ "round",
48501
+ "hits"
48502
+ ],
48503
+ "type": "object"
48504
+ },
48505
+ "type": "array"
48506
+ },
48507
+ "minCasesPerColumn": {
48508
+ "description": "Every column holds at least this many cases: with fewer cases the columns are merged, and a period too small for four columns has none.",
48509
+ "type": "number"
48510
+ },
48511
+ "periods": {
48512
+ "description": "One row of columns per held-out test period, oldest first: the hero grid. Aggregate counts only.",
48513
+ "items": {
48514
+ "properties": {
48515
+ "cases": {
48516
+ "description": "Cases in this period the grid is drawn from (an even sample of at most 60,000 across all periods on a very large test).",
48517
+ "type": "number"
48518
+ },
48519
+ "columnCases": {
48520
+ "description": "Cases per column. Column 1 holds the cases the model scored highest, the last the lowest. Sizes differ by at most one.",
48521
+ "items": {
48522
+ "type": "number"
48523
+ },
48524
+ "type": "array"
48525
+ },
48526
+ "columns": {
48527
+ "description": "How many columns this period is cut into (up to 56; 0 when it has too few cases to show).",
48528
+ "type": "number"
48529
+ },
48530
+ "hits": {
48531
+ "description": "How many cases in each column had the outcome, as the model ranks them now. `hits[i] / columnCases[i]` is the column's hit rate.",
48532
+ "items": {
48533
+ "type": "number"
48534
+ },
48535
+ "type": "array"
48536
+ },
48537
+ "label": {
48538
+ "description": "The period in plain words (\"January 2024\").",
48539
+ "type": "string"
48540
+ },
48541
+ "period": {
48542
+ "description": "The first day of the held-out test period (YYYY-MM-DD).",
48543
+ "type": "string"
48544
+ },
48545
+ "simpleRuleHits": {
48546
+ "description": "The same, with the cases ranked by the best simple rule instead (the comparison the card's checks use). It does not change while training.",
48547
+ "items": {
48548
+ "type": "number"
48549
+ },
48550
+ "type": "array"
48551
+ },
48552
+ "verdict": {
48553
+ "description": "Once the checks are read: `ahead`, `level`, `behind` or `unknown` (for programs).",
48554
+ "type": "string"
48555
+ },
48556
+ "verdictLabel": {
48557
+ "description": "The verdict in plain words: \"beat the simple rule\", \"kept up with the simple rule\", \"fell behind the simple rule\".",
48558
+ "type": "string"
48559
+ },
48560
+ "withTheOutcome": {
48561
+ "type": "number"
48562
+ }
48563
+ },
48564
+ "required": [
48565
+ "period",
48566
+ "label",
48567
+ "cases",
48568
+ "withTheOutcome",
48569
+ "columns",
48570
+ "columnCases",
48571
+ "hits",
48572
+ "simpleRuleHits"
48573
+ ],
48574
+ "type": "object"
48575
+ },
48576
+ "type": "array"
48577
+ }
48578
+ },
48579
+ "required": [
48580
+ "minCasesPerColumn",
48581
+ "periods",
48582
+ "frames"
48583
+ ],
48584
+ "type": "object"
48585
+ },
48586
+ "bestRound": {
48587
+ "description": "Once fitting is done: the round that was kept. Rounds after it were tried and discarded because they stopped helping. Null while learning.",
48588
+ "nullable": true,
48589
+ "type": "number"
48590
+ },
48591
+ "fieldFrames": {
48592
+ "description": "How the shares evolved: each frame's `shares` lines up with `fields` by position. At most 24 frames, oldest first.",
48593
+ "items": {
48594
+ "properties": {
48595
+ "round": {
48596
+ "type": "number"
48597
+ },
48598
+ "shares": {
48599
+ "items": {
48600
+ "type": "number"
48601
+ },
48602
+ "type": "array"
48603
+ }
48604
+ },
48605
+ "required": [
48606
+ "round",
48607
+ "shares"
48608
+ ],
48609
+ "type": "object"
48610
+ },
48611
+ "type": "array"
48612
+ },
48613
+ "fields": {
48614
+ "description": "The data points that were chosen, in the order they were chosen.",
48615
+ "items": {
48616
+ "properties": {
48617
+ "label": {
48618
+ "description": "The data point, as the person picked it.",
48619
+ "type": "string"
48620
+ },
48621
+ "sharePercent": {
48622
+ "description": "How much the model leans on this data point right now, as a share of 100 across the chosen data points. Not how much it causes the outcome. When the run is done this is the card's own share.",
48623
+ "type": "number"
48624
+ },
48625
+ "source": {
48626
+ "description": "`market` or `upload` (for programs).",
48627
+ "type": "string"
48628
+ },
48629
+ "sourceLabel": {
48630
+ "description": "\"market data\" or \"your own data\".",
48631
+ "type": "string"
48632
+ }
48633
+ },
48634
+ "required": [
48635
+ "label",
48636
+ "source",
48637
+ "sourceLabel",
48638
+ "sharePercent"
48639
+ ],
48640
+ "type": "object"
48641
+ },
48642
+ "type": "array"
48643
+ },
48644
+ "phase": {
48645
+ "description": "`learning` — the model is being fitted round by round; `checking` — fitting is done and the checks are running (shuffled outcomes, the comparison with every data point, scoring); `done` — finished, see `result`; `refused` — the model was not trained, see `rejected` and `result`. Only moves forward.",
48646
+ "example": "learning",
48647
+ "type": "string"
48648
+ },
48649
+ "phaseLabel": {
48650
+ "description": "`phase` in plain words, for a person.",
48651
+ "example": "Learning from past cases",
48652
+ "type": "string"
48653
+ },
48654
+ "rejected": {
48655
+ "description": "Data points turned away before training, each with the reason in plain words. Empty when none were.",
48656
+ "items": {
48657
+ "properties": {
48658
+ "label": {
48659
+ "type": "string"
48660
+ },
48661
+ "reason": {
48662
+ "type": "string"
48663
+ }
48664
+ },
48665
+ "required": [
48666
+ "label",
48667
+ "reason"
48668
+ ],
48669
+ "type": "object"
48670
+ },
48671
+ "type": "array"
48672
+ },
48673
+ "result": {
48674
+ "description": "When the run is done (or refused).",
48675
+ "properties": {
48676
+ "caution": {
48677
+ "description": "True when the model passed but fell behind the simple rule in part of the test period. Say so first.",
48678
+ "type": "boolean"
48679
+ },
48680
+ "label": {
48681
+ "description": "The result in plain words.",
48682
+ "type": "string"
48683
+ },
48684
+ "status": {
48685
+ "description": "`ready` or `refused` (for programs).",
48686
+ "type": "string"
48687
+ }
48688
+ },
48689
+ "required": [
48690
+ "status",
48691
+ "caution",
48692
+ "label"
48693
+ ],
48694
+ "type": "object"
48695
+ },
48696
+ "round": {
48697
+ "description": "The boosting round the model has reached so far.",
48698
+ "type": "number"
48699
+ },
48700
+ "rounds": {
48701
+ "description": "The model's score by boosting round, for a line chart.",
48702
+ "properties": {
48703
+ "label": {
48704
+ "description": "What the curve shows, in plain words.",
48705
+ "type": "string"
48706
+ },
48707
+ "lowerIsBetter": {
48708
+ "type": "boolean"
48709
+ },
48710
+ "points": {
48711
+ "description": "`[round, value]` pairs in round order, at most about 100 (thinned evenly as rounds go on; the latest round is always last). One value per round, measured on the cases held back to tune the model.",
48712
+ "example": [
48713
+ [
48714
+ 1,
48715
+ 0.39
48716
+ ],
48717
+ [
48718
+ 40,
48719
+ 0.322
48720
+ ],
48721
+ [
48722
+ 107,
48723
+ 0.3186
48724
+ ]
48725
+ ],
48726
+ "items": {
48727
+ "items": {
48728
+ "type": "number"
48729
+ },
48730
+ "type": "array"
48731
+ },
48732
+ "type": "array"
48733
+ }
48734
+ },
48735
+ "required": [
48736
+ "label",
48737
+ "lowerIsBetter",
48738
+ "points"
48739
+ ],
48740
+ "type": "object"
48741
+ },
48742
+ "update": {
48743
+ "description": "Counts up by one every time the trace is rewritten (about once a second while learning). Use it to tell a new trace from one you already drew.",
48744
+ "type": "number"
48745
+ },
48746
+ "version": {
48747
+ "description": "Shape version of this block. `1` today.",
48748
+ "type": "number"
48749
+ }
48750
+ },
48751
+ "required": [
48752
+ "version",
48753
+ "phase",
48754
+ "phaseLabel",
48755
+ "update",
48756
+ "round",
48757
+ "bestRound",
48758
+ "rounds",
48759
+ "fields",
48760
+ "fieldFrames",
48761
+ "rejected",
48762
+ "backtest"
48763
+ ],
48764
+ "type": "object"
48382
48765
  }
48383
48766
  },
48384
48767
  "required": [
@@ -48388,7 +48771,7 @@
48388
48771
  "type": "object"
48389
48772
  },
48390
48773
  "refresh": {
48391
- "description": "A refresh in progress, or why the last one produced nothing (the earlier scores stay).",
48774
+ "description": "A refresh in progress (a re-score, or a retrain of a model that has a version: `progress` has its steps), or why the last one produced nothing (the earlier scores stay).",
48392
48775
  "nullable": true,
48393
48776
  "properties": {
48394
48777
  "elapsedSeconds": {
@@ -48762,6 +49145,9 @@
48762
49145
  "rows": {
48763
49146
  "type": "number"
48764
49147
  },
49148
+ "running": {
49149
+ "type": "number"
49150
+ },
48765
49151
  "suggestions": {
48766
49152
  "items": {
48767
49153
  "type": "string"
@@ -49339,6 +49725,339 @@
49339
49725
  ],
49340
49726
  "type": "object"
49341
49727
  },
49728
+ "StudioPublishedModel": {
49729
+ "properties": {
49730
+ "asOf": {
49731
+ "description": "The day the scores are as of.",
49732
+ "nullable": true,
49733
+ "type": "string"
49734
+ },
49735
+ "caution": {
49736
+ "description": "The caution, when there is one. Say it first, before anything else on the card.",
49737
+ "nullable": true,
49738
+ "type": "string"
49739
+ },
49740
+ "caveats": {
49741
+ "description": "Limits of the model. Say them.",
49742
+ "items": {
49743
+ "type": "string"
49744
+ },
49745
+ "type": "array"
49746
+ },
49747
+ "dataPoints": {
49748
+ "properties": {
49749
+ "note": {
49750
+ "nullable": true,
49751
+ "type": "string"
49752
+ },
49753
+ "rejected": {
49754
+ "description": "Data points the model was given and barely used: they added little.",
49755
+ "items": {
49756
+ "properties": {
49757
+ "label": {
49758
+ "type": "string"
49759
+ },
49760
+ "sentence": {
49761
+ "nullable": true,
49762
+ "type": "string"
49763
+ },
49764
+ "sharePercent": {
49765
+ "nullable": true,
49766
+ "type": "number"
49767
+ }
49768
+ },
49769
+ "required": [
49770
+ "label",
49771
+ "sharePercent",
49772
+ "sentence"
49773
+ ],
49774
+ "type": "object"
49775
+ },
49776
+ "type": "array"
49777
+ },
49778
+ "summary": {
49779
+ "nullable": true,
49780
+ "type": "string"
49781
+ },
49782
+ "used": {
49783
+ "description": "The data points that mattered, strongest first.",
49784
+ "items": {
49785
+ "properties": {
49786
+ "label": {
49787
+ "type": "string"
49788
+ },
49789
+ "sentence": {
49790
+ "nullable": true,
49791
+ "type": "string"
49792
+ },
49793
+ "sharePercent": {
49794
+ "description": "How much the model leaned on it, as a share of everything it relied on — not how much it causes the outcome.",
49795
+ "nullable": true,
49796
+ "type": "number"
49797
+ },
49798
+ "verdictLabel": {
49799
+ "example": "helped a little",
49800
+ "nullable": true,
49801
+ "type": "string"
49802
+ }
49803
+ },
49804
+ "required": [
49805
+ "label",
49806
+ "sharePercent",
49807
+ "verdictLabel",
49808
+ "sentence"
49809
+ ],
49810
+ "type": "object"
49811
+ },
49812
+ "type": "array"
49813
+ }
49814
+ },
49815
+ "required": [
49816
+ "used",
49817
+ "rejected",
49818
+ "summary",
49819
+ "note"
49820
+ ],
49821
+ "type": "object"
49822
+ },
49823
+ "description": {
49824
+ "type": "string"
49825
+ },
49826
+ "hasCaution": {
49827
+ "description": "True when it is published with a caution.",
49828
+ "type": "boolean"
49829
+ },
49830
+ "headline": {
49831
+ "description": "The report card in one sentence. Read it as written.",
49832
+ "nullable": true,
49833
+ "type": "string"
49834
+ },
49835
+ "homes": {
49836
+ "description": "Homes on the scored list.",
49837
+ "type": "number"
49838
+ },
49839
+ "learnedFrom": {
49840
+ "description": "What it learned from, and was tested on.",
49841
+ "nullable": true,
49842
+ "properties": {
49843
+ "cases": {
49844
+ "nullable": true,
49845
+ "type": "number"
49846
+ },
49847
+ "from": {
49848
+ "nullable": true,
49849
+ "type": "string"
49850
+ },
49851
+ "sentence": {
49852
+ "nullable": true,
49853
+ "type": "string"
49854
+ },
49855
+ "testedOn": {
49856
+ "properties": {
49857
+ "cases": {
49858
+ "nullable": true,
49859
+ "type": "number"
49860
+ },
49861
+ "from": {
49862
+ "nullable": true,
49863
+ "type": "string"
49864
+ },
49865
+ "to": {
49866
+ "nullable": true,
49867
+ "type": "string"
49868
+ },
49869
+ "withTheOutcome": {
49870
+ "nullable": true,
49871
+ "type": "number"
49872
+ }
49873
+ },
49874
+ "required": [
49875
+ "cases",
49876
+ "withTheOutcome",
49877
+ "from",
49878
+ "to"
49879
+ ],
49880
+ "type": "object"
49881
+ },
49882
+ "to": {
49883
+ "nullable": true,
49884
+ "type": "string"
49885
+ },
49886
+ "withTheOutcome": {
49887
+ "nullable": true,
49888
+ "type": "number"
49889
+ }
49890
+ },
49891
+ "required": [
49892
+ "sentence",
49893
+ "cases",
49894
+ "withTheOutcome",
49895
+ "from",
49896
+ "to",
49897
+ "testedOn"
49898
+ ],
49899
+ "type": "object"
49900
+ },
49901
+ "metrics": {
49902
+ "properties": {
49903
+ "calibrated": {
49904
+ "description": "Only when true may a home's score be called a chance. Otherwise scores are a ranking only.",
49905
+ "type": "boolean"
49906
+ },
49907
+ "calibrationNote": {
49908
+ "nullable": true,
49909
+ "type": "string"
49910
+ },
49911
+ "checks": {
49912
+ "description": "Beats the best simple rule; finds nothing in shuffled outcomes; holds up over time.",
49913
+ "items": {
49914
+ "properties": {
49915
+ "detail": {
49916
+ "nullable": true,
49917
+ "type": "string"
49918
+ },
49919
+ "label": {
49920
+ "type": "string"
49921
+ },
49922
+ "passed": {
49923
+ "type": "boolean"
49924
+ }
49925
+ },
49926
+ "required": [
49927
+ "label",
49928
+ "passed",
49929
+ "detail"
49930
+ ],
49931
+ "type": "object"
49932
+ },
49933
+ "type": "array"
49934
+ },
49935
+ "top1": {
49936
+ "description": "The top 1% of the list, on large tests only.",
49937
+ "nullable": true,
49938
+ "properties": {
49939
+ "bestSimpleRulePer100": {
49940
+ "description": "The same when sorting by the best single data point.",
49941
+ "nullable": true,
49942
+ "type": "number"
49943
+ },
49944
+ "modelPer100": {
49945
+ "description": "Of every 100 homes at the top of the list, how many had the outcome.",
49946
+ "nullable": true,
49947
+ "type": "number"
49948
+ },
49949
+ "randomPer100": {
49950
+ "description": "The same for 100 homes picked at random.",
49951
+ "nullable": true,
49952
+ "type": "number"
49953
+ },
49954
+ "sentence": {
49955
+ "nullable": true,
49956
+ "type": "string"
49957
+ },
49958
+ "topPercent": {
49959
+ "nullable": true,
49960
+ "type": "number"
49961
+ }
49962
+ },
49963
+ "required": [
49964
+ "topPercent",
49965
+ "modelPer100",
49966
+ "randomPer100",
49967
+ "bestSimpleRulePer100",
49968
+ "sentence"
49969
+ ],
49970
+ "type": "object"
49971
+ },
49972
+ "top10": {
49973
+ "nullable": true,
49974
+ "properties": {
49975
+ "bestSimpleRulePer100": {
49976
+ "description": "The same when sorting by the best single data point.",
49977
+ "nullable": true,
49978
+ "type": "number"
49979
+ },
49980
+ "modelPer100": {
49981
+ "description": "Of every 100 homes at the top of the list, how many had the outcome.",
49982
+ "nullable": true,
49983
+ "type": "number"
49984
+ },
49985
+ "randomPer100": {
49986
+ "description": "The same for 100 homes picked at random.",
49987
+ "nullable": true,
49988
+ "type": "number"
49989
+ },
49990
+ "sentence": {
49991
+ "nullable": true,
49992
+ "type": "string"
49993
+ },
49994
+ "topPercent": {
49995
+ "nullable": true,
49996
+ "type": "number"
49997
+ }
49998
+ },
49999
+ "required": [
50000
+ "topPercent",
50001
+ "modelPer100",
50002
+ "randomPer100",
50003
+ "bestSimpleRulePer100",
50004
+ "sentence"
50005
+ ],
50006
+ "type": "object"
50007
+ }
50008
+ },
50009
+ "required": [
50010
+ "top10",
50011
+ "top1",
50012
+ "checks",
50013
+ "calibrated",
50014
+ "calibrationNote"
50015
+ ],
50016
+ "type": "object"
50017
+ },
50018
+ "predicts": {
50019
+ "description": "What the model predicts, in plain words.",
50020
+ "nullable": true,
50021
+ "type": "string"
50022
+ },
50023
+ "refreshedAt": {
50024
+ "description": "When the scores were last computed (ISO 8601).",
50025
+ "type": "string"
50026
+ },
50027
+ "table": {
50028
+ "description": "The table its scores are in, the same for every organization. Query it with Studio.",
50029
+ "example": "mm_model_refi_watch",
50030
+ "type": "string"
50031
+ }
50032
+ },
50033
+ "required": [
50034
+ "table",
50035
+ "description",
50036
+ "homes",
50037
+ "refreshedAt",
50038
+ "asOf",
50039
+ "predicts",
50040
+ "headline",
50041
+ "hasCaution",
50042
+ "caution",
50043
+ "learnedFrom",
50044
+ "metrics",
50045
+ "dataPoints",
50046
+ "caveats"
50047
+ ],
50048
+ "type": "object"
50049
+ },
50050
+ "StudioPublishedModelResult": {
50051
+ "properties": {
50052
+ "data": {
50053
+ "$ref": "#/components/schemas/StudioPublishedModel"
50054
+ }
50055
+ },
50056
+ "required": [
50057
+ "data"
50058
+ ],
50059
+ "type": "object"
50060
+ },
49342
50061
  "StudioQueryRequest": {
49343
50062
  "additionalProperties": false,
49344
50063
  "properties": {
@@ -50695,7 +51414,7 @@
50695
51414
  "info": {
50696
51415
  "description": "ModelMatch API — mortgage and real-estate market data.\n\n## Bulk delivery limits\n\nThe `POST /{entity}/bulk-delivery` endpoints export a full result set to\nS3 as NDJSON, JSON, CSV, or Parquet.\n\n- **Up to 5,000 rows per delivery: no entitlement required.** Available to\n every authenticated caller.\n- **Above 5,000 rows: requires the entity's `bulk-delivery.{entity}`\n entitlement** (e.g. `bulk-delivery.loans`). The grant's scope sets your\n row ceiling and may also restrict which rows and fields you receive.\n\nA delivery that would exceed the limit available to you is rejected with\n`403 entitlement_missing`, reporting the matched row count and the ceiling\nthat applied. To stay under the limit, pass `limit` — the job then delivers\n(and bills for) only the first `limit` rows of a broader query.\n\n**Need a higher limit?** Email support@modelmatch.com to request the\nentitlement. Limits are raised per organization and per entity.\n\nBulk delivery is billed at 1 credit per delivered row whether or not\nan entitlement is held.\n\nInstead of a download, a delivery can be sent to a push target configured\non your workspace: pass `destination: { type: \"push-target\", targetId }`.\nThe same limits and billing apply.",
50697
51416
  "title": "ModelMatch API",
50698
- "version": "3.164.1"
51417
+ "version": "3.165.0"
50699
51418
  },
50700
51419
  "openapi": "3.1.0",
50701
51420
  "paths": {
@@ -89763,126 +90482,354 @@
89763
90482
  "description": "`studio_unavailable` — Studio is not available right now."
89764
90483
  }
89765
90484
  },
89766
- "summary": "Your organization's saved jobs",
90485
+ "summary": "Your organization's saved jobs",
90486
+ "tags": [
90487
+ "Studio"
90488
+ ]
90489
+ },
90490
+ "post": {
90491
+ "description": "Save a SQL question to run again: on a schedule (`daily`, `weekly`) or only when asked (`manual`). Each run stores its result as a table named after the job, which later questions — and later jobs — can query like any other table. Name the `keys` (the columns that identify one row) to get 'what changed since the last run', and add `alerts` to flag new rows, removed rows or a number crossing a threshold. When an alert matches on a scheduled run, the job's creator is emailed (once per hourly tick, every job of theirs in one email, also in their notifications); `notify: { email: false }` saves the job without those emails, and `updateStudioJob` changes it later. Webhooks are not available yet. The SQL is checked when the job is saved: an unknown table or column, or a key that is not in the result, is refused here rather than at the first run. Saving does not run the job. Saving is free; each run that succeeds costs 10 credits, including the runs a `daily` or `weekly` schedule starts.",
90492
+ "operationId": "createStudioJob",
90493
+ "requestBody": {
90494
+ "content": {
90495
+ "application/json": {
90496
+ "schema": {
90497
+ "$ref": "#/components/schemas/StudioJobRequest"
90498
+ }
90499
+ }
90500
+ },
90501
+ "required": true
90502
+ },
90503
+ "responses": {
90504
+ "201": {
90505
+ "content": {
90506
+ "application/json": {
90507
+ "schema": {
90508
+ "$ref": "#/components/schemas/StudioJobSaved"
90509
+ }
90510
+ }
90511
+ },
90512
+ "description": "The saved job"
90513
+ },
90514
+ "400": {
90515
+ "content": {
90516
+ "application/json": {
90517
+ "schema": {
90518
+ "$ref": "#/components/schemas/StudioError"
90519
+ }
90520
+ }
90521
+ },
90522
+ "description": "The request was refused, and `error` says why: SQL that is not a single read-only SELECT, an unknown table (`details.table`, `details.availableTables`), an unknown column (`details.column`, `details.suggestions`), a function that is not available (`details.function`), or a job that could not run as written (`invalid_job`)."
90523
+ },
90524
+ "401": {
90525
+ "content": {
90526
+ "application/json": {
90527
+ "schema": {
90528
+ "$ref": "#/components/schemas/StudioError"
90529
+ }
90530
+ }
90531
+ },
90532
+ "description": "Authentication required."
90533
+ },
90534
+ "403": {
90535
+ "content": {
90536
+ "application/json": {
90537
+ "schema": {
90538
+ "$ref": "#/components/schemas/StudioError"
90539
+ }
90540
+ }
90541
+ },
90542
+ "description": "`no_organization` — Studio works inside an organization: select one and retry. `studio_not_enabled` — Studio is in a limited preview and is not enabled for this account."
90543
+ },
90544
+ "404": {
90545
+ "content": {
90546
+ "application/json": {
90547
+ "schema": {
90548
+ "$ref": "#/components/schemas/StudioError"
90549
+ }
90550
+ }
90551
+ },
90552
+ "description": "`job_not_found` — your organization has no job of that name. `query_not_found` — your organization has no background question of that id."
90553
+ },
90554
+ "409": {
90555
+ "content": {
90556
+ "application/json": {
90557
+ "schema": {
90558
+ "$ref": "#/components/schemas/StudioError"
90559
+ }
90560
+ }
90561
+ },
90562
+ "description": "`job_exists` — the name is taken; `job_limit_reached` — your organization is at its limit of saved jobs (`details.limit`); `job_running` — another job is running for your organization, retry when it has finished."
90563
+ },
90564
+ "422": {
90565
+ "content": {
90566
+ "application/json": {
90567
+ "schema": {
90568
+ "$ref": "#/components/schemas/StudioError"
90569
+ }
90570
+ }
90571
+ },
90572
+ "description": "The SQL is valid but asks for more than one answer may cost: `timeout` (it ran for its whole time, in the background included, and was stopped — narrow it by state or date; or it could not carry on in the background because another question of your organization already is), `result_too_large`, `resource_limit`. For a job run, `job_failed`."
90573
+ },
90574
+ "429": {
90575
+ "content": {
90576
+ "application/json": {
90577
+ "schema": {
90578
+ "$ref": "#/components/schemas/StudioError"
90579
+ }
90580
+ }
90581
+ },
90582
+ "description": "`rate_limited` — too many requests from your organization in the last minute; or `busy` — every slot is taken right now. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."
90583
+ },
90584
+ "503": {
90585
+ "content": {
90586
+ "application/json": {
90587
+ "schema": {
90588
+ "$ref": "#/components/schemas/StudioError"
90589
+ }
90590
+ }
90591
+ },
90592
+ "description": "`studio_unavailable` — Studio is not available right now."
90593
+ }
90594
+ },
90595
+ "summary": "Save a question as a job",
90596
+ "tags": [
90597
+ "Studio"
90598
+ ]
90599
+ }
90600
+ },
90601
+ "/v1/studio/jobs/{name}": {
90602
+ "delete": {
90603
+ "description": "Delete a saved job, its run history and its result tables. Questions and jobs that read its table stop working. Free.",
90604
+ "operationId": "deleteStudioJob",
90605
+ "parameters": [
90606
+ {
90607
+ "description": "The job's name: lower-case letters, digits and underscores, starting with a letter. It is also the name of the table that holds the job's result.",
90608
+ "in": "path",
90609
+ "name": "name",
90610
+ "required": true,
90611
+ "schema": {
90612
+ "description": "The job's name: lower-case letters, digits and underscores, starting with a letter. It is also the name of the table that holds the job's result.",
90613
+ "example": "top_lenders_tx",
90614
+ "pattern": "^[a-z][a-z0-9_]{0,62}$",
90615
+ "type": "string"
90616
+ }
90617
+ }
90618
+ ],
90619
+ "responses": {
90620
+ "200": {
90621
+ "content": {
90622
+ "application/json": {
90623
+ "schema": {
90624
+ "$ref": "#/components/schemas/StudioJobDeleted"
90625
+ }
90626
+ }
90627
+ },
90628
+ "description": "Deleted"
90629
+ },
90630
+ "400": {
90631
+ "content": {
90632
+ "application/json": {
90633
+ "schema": {
90634
+ "$ref": "#/components/schemas/StudioError"
90635
+ }
90636
+ }
90637
+ },
90638
+ "description": "The request was refused, and `error` says why: SQL that is not a single read-only SELECT, an unknown table (`details.table`, `details.availableTables`), an unknown column (`details.column`, `details.suggestions`), a function that is not available (`details.function`), or a job that could not run as written (`invalid_job`)."
90639
+ },
90640
+ "401": {
90641
+ "content": {
90642
+ "application/json": {
90643
+ "schema": {
90644
+ "$ref": "#/components/schemas/StudioError"
90645
+ }
90646
+ }
90647
+ },
90648
+ "description": "Authentication required."
90649
+ },
90650
+ "403": {
90651
+ "content": {
90652
+ "application/json": {
90653
+ "schema": {
90654
+ "$ref": "#/components/schemas/StudioError"
90655
+ }
90656
+ }
90657
+ },
90658
+ "description": "`no_organization` — Studio works inside an organization: select one and retry. `studio_not_enabled` — Studio is in a limited preview and is not enabled for this account."
90659
+ },
90660
+ "404": {
90661
+ "content": {
90662
+ "application/json": {
90663
+ "schema": {
90664
+ "$ref": "#/components/schemas/StudioError"
90665
+ }
90666
+ }
90667
+ },
90668
+ "description": "`job_not_found` — your organization has no job of that name. `query_not_found` — your organization has no background question of that id."
90669
+ },
90670
+ "409": {
90671
+ "content": {
90672
+ "application/json": {
90673
+ "schema": {
90674
+ "$ref": "#/components/schemas/StudioError"
90675
+ }
90676
+ }
90677
+ },
90678
+ "description": "`job_exists` — the name is taken; `job_limit_reached` — your organization is at its limit of saved jobs (`details.limit`); `job_running` — another job is running for your organization, retry when it has finished."
90679
+ },
90680
+ "422": {
90681
+ "content": {
90682
+ "application/json": {
90683
+ "schema": {
90684
+ "$ref": "#/components/schemas/StudioError"
90685
+ }
90686
+ }
90687
+ },
90688
+ "description": "The SQL is valid but asks for more than one answer may cost: `timeout` (it ran for its whole time, in the background included, and was stopped — narrow it by state or date; or it could not carry on in the background because another question of your organization already is), `result_too_large`, `resource_limit`. For a job run, `job_failed`."
90689
+ },
90690
+ "429": {
90691
+ "content": {
90692
+ "application/json": {
90693
+ "schema": {
90694
+ "$ref": "#/components/schemas/StudioError"
90695
+ }
90696
+ }
90697
+ },
90698
+ "description": "`rate_limited` — too many requests from your organization in the last minute; or `busy` — every slot is taken right now. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."
90699
+ },
90700
+ "503": {
90701
+ "content": {
90702
+ "application/json": {
90703
+ "schema": {
90704
+ "$ref": "#/components/schemas/StudioError"
90705
+ }
90706
+ }
90707
+ },
90708
+ "description": "`studio_unavailable` — Studio is not available right now."
90709
+ }
90710
+ },
90711
+ "summary": "Delete a job and its results",
90712
+ "tags": [
90713
+ "Studio"
90714
+ ]
90715
+ },
90716
+ "get": {
90717
+ "description": "A saved job with its recent runs (newest first), what changed in the latest successful run since the one before it, the alert rules that matched, and `result.table` — the table to query for its rows. Poll this after starting a run that answered `running`. Free.",
90718
+ "operationId": "getStudioJob",
90719
+ "parameters": [
90720
+ {
90721
+ "description": "The job's name: lower-case letters, digits and underscores, starting with a letter. It is also the name of the table that holds the job's result.",
90722
+ "in": "path",
90723
+ "name": "name",
90724
+ "required": true,
90725
+ "schema": {
90726
+ "description": "The job's name: lower-case letters, digits and underscores, starting with a letter. It is also the name of the table that holds the job's result.",
90727
+ "example": "top_lenders_tx",
90728
+ "pattern": "^[a-z][a-z0-9_]{0,62}$",
90729
+ "type": "string"
90730
+ }
90731
+ }
90732
+ ],
90733
+ "responses": {
90734
+ "200": {
90735
+ "content": {
90736
+ "application/json": {
90737
+ "schema": {
90738
+ "$ref": "#/components/schemas/StudioJobDetail"
90739
+ }
90740
+ }
90741
+ },
90742
+ "description": "The job, its runs and its result table"
90743
+ },
90744
+ "400": {
90745
+ "content": {
90746
+ "application/json": {
90747
+ "schema": {
90748
+ "$ref": "#/components/schemas/StudioError"
90749
+ }
90750
+ }
90751
+ },
90752
+ "description": "The request was refused, and `error` says why: SQL that is not a single read-only SELECT, an unknown table (`details.table`, `details.availableTables`), an unknown column (`details.column`, `details.suggestions`), a function that is not available (`details.function`), or a job that could not run as written (`invalid_job`)."
90753
+ },
90754
+ "401": {
90755
+ "content": {
90756
+ "application/json": {
90757
+ "schema": {
90758
+ "$ref": "#/components/schemas/StudioError"
90759
+ }
90760
+ }
90761
+ },
90762
+ "description": "Authentication required."
90763
+ },
90764
+ "403": {
90765
+ "content": {
90766
+ "application/json": {
90767
+ "schema": {
90768
+ "$ref": "#/components/schemas/StudioError"
90769
+ }
90770
+ }
90771
+ },
90772
+ "description": "`no_organization` — Studio works inside an organization: select one and retry. `studio_not_enabled` — Studio is in a limited preview and is not enabled for this account."
90773
+ },
90774
+ "404": {
90775
+ "content": {
90776
+ "application/json": {
90777
+ "schema": {
90778
+ "$ref": "#/components/schemas/StudioError"
90779
+ }
90780
+ }
90781
+ },
90782
+ "description": "`job_not_found` — your organization has no job of that name. `query_not_found` — your organization has no background question of that id."
90783
+ },
90784
+ "409": {
90785
+ "content": {
90786
+ "application/json": {
90787
+ "schema": {
90788
+ "$ref": "#/components/schemas/StudioError"
90789
+ }
90790
+ }
90791
+ },
90792
+ "description": "`job_exists` — the name is taken; `job_limit_reached` — your organization is at its limit of saved jobs (`details.limit`); `job_running` — another job is running for your organization, retry when it has finished."
90793
+ },
90794
+ "422": {
90795
+ "content": {
90796
+ "application/json": {
90797
+ "schema": {
90798
+ "$ref": "#/components/schemas/StudioError"
90799
+ }
90800
+ }
90801
+ },
90802
+ "description": "The SQL is valid but asks for more than one answer may cost: `timeout` (it ran for its whole time, in the background included, and was stopped — narrow it by state or date; or it could not carry on in the background because another question of your organization already is), `result_too_large`, `resource_limit`. For a job run, `job_failed`."
90803
+ },
90804
+ "429": {
90805
+ "content": {
90806
+ "application/json": {
90807
+ "schema": {
90808
+ "$ref": "#/components/schemas/StudioError"
90809
+ }
90810
+ }
90811
+ },
90812
+ "description": "`rate_limited` — too many requests from your organization in the last minute; or `busy` — every slot is taken right now. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."
90813
+ },
90814
+ "503": {
90815
+ "content": {
90816
+ "application/json": {
90817
+ "schema": {
90818
+ "$ref": "#/components/schemas/StudioError"
90819
+ }
90820
+ }
90821
+ },
90822
+ "description": "`studio_unavailable` — Studio is not available right now."
90823
+ }
90824
+ },
90825
+ "summary": "One job: its runs, what changed, and where its result is",
89767
90826
  "tags": [
89768
90827
  "Studio"
89769
90828
  ]
89770
90829
  },
89771
- "post": {
89772
- "description": "Save a SQL question to run again: on a schedule (`daily`, `weekly`) or only when asked (`manual`). Each run stores its result as a table named after the job, which later questions — and later jobs — can query like any other table. Name the `keys` (the columns that identify one row) to get 'what changed since the last run', and add `alerts` to flag new rows, removed rows or a number crossing a threshold. The SQL is checked when the job is saved: an unknown table or column, or a key that is not in the result, is refused here rather than at the first run. Saving does not run the job. Saving is free; each run that succeeds costs 10 credits, including the runs a `daily` or `weekly` schedule starts.",
89773
- "operationId": "createStudioJob",
89774
- "requestBody": {
89775
- "content": {
89776
- "application/json": {
89777
- "schema": {
89778
- "$ref": "#/components/schemas/StudioJobRequest"
89779
- }
89780
- }
89781
- },
89782
- "required": true
89783
- },
89784
- "responses": {
89785
- "201": {
89786
- "content": {
89787
- "application/json": {
89788
- "schema": {
89789
- "$ref": "#/components/schemas/StudioJobSaved"
89790
- }
89791
- }
89792
- },
89793
- "description": "The saved job"
89794
- },
89795
- "400": {
89796
- "content": {
89797
- "application/json": {
89798
- "schema": {
89799
- "$ref": "#/components/schemas/StudioError"
89800
- }
89801
- }
89802
- },
89803
- "description": "The request was refused, and `error` says why: SQL that is not a single read-only SELECT, an unknown table (`details.table`, `details.availableTables`), an unknown column (`details.column`, `details.suggestions`), a function that is not available (`details.function`), or a job that could not run as written (`invalid_job`)."
89804
- },
89805
- "401": {
89806
- "content": {
89807
- "application/json": {
89808
- "schema": {
89809
- "$ref": "#/components/schemas/StudioError"
89810
- }
89811
- }
89812
- },
89813
- "description": "Authentication required."
89814
- },
89815
- "403": {
89816
- "content": {
89817
- "application/json": {
89818
- "schema": {
89819
- "$ref": "#/components/schemas/StudioError"
89820
- }
89821
- }
89822
- },
89823
- "description": "`no_organization` — Studio works inside an organization: select one and retry. `studio_not_enabled` — Studio is in a limited preview and is not enabled for this account."
89824
- },
89825
- "404": {
89826
- "content": {
89827
- "application/json": {
89828
- "schema": {
89829
- "$ref": "#/components/schemas/StudioError"
89830
- }
89831
- }
89832
- },
89833
- "description": "`job_not_found` — your organization has no job of that name. `query_not_found` — your organization has no background question of that id."
89834
- },
89835
- "409": {
89836
- "content": {
89837
- "application/json": {
89838
- "schema": {
89839
- "$ref": "#/components/schemas/StudioError"
89840
- }
89841
- }
89842
- },
89843
- "description": "`job_exists` — the name is taken; `job_limit_reached` — your organization is at its limit of saved jobs (`details.limit`); `job_running` — another job is running for your organization, retry when it has finished."
89844
- },
89845
- "422": {
89846
- "content": {
89847
- "application/json": {
89848
- "schema": {
89849
- "$ref": "#/components/schemas/StudioError"
89850
- }
89851
- }
89852
- },
89853
- "description": "The SQL is valid but asks for more than one answer may cost: `timeout` (it ran for its whole time, in the background included, and was stopped — narrow it by state or date; or it could not carry on in the background because another question of your organization already is), `result_too_large`, `resource_limit`. For a job run, `job_failed`."
89854
- },
89855
- "429": {
89856
- "content": {
89857
- "application/json": {
89858
- "schema": {
89859
- "$ref": "#/components/schemas/StudioError"
89860
- }
89861
- }
89862
- },
89863
- "description": "`rate_limited` — too many requests from your organization in the last minute; or `busy` — every slot is taken right now. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."
89864
- },
89865
- "503": {
89866
- "content": {
89867
- "application/json": {
89868
- "schema": {
89869
- "$ref": "#/components/schemas/StudioError"
89870
- }
89871
- }
89872
- },
89873
- "description": "`studio_unavailable` — Studio is not available right now."
89874
- }
89875
- },
89876
- "summary": "Save a question as a job",
89877
- "tags": [
89878
- "Studio"
89879
- ]
89880
- }
89881
- },
89882
- "/v1/studio/jobs/{name}": {
89883
- "delete": {
89884
- "description": "Delete a saved job, its run history and its result tables. Questions and jobs that read its table stop working. Free.",
89885
- "operationId": "deleteStudioJob",
90830
+ "patch": {
90831
+ "description": "Change how a saved job tells you about its alerts: `notify.email` false stops the email to the job's creator when an alert matches on a scheduled run; true turns it back on. Matched alerts are still recorded on each run. Free.",
90832
+ "operationId": "updateStudioJob",
89886
90833
  "parameters": [
89887
90834
  {
89888
90835
  "description": "The job's name: lower-case letters, digits and underscores, starting with a letter. It is also the name of the table that holds the job's result.",
@@ -89897,130 +90844,26 @@
89897
90844
  }
89898
90845
  }
89899
90846
  ],
89900
- "responses": {
89901
- "200": {
89902
- "content": {
89903
- "application/json": {
89904
- "schema": {
89905
- "$ref": "#/components/schemas/StudioJobDeleted"
89906
- }
89907
- }
89908
- },
89909
- "description": "Deleted"
89910
- },
89911
- "400": {
89912
- "content": {
89913
- "application/json": {
89914
- "schema": {
89915
- "$ref": "#/components/schemas/StudioError"
89916
- }
89917
- }
89918
- },
89919
- "description": "The request was refused, and `error` says why: SQL that is not a single read-only SELECT, an unknown table (`details.table`, `details.availableTables`), an unknown column (`details.column`, `details.suggestions`), a function that is not available (`details.function`), or a job that could not run as written (`invalid_job`)."
89920
- },
89921
- "401": {
89922
- "content": {
89923
- "application/json": {
89924
- "schema": {
89925
- "$ref": "#/components/schemas/StudioError"
89926
- }
89927
- }
89928
- },
89929
- "description": "Authentication required."
89930
- },
89931
- "403": {
89932
- "content": {
89933
- "application/json": {
89934
- "schema": {
89935
- "$ref": "#/components/schemas/StudioError"
89936
- }
89937
- }
89938
- },
89939
- "description": "`no_organization` — Studio works inside an organization: select one and retry. `studio_not_enabled` — Studio is in a limited preview and is not enabled for this account."
89940
- },
89941
- "404": {
89942
- "content": {
89943
- "application/json": {
89944
- "schema": {
89945
- "$ref": "#/components/schemas/StudioError"
89946
- }
89947
- }
89948
- },
89949
- "description": "`job_not_found` — your organization has no job of that name. `query_not_found` — your organization has no background question of that id."
89950
- },
89951
- "409": {
89952
- "content": {
89953
- "application/json": {
89954
- "schema": {
89955
- "$ref": "#/components/schemas/StudioError"
89956
- }
89957
- }
89958
- },
89959
- "description": "`job_exists` — the name is taken; `job_limit_reached` — your organization is at its limit of saved jobs (`details.limit`); `job_running` — another job is running for your organization, retry when it has finished."
89960
- },
89961
- "422": {
89962
- "content": {
89963
- "application/json": {
89964
- "schema": {
89965
- "$ref": "#/components/schemas/StudioError"
89966
- }
89967
- }
89968
- },
89969
- "description": "The SQL is valid but asks for more than one answer may cost: `timeout` (it ran for its whole time, in the background included, and was stopped — narrow it by state or date; or it could not carry on in the background because another question of your organization already is), `result_too_large`, `resource_limit`. For a job run, `job_failed`."
89970
- },
89971
- "429": {
89972
- "content": {
89973
- "application/json": {
89974
- "schema": {
89975
- "$ref": "#/components/schemas/StudioError"
89976
- }
90847
+ "requestBody": {
90848
+ "content": {
90849
+ "application/json": {
90850
+ "schema": {
90851
+ "$ref": "#/components/schemas/StudioJobUpdate"
89977
90852
  }
89978
- },
89979
- "description": "`rate_limited` — too many requests from your organization in the last minute; or `busy` — every slot is taken right now. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."
90853
+ }
89980
90854
  },
89981
- "503": {
89982
- "content": {
89983
- "application/json": {
89984
- "schema": {
89985
- "$ref": "#/components/schemas/StudioError"
89986
- }
89987
- }
89988
- },
89989
- "description": "`studio_unavailable` — Studio is not available right now."
89990
- }
90855
+ "required": true
89991
90856
  },
89992
- "summary": "Delete a job and its results",
89993
- "tags": [
89994
- "Studio"
89995
- ]
89996
- },
89997
- "get": {
89998
- "description": "A saved job with its recent runs (newest first), what changed in the latest successful run since the one before it, the alert rules that matched, and `result.table` — the table to query for its rows. Poll this after starting a run that answered `running`. Free.",
89999
- "operationId": "getStudioJob",
90000
- "parameters": [
90001
- {
90002
- "description": "The job's name: lower-case letters, digits and underscores, starting with a letter. It is also the name of the table that holds the job's result.",
90003
- "in": "path",
90004
- "name": "name",
90005
- "required": true,
90006
- "schema": {
90007
- "description": "The job's name: lower-case letters, digits and underscores, starting with a letter. It is also the name of the table that holds the job's result.",
90008
- "example": "top_lenders_tx",
90009
- "pattern": "^[a-z][a-z0-9_]{0,62}$",
90010
- "type": "string"
90011
- }
90012
- }
90013
- ],
90014
90857
  "responses": {
90015
90858
  "200": {
90016
90859
  "content": {
90017
90860
  "application/json": {
90018
90861
  "schema": {
90019
- "$ref": "#/components/schemas/StudioJobDetail"
90862
+ "$ref": "#/components/schemas/StudioJobSaved"
90020
90863
  }
90021
90864
  }
90022
90865
  },
90023
- "description": "The job, its runs and its result table"
90866
+ "description": "The job as saved"
90024
90867
  },
90025
90868
  "400": {
90026
90869
  "content": {
@@ -90103,7 +90946,7 @@
90103
90946
  "description": "`studio_unavailable` — Studio is not available right now."
90104
90947
  }
90105
90948
  },
90106
- "summary": "One job: its runs, what changed, and where its result is",
90949
+ "summary": "Change a job's settings",
90107
90950
  "tags": [
90108
90951
  "Studio"
90109
90952
  ]
@@ -90298,7 +91141,7 @@
90298
91141
  }
90299
91142
  }
90300
91143
  },
90301
- "description": "`model_exists` — the name is taken (pass `replace: true` for a new version); `model_limit_reached` — your organization is at its limit of models; `model_training_in_progress` — one model runs at a time per organization; `model_not_ready` — the model has no trained version to refresh."
91144
+ "description": "`model_exists` — the name is taken (pass `replace: true` for a new version); `model_limit_reached` — your organization is at its limit of models; `model_training_in_progress` — this model is already running (a model runs once at a time), or your organization already has as many models running as it may (`details.running` of `details.limit`, 3 by default): try again when one has finished; `model_not_ready` — the model has no trained version to refresh."
90302
91145
  },
90303
91146
  "422": {
90304
91147
  "content": {
@@ -90318,7 +91161,7 @@
90318
91161
  }
90319
91162
  }
90320
91163
  },
90321
- "description": "`rate_limited` — too many model requests from your organization in the last minute; or `busy` — every training slot is taken. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."
91164
+ "description": "`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`)."
90322
91165
  },
90323
91166
  "503": {
90324
91167
  "content": {
@@ -90337,7 +91180,7 @@
90337
91180
  ]
90338
91181
  },
90339
91182
  "post": {
90340
- "description": "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`). One model trains at a time per organization, 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.",
91183
+ "description": "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.",
90341
91184
  "operationId": "createStudioModel",
90342
91185
  "requestBody": {
90343
91186
  "content": {
@@ -90408,7 +91251,7 @@
90408
91251
  }
90409
91252
  }
90410
91253
  },
90411
- "description": "`model_exists` — the name is taken (pass `replace: true` for a new version); `model_limit_reached` — your organization is at its limit of models; `model_training_in_progress` — one model runs at a time per organization; `model_not_ready` — the model has no trained version to refresh."
91254
+ "description": "`model_exists` — the name is taken (pass `replace: true` for a new version); `model_limit_reached` — your organization is at its limit of models; `model_training_in_progress` — this model is already running (a model runs once at a time), or your organization already has as many models running as it may (`details.running` of `details.limit`, 3 by default): try again when one has finished; `model_not_ready` — the model has no trained version to refresh."
90412
91255
  },
90413
91256
  "422": {
90414
91257
  "content": {
@@ -90428,7 +91271,7 @@
90428
91271
  }
90429
91272
  }
90430
91273
  },
90431
- "description": "`rate_limited` — too many model requests from your organization in the last minute; or `busy` — every training slot is taken. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."
91274
+ "description": "`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`)."
90432
91275
  },
90433
91276
  "503": {
90434
91277
  "content": {
@@ -90510,7 +91353,7 @@
90510
91353
  }
90511
91354
  }
90512
91355
  },
90513
- "description": "`model_exists` — the name is taken (pass `replace: true` for a new version); `model_limit_reached` — your organization is at its limit of models; `model_training_in_progress` — one model runs at a time per organization; `model_not_ready` — the model has no trained version to refresh."
91356
+ "description": "`model_exists` — the name is taken (pass `replace: true` for a new version); `model_limit_reached` — your organization is at its limit of models; `model_training_in_progress` — this model is already running (a model runs once at a time), or your organization already has as many models running as it may (`details.running` of `details.limit`, 3 by default): try again when one has finished; `model_not_ready` — the model has no trained version to refresh."
90514
91357
  },
90515
91358
  "422": {
90516
91359
  "content": {
@@ -90530,7 +91373,7 @@
90530
91373
  }
90531
91374
  }
90532
91375
  },
90533
- "description": "`rate_limited` — too many model requests from your organization in the last minute; or `busy` — every training slot is taken. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."
91376
+ "description": "`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`)."
90534
91377
  },
90535
91378
  "503": {
90536
91379
  "content": {
@@ -90549,6 +91392,102 @@
90549
91392
  ]
90550
91393
  }
90551
91394
  },
91395
+ "/v1/studio/models/published/{table}": {
91396
+ "get": {
91397
+ "description": "The report card of a prediction model ModelMatch trains and publishes for every organization; its scores are the published table `table`. If `hasCaution` is true, say `caution` FIRST: the model fell behind the best simple rule in part of the test period while staying better than random. Then: what it predicts (`predicts`), the `headline` as written, what it learned from and was tested on (`learnedFrom.sentence`), the lift sentences (`metrics.top10`, `metrics.top1`), the three `metrics.checks`, the data points that mattered (`dataPoints.used`, strongest first, with how much the model leaned on each — not how much it causes the outcome) and the ones it barely used (`dataPoints.rejected`), and the `caveats`. Never promise accuracy, and never call a score a probability unless `metrics.calibrated` is true. Free.",
91398
+ "operationId": "getStudioPublishedModel",
91399
+ "parameters": [
91400
+ {
91401
+ "description": "Its `mm_model_*` table.",
91402
+ "in": "path",
91403
+ "name": "table",
91404
+ "required": true,
91405
+ "schema": {
91406
+ "description": "Its `mm_model_*` table.",
91407
+ "example": "mm_model_refi_watch",
91408
+ "pattern": "^mm_[a-z][a-z0-9_]{1,58}$",
91409
+ "type": "string"
91410
+ }
91411
+ }
91412
+ ],
91413
+ "responses": {
91414
+ "200": {
91415
+ "content": {
91416
+ "application/json": {
91417
+ "schema": {
91418
+ "$ref": "#/components/schemas/StudioPublishedModelResult"
91419
+ }
91420
+ }
91421
+ },
91422
+ "description": "The report card"
91423
+ },
91424
+ "400": {
91425
+ "content": {
91426
+ "application/json": {
91427
+ "schema": {
91428
+ "$ref": "#/components/schemas/StudioError"
91429
+ }
91430
+ }
91431
+ },
91432
+ "description": "`invalid_request` — not a published table's name."
91433
+ },
91434
+ "401": {
91435
+ "content": {
91436
+ "application/json": {
91437
+ "schema": {
91438
+ "$ref": "#/components/schemas/StudioError"
91439
+ }
91440
+ }
91441
+ },
91442
+ "description": "`unauthenticated` — sign in, or send a valid credential."
91443
+ },
91444
+ "403": {
91445
+ "content": {
91446
+ "application/json": {
91447
+ "schema": {
91448
+ "$ref": "#/components/schemas/StudioError"
91449
+ }
91450
+ }
91451
+ },
91452
+ "description": "`no_organization` — select an organization; `studio_not_enabled` — Studio is not enabled for this account."
91453
+ },
91454
+ "404": {
91455
+ "content": {
91456
+ "application/json": {
91457
+ "schema": {
91458
+ "$ref": "#/components/schemas/StudioError"
91459
+ }
91460
+ }
91461
+ },
91462
+ "description": "`published_model_not_found` — no model of that name is published. The catalog lists what is."
91463
+ },
91464
+ "409": {
91465
+ "content": {
91466
+ "application/json": {
91467
+ "schema": {
91468
+ "$ref": "#/components/schemas/StudioError"
91469
+ }
91470
+ }
91471
+ },
91472
+ "description": "`published_unavailable` — published tables are switched off right now."
91473
+ },
91474
+ "503": {
91475
+ "content": {
91476
+ "application/json": {
91477
+ "schema": {
91478
+ "$ref": "#/components/schemas/StudioError"
91479
+ }
91480
+ }
91481
+ },
91482
+ "description": "`studio_unavailable` — try again in a minute."
91483
+ }
91484
+ },
91485
+ "summary": "A model ModelMatch publishes: its report card",
91486
+ "tags": [
91487
+ "Studio"
91488
+ ]
91489
+ }
91490
+ },
90552
91491
  "/v1/studio/models/{name}": {
90553
91492
  "delete": {
90554
91493
  "description": "Delete a model: the trained model, its report card and its scores table. The table leaves the catalog at once, and questions and jobs that read it stop working. A run in progress is stopped. This cannot be undone. Free.",
@@ -90626,7 +91565,7 @@
90626
91565
  }
90627
91566
  }
90628
91567
  },
90629
- "description": "`model_exists` — the name is taken (pass `replace: true` for a new version); `model_limit_reached` — your organization is at its limit of models; `model_training_in_progress` — one model runs at a time per organization; `model_not_ready` — the model has no trained version to refresh."
91568
+ "description": "`model_exists` — the name is taken (pass `replace: true` for a new version); `model_limit_reached` — your organization is at its limit of models; `model_training_in_progress` — this model is already running (a model runs once at a time), or your organization already has as many models running as it may (`details.running` of `details.limit`, 3 by default): try again when one has finished; `model_not_ready` — the model has no trained version to refresh."
90630
91569
  },
90631
91570
  "422": {
90632
91571
  "content": {
@@ -90646,7 +91585,7 @@
90646
91585
  }
90647
91586
  }
90648
91587
  },
90649
- "description": "`rate_limited` — too many model requests from your organization in the last minute; or `busy` — every training slot is taken. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."
91588
+ "description": "`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`)."
90650
91589
  },
90651
91590
  "503": {
90652
91591
  "content": {
@@ -90750,7 +91689,7 @@
90750
91689
  }
90751
91690
  }
90752
91691
  },
90753
- "description": "`model_exists` — the name is taken (pass `replace: true` for a new version); `model_limit_reached` — your organization is at its limit of models; `model_training_in_progress` — one model runs at a time per organization; `model_not_ready` — the model has no trained version to refresh."
91692
+ "description": "`model_exists` — the name is taken (pass `replace: true` for a new version); `model_limit_reached` — your organization is at its limit of models; `model_training_in_progress` — this model is already running (a model runs once at a time), or your organization already has as many models running as it may (`details.running` of `details.limit`, 3 by default): try again when one has finished; `model_not_ready` — the model has no trained version to refresh."
90754
91693
  },
90755
91694
  "422": {
90756
91695
  "content": {
@@ -90770,7 +91709,7 @@
90770
91709
  }
90771
91710
  }
90772
91711
  },
90773
- "description": "`rate_limited` — too many model requests from your organization in the last minute; or `busy` — every training slot is taken. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."
91712
+ "description": "`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`)."
90774
91713
  },
90775
91714
  "503": {
90776
91715
  "content": {
@@ -90791,7 +91730,7 @@
90791
91730
  },
90792
91731
  "/v1/studio/models/{name}/refresh": {
90793
91732
  "post": {
90794
- "description": "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. 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 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.",
91733
+ "description": "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.",
90795
91734
  "operationId": "refreshStudioModel",
90796
91735
  "parameters": [
90797
91736
  {
@@ -90886,7 +91825,7 @@
90886
91825
  }
90887
91826
  }
90888
91827
  },
90889
- "description": "`model_exists` — the name is taken (pass `replace: true` for a new version); `model_limit_reached` — your organization is at its limit of models; `model_training_in_progress` — one model runs at a time per organization; `model_not_ready` — the model has no trained version to refresh."
91828
+ "description": "`model_exists` — the name is taken (pass `replace: true` for a new version); `model_limit_reached` — your organization is at its limit of models; `model_training_in_progress` — this model is already running (a model runs once at a time), or your organization already has as many models running as it may (`details.running` of `details.limit`, 3 by default): try again when one has finished; `model_not_ready` — the model has no trained version to refresh."
90890
91829
  },
90891
91830
  "422": {
90892
91831
  "content": {
@@ -90906,7 +91845,7 @@
90906
91845
  }
90907
91846
  }
90908
91847
  },
90909
- "description": "`rate_limited` — too many model requests from your organization in the last minute; or `busy` — every training slot is taken. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."
91848
+ "description": "`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`)."
90910
91849
  },
90911
91850
  "503": {
90912
91851
  "content": {