|
19 | 19 | "model": { |
20 | 20 | "$ref": "#/components/schemas/Model" |
21 | 21 | }, |
| 22 | + "rank_metadata": { |
| 23 | + "anyOf": [ |
| 24 | + { |
| 25 | + "additionalProperties": true, |
| 26 | + "type": "object" |
| 27 | + }, |
| 28 | + { |
| 29 | + "type": "null" |
| 30 | + } |
| 31 | + ], |
| 32 | + "title": "Rank Metadata" |
| 33 | + }, |
22 | 34 | "schema_version": { |
23 | 35 | "const": "1.0.0", |
24 | 36 | "title": "Schema Version", |
|
120 | 132 | }, |
121 | 133 | "Importance": { |
122 | 134 | "additionalProperties": false, |
123 | | - "description": "Feature importance scores keyed by feature name.\n\n`permutation` is locked to None in v1.0.0. When permutation importance\nlands, it will use the shape `{feature_name: {\"mean\": float, \"std\": float}}`\nbehind a schema-version bump.", |
| 135 | + "description": "Feature importance scores keyed by feature name.", |
124 | 136 | "properties": { |
| 137 | + "divergence_warnings": { |
| 138 | + "anyOf": [ |
| 139 | + { |
| 140 | + "items": { |
| 141 | + "additionalProperties": { |
| 142 | + "anyOf": [ |
| 143 | + { |
| 144 | + "type": "string" |
| 145 | + }, |
| 146 | + { |
| 147 | + "type": "integer" |
| 148 | + }, |
| 149 | + { |
| 150 | + "type": "number" |
| 151 | + } |
| 152 | + ] |
| 153 | + }, |
| 154 | + "type": "object" |
| 155 | + }, |
| 156 | + "type": "array" |
| 157 | + }, |
| 158 | + { |
| 159 | + "type": "null" |
| 160 | + } |
| 161 | + ], |
| 162 | + "title": "Divergence Warnings" |
| 163 | + }, |
125 | 164 | "gain": { |
126 | 165 | "additionalProperties": { |
127 | 166 | "type": "number" |
|
169 | 208 | "$ref": "#/components/schemas/FeatureSchema" |
170 | 209 | }, |
171 | 210 | "num_class": { |
172 | | - "const": 1, |
173 | 211 | "title": "Num Class", |
174 | 212 | "type": "integer" |
175 | 213 | }, |
|
178 | 216 | "type": "integer" |
179 | 217 | }, |
180 | 218 | "objective": { |
181 | | - "const": "binary", |
| 219 | + "enum": [ |
| 220 | + "binary", |
| 221 | + "multiclass", |
| 222 | + "regression", |
| 223 | + "lambdarank", |
| 224 | + "multi_output" |
| 225 | + ], |
182 | 226 | "title": "Objective", |
183 | 227 | "type": "string" |
184 | 228 | }, |
|
439 | 483 | ] |
440 | 484 | } |
441 | 485 | }, |
| 486 | + "/artifacts/{artifact_id}/importance": { |
| 487 | + "get": { |
| 488 | + "description": "Return importance scores for the requested type.\n\n- gain / split: always available (computed at extraction time).\n- permutation: available only when evaluation samples were provided\n at extraction time; returns HTTP 200 with empty features list and a\n detail message when absent.", |
| 489 | + "operationId": "get_importance_artifacts__artifact_id__importance_get", |
| 490 | + "parameters": [ |
| 491 | + { |
| 492 | + "in": "path", |
| 493 | + "name": "artifact_id", |
| 494 | + "required": true, |
| 495 | + "schema": { |
| 496 | + "title": "Artifact Id", |
| 497 | + "type": "string" |
| 498 | + } |
| 499 | + }, |
| 500 | + { |
| 501 | + "description": "Importance type: gain, split, or permutation", |
| 502 | + "in": "query", |
| 503 | + "name": "type", |
| 504 | + "required": true, |
| 505 | + "schema": { |
| 506 | + "description": "Importance type: gain, split, or permutation", |
| 507 | + "title": "Type", |
| 508 | + "type": "string" |
| 509 | + } |
| 510 | + } |
| 511 | + ], |
| 512 | + "responses": { |
| 513 | + "200": { |
| 514 | + "content": { |
| 515 | + "application/json": { |
| 516 | + "schema": { |
| 517 | + "additionalProperties": true, |
| 518 | + "title": "Response Get Importance Artifacts Artifact Id Importance Get", |
| 519 | + "type": "object" |
| 520 | + } |
| 521 | + } |
| 522 | + }, |
| 523 | + "description": "Successful Response" |
| 524 | + }, |
| 525 | + "422": { |
| 526 | + "content": { |
| 527 | + "application/json": { |
| 528 | + "schema": { |
| 529 | + "$ref": "#/components/schemas/HTTPValidationError" |
| 530 | + } |
| 531 | + } |
| 532 | + }, |
| 533 | + "description": "Validation Error" |
| 534 | + } |
| 535 | + }, |
| 536 | + "summary": "Get Importance", |
| 537 | + "tags": [ |
| 538 | + "artifacts" |
| 539 | + ] |
| 540 | + } |
| 541 | + }, |
442 | 542 | "/health": { |
443 | 543 | "get": { |
444 | 544 | "description": "Liveness probe \u2014 does not check storage or downstream deps.", |
|
0 commit comments