@dbx-tools/dbx-model-catalog 0.1.5 → 0.1.6

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.
Files changed (42) hide show
  1. package/README.md +46 -9
  2. package/dist/_generated/json-schema.d.ts +3830 -0
  3. package/dist/_generated/published.d.ts +1 -1
  4. package/dist/_generated/schemas.d.ts +27 -2
  5. package/dist/browser.d.ts +11 -3
  6. package/dist/browser.js +9480 -1150
  7. package/dist/browser.js.map +32 -10
  8. package/dist/catalog-index.d.ts +28 -0
  9. package/dist/catalog.json +1 -0
  10. package/dist/cli.js +8847 -49461
  11. package/dist/cli.js.map +16 -223
  12. package/dist/filter.d.ts +2 -0
  13. package/dist/identity.d.ts +15 -0
  14. package/dist/index.d.ts +8 -4
  15. package/dist/index.js +8843 -49453
  16. package/dist/index.js.map +15 -222
  17. package/dist/local-client.d.ts +4 -0
  18. package/dist/{client.d.ts → pynect.d.ts} +1 -1
  19. package/dist/pynect.js +553 -0
  20. package/dist/pynect.js.map +15 -0
  21. package/dist/search-index.json +1 -0
  22. package/dist/search.d.ts +10 -0
  23. package/dist/snapshot.d.ts +6 -0
  24. package/dist/snapshot.js +9494 -0
  25. package/dist/snapshot.js.map +36 -0
  26. package/dist/types.d.ts +5 -0
  27. package/dist/validation.d.ts +5 -0
  28. package/package.json +27 -2
  29. package/dist/python/pyproject.toml +0 -16
  30. package/dist/python/src/dbx_model_catalog/__init__.py +0 -93
  31. package/dist/python/src/dbx_model_catalog/client.py +0 -256
  32. package/dist/python/src/dbx_model_catalog/database.py +0 -296
  33. package/dist/python/src/dbx_model_catalog/filters.py +0 -41
  34. package/dist/python/src/dbx_model_catalog/models.py +0 -853
  35. package/dist/python/src/dbx_model_catalog/publishing.py +0 -118
  36. package/dist/python/src/dbx_model_catalog/py.typed +0 -0
  37. package/dist/python/src/dbx_model_catalog/query.py +0 -593
  38. package/dist/python/src/dbx_model_catalog/schema/__init__.py +0 -0
  39. package/dist/python/src/dbx_model_catalog/schema/model-catalog.schema.json +0 -1016
  40. package/dist/python/src/dbx_model_catalog/search.py +0 -912
  41. package/dist/python/src/dbx_model_catalog_server/__init__.py +0 -3
  42. package/dist/python/src/dbx_model_catalog_server/app.py +0 -142
