feat(function): expose resolved environments and fresh lock requests (#5034)

Function registration clients cannot request fresh dependency resolution
or inspect the measured environment returned by the server. Add
`refresh_lock=True` to Python registration and preserve the requested
runtime and measured environments in Rust/Python Function version
readback. Registration forwards both `exist_ok` and `refresh_lock`;
defaults remain unchanged.

Single-platform versions retain `resolved_environment`.
Multiarchitecture versions expose `resolved_environments`, keyed by OCI
`os/architecture`, and the Python `environment_report` alias. Platforms
are never flattened: absent entries mean unknown measurements, while
measured empty package lists remain present. Registration waits emit
scalar and per-platform server warnings once per Job; catalog reads do
not repeat them.

Requires matching server support, including Sophon #10344 for
per-platform publication. Nine focused Python source-overlay tests and
29 documentation tests passed for the additive map change; one
documentation test requiring a newer native `exist_ok` binding was
excluded. These checks reuse a prebuilt extension and do not establish
current native integration. PR CI exercises the Rust transport/readback
and Python bindings. Live multiarchitecture registration and GPU
acceptance remain separate.
This commit is contained in:
Xuanwo
2026-11-14 22:30:28 +08:00
committed by GitHub
parent ea59f8acb6
commit 2499342fa1
9 changed files with 1087 additions and 8 deletions
+8
View File
@@ -564,6 +564,14 @@ with BlobReader(read_range, len(payload)) as reader:
::: lancedb.functions.FunctionVersion
::: lancedb.functions.FunctionEnvironment
::: lancedb.functions.ResolvedEnvironment
::: lancedb.functions.ResolvedPackage
::: lancedb.functions.ResolvedEnvironmentProvenance
::: lancedb.functions.HuggingFaceModel
::: lancedb.functions.PythonRuntimeSpec