-
Notifications
You must be signed in to change notification settings - Fork 192
Expand file tree
/
Copy pathmodel.yaml
More file actions
578 lines (563 loc) · 20.4 KB
/
Copy pathmodel.yaml
File metadata and controls
578 lines (563 loc) · 20.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
paths:
/api/model_catalog/v1alpha1/models:
description: >-
The REST endpoint/path used to list zero or more `CatalogModel` entities from all `CatalogSources`.
get:
summary: Search catalog models across sources.
tags:
- ModelCatalogService
parameters:
- name: recommendations
in: query
deprecated: true
description: >-
Deprecated: use `orderBy=RECOMMENDED` instead.
Sort models by lowest recommended latency using Pareto filtering.
required: false
schema:
type: boolean
default: false
- name: targetRPS
in: query
description: Target requests per second for latency calculations
required: false
schema:
type: integer
format: int32
- name: latencyProperty
in: query
description: Property name for latency metric
required: false
schema:
type: string
default: "ttft_p90"
- name: rpsProperty
in: query
description: Property name for RPS metric
required: false
schema:
type: string
default: "requests_per_second"
- name: hardwareCountProperty
in: query
description: Property name for hardware count
required: false
schema:
type: string
default: "hardware_count"
- name: hardwareTypeProperty
in: query
description: Property name for hardware type grouping
required: false
schema:
type: string
default: "hardware_type"
- name: source
description: |-
Filter models by source. Multiple values can be separated by commas
to filter by multiple sources (OR logic). For example:
?source=huggingface,local will return models from either
huggingface OR local sources.
schema:
type: array
items:
type: string
style: form
explode: true
in: query
required: false
- name: q
description: Free-form keyword search used to filter the response.
schema:
type: string
in: query
required: false
- name: sourceLabel
description: |-
Filter models by the label associated with the source. Multiple
values can be separated by commas. If one of the values is the
string `null`, then models from every source without a label will
be returned.
schema:
type: array
items:
type: string
in: query
required: false
- $ref: "#/components/parameters/filterQuery"
- $ref: "#/components/parameters/pageSize"
- name: orderBy
style: form
explode: true
examples:
orderBy:
value: ID
description: |-
Specifies the order by criteria for listing entities.
Supported values are:
- CREATE_TIME
- LAST_UPDATE_TIME
- ID
- NAME
- ACCURACY
- RECOMMENDED
Defaults to `NAME`.
The `ACCURACY` sort will sort by the `overall_average` property in any linked metrics artifact.
The `RECOMMENDED` sort applies Pareto filtering and ranks models by recommended latency.
The Pareto-related parameters (`targetRPS`, `latencyProperty`, `rpsProperty`,
`hardwareCountProperty`, `hardwareTypeProperty`) are applied the same way as with the
deprecated `recommendations` parameter. With the default `sortOrder=ASC`, the most
recommended models (lowest latency) appear first. Use `sortOrder=DESC` to show the least
recommended configurations first.
In addition, models can be sorted by properties. For example:
- `provider.string_value` sorts by provider name
- `artifacts.ifeval.double_value` sorts by the min/max value a property called ifeval across all associated artifacts
schema:
$ref: "#/components/schemas/OrderByField"
in: query
required: false
- $ref: "#/components/parameters/sortOrder"
- $ref: "#/components/parameters/nextPageToken"
responses:
"200":
$ref: "#/components/responses/CatalogModelListResponse"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"404":
$ref: "#/components/responses/NotFound"
"500":
$ref: "#/components/responses/InternalServerError"
operationId: findModels
/api/model_catalog/v1alpha1/models/filter_options:
description: Lists options for `filterQuery` when listing models.
get:
summary: Lists fields and available options that can be used in `filterQuery` on the list models endpoint.
tags:
- ModelCatalogService
responses:
"200":
$ref: "#/components/responses/FilterOptionsResponse"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"500":
$ref: "#/components/responses/InternalServerError"
operationId: findModelsFilterOptions
/api/model_catalog/v1alpha1/sources/{source_id}/models/{model_name+}:
description: >-
The REST endpoint/path used to get a `CatalogModel`.
get:
summary: Get a `CatalogModel`.
tags:
- ModelCatalogService
responses:
"200":
$ref: "#/components/responses/CatalogModelResponse"
"401":
$ref: "#/components/responses/Unauthorized"
"404":
$ref: "#/components/responses/NotFound"
"500":
$ref: "#/components/responses/InternalServerError"
operationId: getModel
parameters:
- name: source_id
description: A unique identifier for a `CatalogSource`.
schema:
type: string
in: path
required: true
- name: model_name+
description: A unique identifier for the model.
schema:
type: string
in: path
required: true
/api/model_catalog/v1alpha1/sources/{source_id}/models/{model_name}/artifacts:
description: >-
The REST endpoint/path used to list `CatalogArtifacts`.
get:
summary: List CatalogArtifacts.
tags:
- ModelCatalogService
responses:
"200":
$ref: "#/components/responses/CatalogArtifactListResponse"
"401":
$ref: "#/components/responses/Unauthorized"
"404":
$ref: "#/components/responses/NotFound"
"500":
$ref: "#/components/responses/InternalServerError"
operationId: getAllModelArtifacts
parameters:
- name: source_id
description: A unique identifier for a `CatalogSource`.
schema:
type: string
in: path
required: true
- name: model_name
description: A unique identifier for the model.
schema:
type: string
in: path
required: true
- $ref: "#/components/parameters/artifactType"
- $ref: "#/components/parameters/artifact_type"
- $ref: "#/components/parameters/artifactFilterQuery"
- $ref: "#/components/parameters/pageSize"
- $ref: "#/components/parameters/artifactOrderBy"
- $ref: "#/components/parameters/sortOrder"
- $ref: "#/components/parameters/nextPageToken"
/api/model_catalog/v1alpha1/sources/{source_id}/models/{model_name}/artifacts/performance:
description: >-
Lists performance metrics artifacts (that is, artifacts of type `CatalogMetricsArtifact` where `metricsType` is `performance-metrics`).
get:
summary: List CatalogArtifacts.
tags:
- ModelCatalogService
responses:
"200":
$ref: "#/components/responses/CatalogArtifactListResponse"
"401":
$ref: "#/components/responses/Unauthorized"
"404":
$ref: "#/components/responses/NotFound"
"500":
$ref: "#/components/responses/InternalServerError"
operationId: getAllModelPerformanceArtifacts
parameters:
- name: source_id
description: A unique identifier for a `CatalogSource`.
schema:
type: string
in: path
required: true
- name: model_name
description: A unique identifier for the model.
schema:
type: string
in: path
required: true
- name: targetRPS
description: |-
Target requests per second. If specified, values for `replicas` and
`total_requests_per_second` will be calculated and returned as custom
properties.
schema:
type: integer
in: query
- name: recommendations
description: Filter records that are less optimal based on approximate cost to run and latency.
schema:
type: boolean
default: false
in: query
- name: rpsProperty
description: Custom property name for requests per second metric.
schema:
type: string
default: "requests_per_second"
in: query
- name: latencyProperty
description: Custom property name for latency metric (e.g., ttft_p90, p90_latency).
schema:
type: string
default: "ttft_p90"
in: query
- name: hardwareCountProperty
description: Custom property name for hardware count metric.
schema:
type: string
default: "hardware_count"
in: query
- name: hardwareTypeProperty
description: Custom property name for hardware type grouping.
schema:
type: string
default: "hardware_type"
in: query
- $ref: "#/components/parameters/artifactFilterQuery"
- $ref: "#/components/parameters/pageSize"
- $ref: "#/components/parameters/artifactOrderBy"
- $ref: "#/components/parameters/sortOrder"
- $ref: "#/components/parameters/nextPageToken"
components:
schemas:
CatalogArtifact:
description: A single artifact in the catalog API.
oneOf:
- $ref: "#/components/schemas/CatalogModelArtifact"
- $ref: "#/components/schemas/CatalogMetricsArtifact"
discriminator:
propertyName: artifactType
mapping:
model-artifact: "#/components/schemas/CatalogModelArtifact"
metrics-artifact: "#/components/schemas/CatalogMetricsArtifact"
CatalogArtifactList:
description: List of CatalogModel entities.
allOf:
- type: object
properties:
items:
description: Array of `CatalogArtifact` entities.
type: array
items:
$ref: "#/components/schemas/CatalogArtifact"
required:
- items
- $ref: "#/components/schemas/BaseResourceList"
ArtifactTypeQueryParam:
description: Supported artifact types for querying.
enum:
- model-artifact
- metrics-artifact
type: string
CatalogMetricsArtifact:
description: A metadata Artifact Entity.
allOf:
- type: object
required:
- artifactType
- metricsType
properties:
artifactType:
type: string
default: metrics-artifact
metricsType:
type: string
enum:
- performance-metrics
- accuracy-metrics
- security-metrics
customProperties:
description: User provided custom properties which are not defined by its type.
type: object
additionalProperties:
$ref: "#/components/schemas/MetadataValue"
- $ref: "#/components/schemas/BaseResource"
CatalogModel:
description: A model in the model catalog.
allOf:
- type: object
required:
- name
properties:
name:
type: string
description: Name of the model. Must be unique within a source.
example: ibm-granite/granite-3.1-8b-base
source_id:
type: string
description: ID of the source this model belongs to.
validatedTasks:
type: array
items:
type: string
description: List of tasks for this model which have been validated by the catalog provider.
servingConfig:
$ref: "#/components/schemas/ServingConfig"
- $ref: "#/components/schemas/BaseModel"
- $ref: "#/components/schemas/BaseResource"
ServingConfig:
description: >-
Serving and deployment configuration for the model. Each property represents a distinct configuration concern with its own typed schema. All properties are optional.
type: object
properties:
toolCalling:
$ref: "#/components/schemas/ToolCallingConfig"
ToolCallingConfig:
description: >-
Tool-calling arguments for this model.
type: object
properties:
toolCallParser:
type: string
description: >-
The tool-call parser identifier for the serving runtime.
example: granite
chatTemplate:
type: string
description: >-
Path to the chat template file packaged with the model.
example: opt/app-root/template/tool_chat_template_granite.jinja
enableAutoToolChoice:
type: boolean
description: >-
Whether to enable automatic tool choice in the serving runtime.
default: true
requiredArgs:
type: array
items:
type: string
description: >-
Additional CLI arguments required for tool calling beyond the parser, template, and auto-tool-choice flags. Each entry is a complete argument (e.g., "--config_format mistral").
example:
- "--config_format granite"
CatalogModelArtifact:
description: A Catalog Model Artifact Entity.
allOf:
- type: object
required:
- artifactType
- uri
properties:
artifactType:
type: string
default: model-artifact
uri:
type: string
format: uri
description: URI where the model can be retrieved.
customProperties:
description: User provided custom properties which are not defined by its type.
type: object
additionalProperties:
$ref: "#/components/schemas/MetadataValue"
- $ref: "#/components/schemas/BaseResource"
CatalogModelList:
description: List of CatalogModel entities.
allOf:
- type: object
properties:
items:
description: Array of `CatalogModel` entities.
type: array
items:
$ref: "#/components/schemas/CatalogModel"
required:
- items
- $ref: "#/components/schemas/BaseResourceList"
responses:
CatalogArtifactListResponse:
content:
application/json:
schema:
$ref: "#/components/schemas/CatalogArtifactList"
description: A response containing a list of CatalogArtifact entities.
CatalogModelListResponse:
content:
application/json:
schema:
$ref: "#/components/schemas/CatalogModelList"
description: A response containing a list of CatalogModel entities.
CatalogModelResponse:
content:
application/json:
schema:
$ref: "#/components/schemas/CatalogModel"
description: A response containing a `CatalogModel` entity.
parameters:
artifactFilterQuery:
examples:
artifactFilterQuery:
value: "name='my-artifact' AND uri LIKE '%s3%'"
name: filterQuery
description: |
A SQL-like query string to filter catalog artifacts. The query supports rich filtering capabilities with automatic type inference.
**Supported Operators:**
- Comparison: `=`, `!=`, `<>`, `>`, `<`, `>=`, `<=`
- Pattern matching: `LIKE`, `ILIKE` (case-insensitive)
- Set membership: `IN`
- Logical: `AND`, `OR`
- Grouping: `()` for complex expressions
**Data Types:**
- Strings: `"value"` or `'value'`
- Numbers: `42`, `3.14`, `1e-5`
- Booleans: `true`, `false` (case-insensitive)
**Property Access (Artifacts):**
- Standard properties: `name`, `id`, `uri`, `artifactType`, `createTimeSinceEpoch`
- Custom properties: Any user-defined property name in `customProperties`
- Escaped properties: Use backticks for special characters: `` `custom-property` ``
- Type-specific access: `property.string_value`, `property.double_value`, `property.int_value`, `property.bool_value`
**Examples:**
- Basic: `name = "my-artifact"`
- Comparison: `ttft_mean > 90`
- Pattern: `uri LIKE "%s3.amazonaws.com%"`
- Complex: `(artifactType = "model-artifact" OR artifactType = "metrics-artifact") AND name LIKE "%pytorch%"`
- Custom property: `format.string_value = "pytorch"`
- Escaped property: `` `custom-key` = "value" ``
schema:
type: string
pattern: "^[\\x20-\\x7E]*$"
in: query
required: false
artifactOrderBy:
style: form
explode: true
examples:
standardField:
value: ID
summary: Order by standard field
customPropertyDouble:
value: mmlu.double_value
summary: Order by custom double property
customPropertyString:
value: framework_type.string_value
summary: Order by custom string property
customPropertyInt:
value: hardware_count.int_value
summary: Order by custom integer property
name: orderBy
description: |
Specifies the order by criteria for listing artifacts.
**Standard Fields:**
- `ID` - Order by artifact ID
- `NAME` - Order by artifact name
- `CREATE_TIME` - Order by creation timestamp
- `LAST_UPDATE_TIME` - Order by last update timestamp
**Custom Property Ordering:**
Artifacts can be ordered by custom properties using the format: `<property_name>.<value_type>`
Supported value types:
- `double_value` - For numeric (floating-point) properties
- `int_value` - For integer properties
- `string_value` - For string properties
Examples:
- `mmlu.double_value` - Order by the 'mmlu' benchmark score
- `accuracy.double_value` - Order by accuracy metric
- `framework_type.string_value` - Order by framework type
- `hardware_count.int_value` - Order by hardware count
- `ttft_mean.double_value` - Order by time-to-first-token mean
**Behavior:**
- If an invalid value type is specified (e.g., `accuracy.invalid_type`), an error is returned
- If an invalid format is used (e.g., `accuracy` without `.value_type`), it falls back to ID ordering
- If a property doesn't exist, it falls back to ID ordering
- Artifacts with the specified property are ordered first (by the property value), followed by artifacts without the property (ordered by ID)
- Empty property names (e.g., `.double_value`) return an error
schema:
type: string
in: query
required: false
artifactType:
style: form
explode: true
examples:
artifactType:
value: model-artifact
name: artifactType
description: "Specifies the artifact type for listing artifacts."
schema:
type: array
items:
$ref: "#/components/schemas/ArtifactTypeQueryParam"
in: query
required: false
artifact_type:
deprecated: true
style: form
explode: true
examples:
artifact_type:
value: model-artifact
name: artifact_type
description: "Specifies the artifact type for listing artifacts."
schema:
type: array
items:
$ref: "#/components/schemas/ArtifactTypeQueryParam"
in: query
required: false