@@ -1,853 +0,0 @@
1
- from __future__ import annotations
2
-
3
- from datetime import date
4
- from enum import StrEnum
5
- from typing import Annotated, Literal
6
-
7
- from pydantic import AwareDatetime, BaseModel, ConfigDict, Field, confloat, conint, constr
8
-
9
-
10
- MODEL_CATALOG_SCHEMA_VERSION = 15
11
- ModelCatalogSchemaVersion = Literal[MODEL_CATALOG_SCHEMA_VERSION]
12
-
13
-
14
- class Type(StrEnum):
15
- """
16
- Normalized model type.
17
- """
18
-
19
- chat = 'chat'
20
- image = 'image'
21
- video = 'video'
22
- embedding = 'embedding'
23
- reranking = 'reranking'
24
- decision = 'decision'
25
- transcription = 'transcription'
26
- speech = 'speech'
27
- realtime = 'realtime'
28
- extraction = 'extraction'
29
- audio = 'audio'
30
-
31
-
32
- class Status(StrEnum):
33
- """
34
- Current normalized lifecycle state.
35
- """
36
-
37
- active = 'active'
38
- preview = 'preview'
39
- alpha = 'alpha'
40
- beta = 'beta'
41
- legacy = 'legacy'
42
- deprecated = 'deprecated'
43
- retired = 'retired'
44
-
45
-
46
- class Schedule(BaseModel):
47
- """
48
- Retirement dates for one serving offering.
49
- """
50
-
51
- model_config = ConfigDict(
52
- extra='forbid',
53
- )
54
- offering: str
55
- """
56
- Serving offering affected by this retirement schedule.
57
- """
58
- dates: list[date]
59
- """
60
- Retirement dates documented for the offering.
61
- """
62
-
63
-
64
- class Retirement(BaseModel):
65
- """
66
- Databricks retirement and replacement information.
67
- """
68
-
69
- model_config = ConfigDict(
70
- extra='forbid',
71
- )
72
- schedules: list[Schedule]
73
- """
74
- Retirement schedules by serving offering.
75
- """
76
- replacement: constr(min_length=1) | None = None
77
- """
78
- Catalog key of the recommended replacement model when matched.
79
- """
80
- replacement_name: str | None = None
81
- """
82
- Documented replacement model name when no catalog key is matched.
83
- """
84
-
85
-
86
- class Input(StrEnum):
87
- """
88
- Known model input and output modalities.
89
- """
90
-
91
- text = 'text'
92
- image = 'image'
93
- audio = 'audio'
94
- video = 'video'
95
- application_pdf = 'application/pdf'
96
- embedding = 'embedding'
97
- reranking = 'reranking'
98
- decision = 'decision'
99
-
100
-
101
- class Output(StrEnum):
102
- """
103
- Known model input and output modalities.
104
- """
105
-
106
- text = 'text'
107
- image = 'image'
108
- audio = 'audio'
109
- video = 'video'
110
- application_pdf = 'application/pdf'
111
- embedding = 'embedding'
112
- reranking = 'reranking'
113
- decision = 'decision'
114
-
115
-
116
- class Modalities(BaseModel):
117
- """
118
- Model input and output modalities.
119
- """
120
-
121
- model_config = ConfigDict(
122
- extra='forbid',
123
- )
124
- input: list[Input | constr(pattern=r'^(text|image|audio|video|application)\/[A-Za-z0-9.+-]+$')]
125
- """
126
- Modalities accepted by the model.
127
- """
128
- output: list[Output | constr(pattern=r'^(text|image|audio|video|application)\/[A-Za-z0-9.+-]+$')]
129
- """
130
- Modalities produced by the model.
131
- """
132
-
133
-
134
- class Reasoning(BaseModel):
135
- """
136
- Reasoning support and controls when known.
137
- """
138
-
139
- model_config = ConfigDict(
140
- extra='forbid',
141
- )
142
- supported: Literal[False]
143
- """
144
- The model does not support explicit reasoning controls.
145
- """
146
-
147
-
148
- class EffortEnum(StrEnum):
149
- """
150
- Normalized reasoning effort level.
151
- """
152
-
153
- none = 'none'
154
- minimal = 'minimal'
155
- low = 'low'
156
- medium = 'medium'
157
- high = 'high'
158
- xhigh = 'xhigh'
159
- max = 'max'
160
- default = 'default'
161
-
162
-
163
- class DefaultEffort(StrEnum):
164
- """
165
- Default reasoning effort when no level is specified.
166
- """
167
-
168
- none = 'none'
169
- minimal = 'minimal'
170
- low = 'low'
171
- medium = 'medium'
172
- high = 'high'
173
- xhigh = 'xhigh'
174
- max = 'max'
175
- default = 'default'
176
-
177
-
178
- class Budget(BaseModel):
179
- """
180
- Supported reasoning-token budget range.
181
- """
182
-
183
- model_config = ConfigDict(
184
- extra='forbid',
185
- )
186
- min: conint(ge=-9007199254740991, le=9007199254740991) | None = None
187
- """
188
- Minimum supported reasoning-token budget.
189
- """
190
- max: conint(ge=-9007199254740991, le=9007199254740991) | None = None
191
- """
192
- Maximum supported reasoning-token budget.
193
- """
194
-
195
-
196
- class Reasoning1(BaseModel):
197
- """
198
- Reasoning support and controls when known.
199
- """
200
-
201
- model_config = ConfigDict(
202
- extra='forbid',
203
- )
204
- supported: Literal[True]
205
- """
206
- The model supports explicit reasoning controls.
207
- """
208
- effort: list[EffortEnum] | None = None
209
- """
210
- Supported reasoning effort levels.
211
- """
212
- default_effort: DefaultEffort | None = None
213
- """
214
- Default reasoning effort when no level is specified.
215
- """
216
- toggle: bool | None = None
217
- """
218
- Whether reasoning can be explicitly enabled or disabled.
219
- """
220
- budget: Budget | None = None
221
- """
222
- Supported reasoning-token budget range.
223
- """
224
- description: str | None = None
225
- """
226
- Combined Databricks description of reasoning behavior.
227
- """
228
-
229
-
230
- class Capabilities(BaseModel):
231
- """
232
- Capabilities used to select the model for a workload.
233
- """
234
-
235
- model_config = ConfigDict(
236
- extra='forbid',
237
- )
238
- attachments: bool | None = None
239
- """
240
- Whether requests can include image, audio, video, or PDF attachments.
241
- """
242
- tools: bool | None = None
243
- """
244
- Whether the model supports tool or function calling.
245
- """
246
- structured_output: bool | None = None
247
- """
248
- Whether the model supports schema-constrained output.
249
- """
250
- temperature: bool | None = None
251
- """
252
- Whether the model supports temperature sampling.
253
- """
254
- interleaved_reasoning: bool | None = None
255
- """
256
- Whether reasoning content can be interleaved with the answer.
257
- """
258
- web_search: bool
259
- """
260
- Whether Databricks documents native web search support.
261
- """
262
- reasoning: Reasoning | Reasoning1 | None = None
263
- """
264
- Reasoning support and controls when known.
265
- """
266
-
267
-
268
- class Limits(BaseModel):
269
- """
270
- Documented token limits.
271
- """
272
-
273
- model_config = ConfigDict(
274
- extra='forbid',
275
- )
276
- context: conint(ge=0, le=9007199254740991) | None = None
277
- """
278
- Maximum context window in tokens.
279
- """
280
- input: conint(ge=0, le=9007199254740991) | None = None
281
- """
282
- Maximum input length in tokens.
283
- """
284
- output: conint(ge=0, le=9007199254740991) | None = None
285
- """
286
- Maximum generated output length in tokens.
287
- """
288
-
289
-
290
- class Status1(StrEnum):
291
- """
292
- Lifecycle state for this cloud-provider deployment.
293
- """
294
-
295
- active = 'active'
296
- preview = 'preview'
297
- alpha = 'alpha'
298
- beta = 'beta'
299
- legacy = 'legacy'
300
- deprecated = 'deprecated'
301
- retired = 'retired'
302
-
303
-
304
- class ServingMode(StrEnum):
305
- """
306
- Databricks serving mode available for the model.
307
- """
308
-
309
- pay_per_token = 'pay_per_token'
310
- priority_pay_per_token = 'priority_pay_per_token'
311
- provisioned_throughput = 'provisioned_throughput'
312
- batch = 'batch'
313
-
314
-
315
- class Availability(BaseModel):
316
- """
317
- Model availability on one Databricks cloud provider.
318
- """
319
-
320
- model_config = ConfigDict(
321
- extra='forbid',
322
- )
323
- status: Status1
324
- """
325
- Lifecycle state for this cloud-provider deployment.
326
- """
327
- serving_modes: list[ServingMode]
328
- """
329
- Serving modes documented or priced for this deployment.
330
- """
331
- details: str | None = None
332
- """
333
- Additional Databricks availability details.
334
- """
335
-
336
-
337
- class Unit(StrEnum):
338
- """
339
- Quantity to which the rates apply.
340
- """
341
-
342
- per_million_tokens = 'per_million_tokens'
343
- per_hour = 'per_hour'
344
- per_hour_per_50_model_units = 'per_hour_per_50_model_units'
345
-
346
-
347
- class Price(BaseModel):
348
- """
349
- Normalized Databricks price in one currency.
350
- """
351
-
352
- model_config = ConfigDict(
353
- extra='forbid',
354
- )
355
- unit: Unit
356
- """
357
- Quantity to which the rates apply.
358
- """
359
- rates: dict[constr(min_length=1), confloat(ge=0.0)]
360
- """
361
- Rates keyed by billing dimension.
362
- """
363
-
364
-
365
- class AveragePrice(BaseModel):
366
- """
367
- Normalized Databricks price in one currency.
368
- """
369
-
370
- model_config = ConfigDict(
371
- extra='forbid',
372
- )
373
- unit: Unit
374
- """
375
- Quantity to which the rates apply.
376
- """
377
- rates: dict[constr(min_length=1), confloat(ge=0.0)]
378
- """
379
- Rates keyed by billing dimension.
380
- """
381
-
382
-
383
- class SourceLink(BaseModel):
384
- """
385
- Openable attribution for published catalog data.
386
- """
387
-
388
- model_config = ConfigDict(
389
- extra='forbid',
390
- )
391
- label: constr(min_length=1)
392
- """
393
- Human-readable source name.
394
- """
395
- url: constr(min_length=1, pattern=r'^https?://')
396
- """
397
- Absolute HTTP URL for the source.
398
- """
399
-
400
-
401
- class Kind(StrEnum):
402
- """
403
- Known Databricks documentation notice kinds.
404
- """
405
-
406
- note = 'note'
407
- important = 'important'
408
- warning = 'warning'
409
- tip = 'tip'
410
- caution = 'caution'
411
- info = 'info'
412
-
413
-
414
- class Notice(BaseModel):
415
- """
416
- Important Databricks documentation notice.
417
- """
418
-
419
- model_config = ConfigDict(
420
- extra='forbid',
421
- )
422
- kind: Kind | constr(min_length=1)
423
- """
424
- Documentation notice kind.
425
- """
426
- title: str | None = None
427
- """
428
- Notice title when it adds information beyond the kind.
429
- """
430
- text: str
431
- """
432
- Deduplicated notice text.
433
- """
434
- sources: list[SourceLink]
435
- """
436
- Openable sources supporting the notice.
437
- """
438
-
439
-
440
- class ReasoningEffort(StrEnum):
441
- """
442
- Reasoning effort used by the evaluated variant.
443
- """
444
-
445
- none = 'none'
446
- minimal = 'minimal'
447
- low = 'low'
448
- medium = 'medium'
449
- high = 'high'
450
- xhigh = 'xhigh'
451
- max = 'max'
452
- default = 'default'
453
-
454
-
455
- class ReasoningMode(StrEnum):
456
- """
457
- Reasoning execution mode used by the evaluated variant.
458
- """
459
-
460
- auto = 'auto'
461
- thinking = 'thinking'
462
-
463
-
464
- class Variant(BaseModel):
465
- """
466
- Evaluated model variant when it differs from the base model.
467
- """
468
-
469
- model_config = ConfigDict(
470
- extra='forbid',
471
- )
472
- reasoning: bool | None = None
473
- """
474
- Whether the evaluated variant used reasoning.
475
- """
476
- reasoning_effort: ReasoningEffort | None = None
477
- """
478
- Reasoning effort used by the evaluated variant.
479
- """
480
- reasoning_mode: ReasoningMode | None = None
481
- """
482
- Reasoning execution mode used by the evaluated variant.
483
- """
484
- harness: str | None = None
485
- """
486
- Agent or evaluation harness used for the result.
487
- """
488
- context: conint(le=9007199254740991, gt=0) | None = None
489
- """
490
- Context-window size used by the evaluated variant.
491
- """
492
-
493
-
494
- class Rankings(BaseModel):
495
- """
496
- Competitive ranking based on human preference ratings.
497
- """
498
-
499
- model_config = ConfigDict(
500
- extra='forbid',
501
- )
502
- domain: str
503
- """
504
- Leaderboard domain or configuration.
505
- """
506
- category: str
507
- """
508
- Leaderboard category within the domain.
509
- """
510
- rank: conint(le=9007199254740991, gt=0)
511
- """
512
- One-based leaderboard rank.
513
- """
514
- published_at: date | None = None
515
- """
516
- Leaderboard publication date.
517
- """
518
- variant: Variant | None = None
519
- """
520
- Evaluated model variant when it differs from the base model.
521
- """
522
- sources: list[SourceLink]
523
- """
524
- Openable leaderboard sources for this result.
525
- """
526
- metric: Literal['rating']
527
- """
528
- This ranking uses a preference rating.
529
- """
530
- rating: float
531
- """
532
- Central rating estimate.
533
- """
534
- lower: float
535
- """
536
- Lower confidence bound.
537
- """
538
- upper: float
539
- """
540
- Upper confidence bound.
541
- """
542
- variance: confloat(ge=0.0)
543
- """
544
- Estimated rating variance.
545
- """
546
- votes: conint(ge=0, le=9007199254740991)
547
- """
548
- Human preference votes used for the rating.
549
- """
550
-
551
-
552
- class Variant1(BaseModel):
553
- """
554
- Evaluated model variant when it differs from the base model.
555
- """
556
-
557
- model_config = ConfigDict(
558
- extra='forbid',
559
- )
560
- reasoning: bool | None = None
561
- """
562
- Whether the evaluated variant used reasoning.
563
- """
564
- reasoning_effort: ReasoningEffort | None = None
565
- """
566
- Reasoning effort used by the evaluated variant.
567
- """
568
- reasoning_mode: ReasoningMode | None = None
569
- """
570
- Reasoning execution mode used by the evaluated variant.
571
- """
572
- harness: str | None = None
573
- """
574
- Agent or evaluation harness used for the result.
575
- """
576
- context: conint(le=9007199254740991, gt=0) | None = None
577
- """
578
- Context-window size used by the evaluated variant.
579
- """
580
-
581
-
582
- class Rankings1(BaseModel):
583
- """
584
- Competitive ranking based on a scored evaluation.
585
- """
586
-
587
- model_config = ConfigDict(
588
- extra='forbid',
589
- )
590
- domain: str
591
- """
592
- Leaderboard domain or configuration.
593
- """
594
- category: str
595
- """
596
- Leaderboard category within the domain.
597
- """
598
- rank: conint(le=9007199254740991, gt=0)
599
- """
600
- One-based leaderboard rank.
601
- """
602
- published_at: date | None = None
603
- """
604
- Leaderboard publication date.
605
- """
606
- variant: Variant1 | None = None
607
- """
608
- Evaluated model variant when it differs from the base model.
609
- """
610
- sources: list[SourceLink]
611
- """
612
- Openable leaderboard sources for this result.
613
- """
614
- metric: Literal['score']
615
- """
616
- This ranking uses an evaluation score.
617
- """
618
- score: float
619
- """
620
- Central score estimate.
621
- """
622
- lower: float
623
- """
624
- Lower confidence bound.
625
- """
626
- upper: float
627
- """
628
- Upper confidence bound.
629
- """
630
- observations: conint(ge=0, le=9007199254740991)
631
- """
632
- Observations used to estimate the score.
633
- """
634
- sessions: conint(ge=0, le=9007199254740991) | None
635
- """
636
- Evaluation sessions, or null when not reported.
637
- """
638
-
639
-
640
- class Variant2(BaseModel):
641
- """
642
- Evaluated model variant when it differs from the base model.
643
- """
644
-
645
- model_config = ConfigDict(
646
- extra='forbid',
647
- )
648
- reasoning: bool | None = None
649
- """
650
- Whether the evaluated variant used reasoning.
651
- """
652
- reasoning_effort: ReasoningEffort | None = None
653
- """
654
- Reasoning effort used by the evaluated variant.
655
- """
656
- reasoning_mode: ReasoningMode | None = None
657
- """
658
- Reasoning execution mode used by the evaluated variant.
659
- """
660
- harness: str | None = None
661
- """
662
- Agent or evaluation harness used for the result.
663
- """
664
- context: conint(le=9007199254740991, gt=0) | None = None
665
- """
666
- Context-window size used by the evaluated variant.
667
- """
668
-
669
-
670
- class Benchmark(BaseModel):
671
- """
672
- Task-suite benchmark result.
673
- """
674
-
675
- model_config = ConfigDict(
676
- extra='forbid',
677
- )
678
- name: str
679
- """
680
- Benchmark category or task-suite name.
681
- """
682
- rank: conint(le=9007199254740991, gt=0)
683
- """
684
- One-based benchmark rank.
685
- """
686
- score: float
687
- """
688
- Benchmark score.
689
- """
690
- task_count: conint(le=9007199254740991, gt=0)
691
- """
692
- Tasks represented by the benchmark score.
693
- """
694
- published_at: date | None = None
695
- """
696
- Benchmark publication date.
697
- """
698
- variant: Variant2 | None = None
699
- """
700
- Evaluated model variant when it differs from the base model.
701
- """
702
- sources: list[SourceLink]
703
- """
704
- Openable benchmark sources for this result.
705
- """
706
-
707
-
708
- class CatalogModel(BaseModel):
709
- """
710
- Published statistics for one Databricks model.
711
- """
712
-
713
- model_config = ConfigDict(
714
- extra='forbid',
715
- )
716
- name: str
717
- """
718
- Canonical model name from Databricks documentation.
719
- """
720
- description: str
721
- """
722
- Consolidated description of the model and intended use.
723
- """
724
- aliases: list[str]
725
- """
726
- Alternative names and identifiers; excludes the catalog key.
727
- """
728
- type: Type
729
- """
730
- Normalized model type.
731
- """
732
- family: str | None = None
733
- """
734
- Model family used to group related versions.
735
- """
736
- publisher: str | None = None
737
- """
738
- Organization that develops or publishes the model.
739
- """
740
- license: str | None = None
741
- """
742
- Model license or upstream license classification.
743
- """
744
- open_weights: bool | None = None
745
- """
746
- Whether model weights are publicly available.
747
- """
748
- status: Status
749
- """
750
- Current normalized lifecycle state.
751
- """
752
- release_date: date | None = None
753
- """
754
- Model release date.
755
- """
756
- last_updated: date | None = None
757
- """
758
- Latest known model revision or metadata date.
759
- """
760
- knowledge_cutoff: date | None = None
761
- """
762
- Latest date covered by the model's stated training knowledge.
763
- """
764
- retirement: Retirement | None = None
765
- """
766
- Databricks retirement and replacement information.
767
- """
768
- modalities: Modalities
769
- """
770
- Model input and output modalities.
771
- """
772
- capabilities: Capabilities
773
- """
774
- Capabilities used to select the model for a workload.
775
- """
776
- limits: Limits | None = None
777
- """
778
- Documented token limits.
779
- """
780
- tasks: list[str]
781
- """
782
- High-level tasks documented for the model.
783
- """
784
- use_cases: list[str]
785
- """
786
- Example use cases documented for the model.
787
- """
788
- availability: dict[Literal['aws', 'azure', 'gcp'], Availability]
789
- """
790
- Availability keyed by Databricks cloud provider.
791
- """
792
- price: dict[Literal['aws', 'azure', 'gcp'], dict[Literal['DBU', 'USD'], Price]]
793
- """
794
- Average Databricks DBU and USD prices for each cloud provider.
795
- """
796
- average_price: dict[Literal['DBU', 'USD'], AveragePrice]
797
- """
798
- Average Databricks DBU and USD price across cloud providers and matched pricing variants.
799
- """
800
- sources: dict[constr(min_length=1), list[SourceLink]]
801
- """
802
- Openable sources keyed by the catalog field they support.
803
- """
804
- notices: list[Notice]
805
- """
806
- Deduplicated Databricks documentation notices.
807
- """
808
- rankings: list[Rankings | Rankings1]
809
- """
810
- Competitive leaderboard rankings matched to the model.
811
- """
812
- benchmarks: list[Benchmark]
813
- """
814
- Task-suite benchmark results matched to the model.
815
- """
816
-
817
-
818
- class ModelCatalog(BaseModel):
819
- """
820
- Published Databricks model catalog with identity, capabilities, availability, pricing, lifecycle, rankings, and benchmarks.
821
- """
822
-
823
- model_config = ConfigDict(
824
- extra='forbid',
825
- )
826
- schema_version: ModelCatalogSchemaVersion
827
- """
828
- Version of the published catalog contract.
829
- """
830
- updated_at: AwareDatetime
831
- """
832
- Latest source-fetch timestamp represented by the catalog.
833
- """
834
- models: dict[constr(min_length=1), CatalogModel]
835
- """
836
- Models keyed by Databricks serving endpoint or model service identifier.
837
- """
838
-
839
-
840
- class CatalogModelRecord(CatalogModel):
841
- id: Annotated[str, Field(min_length=1)]
842
-
843
-
844
- __all__ = [
845
- "CatalogModel",
846
- "CatalogModelRecord",
847
- "MODEL_CATALOG_SCHEMA_VERSION",
848
- "ModelCatalog",
849
- "ModelCatalogSchemaVersion",
850
- "SourceLink",
851
- "Status",
852
- "Type",
853
- ]