mirror of
https://github.com/lancedb/lancedb.git
synced 2026-11-13 14:16:54 +00:00
feat: support pinned Hugging Face model declarations (#4821)
Python Function declarations can now pin Hugging Face snapshots with `models=[HuggingFaceModel(repo=..., revision=...)]`. The native Rust registration path carries those declarations into `CREATE FUNCTION`, and create/get/list results retain `image.models`. Functions without declarations preserve their existing payload shape. The API reference includes a model-loading example that initializes once per Function instance. Validation: - The real SQL mock-service regression fails on the previous native implementation and passes after the fix. It covers immediate/deferred execution, requests with/without models, and create/get/list responses. - Rust Function wire tests, strict Clippy, the public-type doctest, and formatting. - Rebuilt Python extension and targeted registration/golden tests. The service-side snapshot preparation and cache are delivered separately for ENT-3483.
This commit is contained in:
@@ -470,6 +470,8 @@ with BlobReader(read_range, len(payload)) as reader:
|
||||
|
||||
::: lancedb.functions.FunctionVersion
|
||||
|
||||
::: lancedb.functions.HuggingFaceModel
|
||||
|
||||
::: lancedb.functions.PythonRuntimeSpec
|
||||
|
||||
::: lancedb.GpuClass
|
||||
|
||||
Reference in New Issue
Block a user