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