Merge latest main documentation into gatekeeper/fix-4843-1

This commit is contained in:
Gatefixer
2026-11-20 21:51:32 +00:00
2 changed files with 20 additions and 2 deletions
+10
View File
@@ -209,6 +209,7 @@ gpu_class = next(
@function( @function(
gpu=True, gpu=True,
gpu_class=gpu_class, gpu_class=gpu_class,
row_timeout_seconds=600,
pip=["torch==2.12.0", "sentence-transformers==5.7.0"], pip=["torch==2.12.0", "sentence-transformers==5.7.0"],
input_schema=pa.schema([pa.field("text", pa.string(), nullable=True)]), input_schema=pa.schema([pa.field("text", pa.string(), nullable=True)]),
output_schema=pa.list_(pa.float32(), 384), output_schema=pa.list_(pa.float32(), 384),
@@ -231,6 +232,15 @@ table.add_columns({"embedding": version(text=col("caption"))})
``` ```
</CodeGroup> </CodeGroup>
`row_timeout_seconds` sets the per-call deadline, not the `__init__` budget.
Current Enterprise builds default to 300 seconds for both CPU and GPU
Functions. Enterprise 1.13.0 through 1.14.1, and 1.15.0 builds before the
shared default was restored, reject a GPU refresh unless the Function
definition or the refresh request sets a positive value; registration still
succeeds. A refresh value overrides the definition. Size the deadline from the
longest observed call. The 600 seconds above is one working GPU example, not a
universal recommendation.
Older servers that do not implement `GET /v1/gpu/classes` raise Older servers that do not implement `GET /v1/gpu/classes` raise
`NotImplementedError`. Without `gpu_class`, the deployment's default GPU `NotImplementedError`. Without `gpu_class`, the deployment's default GPU
class is used. The class is immutable with the Function version; set a class is used. The class is immutable with the Function version; set a
+10 -2
View File
@@ -3724,7 +3724,11 @@ def function(
Positive, finite deadline in seconds for each Python call: one row for Positive, finite deadline in seconds for each Python call: one row for
scalar Functions and one batch for vectorized Functions. This does not scalar Functions and one batch for vectorized Functions. This does not
govern class initialization. When omitted, the service applies its govern class initialization. When omitted, the service applies its
default per-call budget. default per-call budget, currently 300 seconds on Enterprise builds.
Set it for a GPU Function whose longest call can exceed that budget.
Enterprise builds that require an explicit GPU deadline reject a
refresh when neither the definition nor the refresh request sets one;
a refresh value overrides the definition.
retry_policy : FunctionRetryPolicy, optional retry_policy : FunctionRetryPolicy, optional
Retry selected failed calls inside the Function, with bounded attempts Retry selected failed calls inside the Function, with bounded attempts
and backoff. A refresh may override this default. Retrying a partial and backoff. A refresh may override this default. Retrying a partial
@@ -3918,7 +3922,11 @@ __all__ = [
def udf(*args: Any, **kwargs: Any) -> Any: def udf(*args: Any, **kwargs: Any) -> Any:
"""Deprecated alias of :func:`function`.""" """Deprecated alias of :func:`function`.
Accepts the same options, including ``row_timeout_seconds``. See
:func:`function` for GPU deadline guidance.
"""
warnings.warn( warnings.warn(
"lancedb.udf is deprecated; use lancedb.function", "lancedb.udf is deprecated; use lancedb.function",
DeprecationWarning, DeprecationWarning,