mirror of
https://github.com/lancedb/lancedb.git
synced 2026-11-16 07:36:50 +00:00
feat: expose structured Function refresh options in SDKs (#5047)
## Problem ENT-3267 still lacks typed refresh controls for `supervisor_resources` and `planning_workers` in Python, Rust, and Node, and Node has no `retry_policy` refresh option. Callers must drop to SQL for those controls. ## Change - Add canonical Rust `FunctionRefreshPodResources` and `FunctionRefreshPlanningConfig`, and serialize them through `RefreshColumnOptions`. - Expose both options in the Python sync/async wrappers and PyO3 binding. - Expose both options in the Node NAPI object and add a Node `retryPolicy` object backed by the existing Rust `FunctionRetryPolicy`. - Omitted options stay omitted; branch targeting continues through the table handle. No server, dependency, or pin changes are included. Client-side checks only reject non-positive structural values. Deployment resource limits and column-kind validation remain server-side. ## Validation `cargo fmt --all -- --check`, `python3 -m py_compile`, and `git diff --check` pass. No native build was run locally; CI compiles and tests the change. Generated JS API pages are unchanged.
This commit is contained in:
@@ -663,6 +663,8 @@ class Table:
|
||||
max_concurrency: Optional[int] = None,
|
||||
publication_interval_rows: Optional[int] = None,
|
||||
resource_budget: Optional[dict[str, int]] = None,
|
||||
supervisor_resources: Optional[dict[str, int]] = None,
|
||||
planning_workers: Optional[dict[str, Any]] = None,
|
||||
gpu_class: Optional[str] = None,
|
||||
gpu_count: Optional[int] = None,
|
||||
retry_policy: Optional[str] = None,
|
||||
@@ -683,6 +685,8 @@ class Table:
|
||||
max_concurrency: Optional[int] = None,
|
||||
publication_interval_rows: Optional[int] = None,
|
||||
resource_budget: Optional[dict[str, int]] = None,
|
||||
supervisor_resources: Optional[dict[str, int]] = None,
|
||||
planning_workers: Optional[dict[str, Any]] = None,
|
||||
gpu_class: Optional[str] = None,
|
||||
gpu_count: Optional[int] = None,
|
||||
retry_policy: Optional[str] = None,
|
||||
|
||||
@@ -1164,6 +1164,8 @@ class RemoteTable(Table):
|
||||
max_concurrency: Optional[int] = None,
|
||||
publication_interval_rows: Optional[int] = None,
|
||||
resource_budget: Optional[Dict[str, int]] = None,
|
||||
supervisor_resources: Optional[Dict[str, int]] = None,
|
||||
planning_workers: Optional[Dict[str, Any]] = None,
|
||||
gpu_class: Optional[str] = None,
|
||||
gpu_count: Optional[int] = None,
|
||||
retry_policy: Optional[FunctionRetryPolicy] = None,
|
||||
@@ -1183,6 +1185,8 @@ class RemoteTable(Table):
|
||||
max_concurrency=max_concurrency,
|
||||
publication_interval_rows=publication_interval_rows,
|
||||
resource_budget=resource_budget,
|
||||
supervisor_resources=supervisor_resources,
|
||||
planning_workers=planning_workers,
|
||||
gpu_class=gpu_class,
|
||||
gpu_count=gpu_count,
|
||||
retry_policy=retry_policy,
|
||||
@@ -1205,6 +1209,8 @@ class RemoteTable(Table):
|
||||
max_concurrency: Optional[int] = None,
|
||||
publication_interval_rows: Optional[int] = None,
|
||||
resource_budget: Optional[Dict[str, int]] = None,
|
||||
supervisor_resources: Optional[Dict[str, int]] = None,
|
||||
planning_workers: Optional[Dict[str, Any]] = None,
|
||||
gpu_class: Optional[str] = None,
|
||||
gpu_count: Optional[int] = None,
|
||||
retry_policy: Optional[FunctionRetryPolicy] = None,
|
||||
@@ -1225,6 +1231,8 @@ class RemoteTable(Table):
|
||||
max_concurrency=max_concurrency,
|
||||
publication_interval_rows=publication_interval_rows,
|
||||
resource_budget=resource_budget,
|
||||
supervisor_resources=supervisor_resources,
|
||||
planning_workers=planning_workers,
|
||||
gpu_class=gpu_class,
|
||||
gpu_count=gpu_count,
|
||||
retry_policy=retry_policy,
|
||||
|
||||
@@ -3258,6 +3258,8 @@ class Table(ABC):
|
||||
max_concurrency: Optional[int] = None,
|
||||
publication_interval_rows: Optional[int] = None,
|
||||
resource_budget: Optional[Dict[str, int]] = None,
|
||||
supervisor_resources: Optional[Dict[str, int]] = None,
|
||||
planning_workers: Optional[Dict[str, Any]] = None,
|
||||
gpu_class: Optional[str] = None,
|
||||
gpu_count: Optional[int] = None,
|
||||
retry_policy: Optional[FunctionRetryPolicy] = None,
|
||||
@@ -3315,6 +3317,17 @@ class Table(ABC):
|
||||
CPU-only budget. This budget cannot be combined with the top-level
|
||||
``gpu_count`` shorthand. LanceDB Enterprise only; local refreshes
|
||||
reject it.
|
||||
supervisor_resources: dict[str, int], optional
|
||||
CPU, memory, and ephemeral-storage limits for the Function refresh
|
||||
supervisor pod. Keys are ``cpu_millis``, ``memory_bytes`` and
|
||||
``ephemeral_storage_bytes``; all are required and positive.
|
||||
LanceDB Enterprise only; local refreshes reject it.
|
||||
planning_workers: dict[str, object], optional
|
||||
Resources and sizing for the Function refresh planning fleet.
|
||||
``resources`` has the same keys as ``supervisor_resources``; the
|
||||
other keys are ``max_workers``, ``rows_per_worker`` and
|
||||
``fragments_per_worker``. LanceDB Enterprise only; local refreshes
|
||||
reject it.
|
||||
gpu_class: str, optional
|
||||
GPU class for Function workers. Must be a lowercase name of 1-63
|
||||
letters, digits, or hyphens, without a leading or trailing hyphen.
|
||||
@@ -3367,6 +3380,8 @@ class Table(ABC):
|
||||
max_concurrency: Optional[int] = None,
|
||||
publication_interval_rows: Optional[int] = None,
|
||||
resource_budget: Optional[Dict[str, int]] = None,
|
||||
supervisor_resources: Optional[Dict[str, int]] = None,
|
||||
planning_workers: Optional[Dict[str, Any]] = None,
|
||||
gpu_class: Optional[str] = None,
|
||||
gpu_count: Optional[int] = None,
|
||||
retry_policy: Optional[FunctionRetryPolicy] = None,
|
||||
@@ -3423,6 +3438,17 @@ class Table(ABC):
|
||||
CPU-only budget. This budget cannot be combined with the top-level
|
||||
``gpu_count`` shorthand. LanceDB Enterprise only; local refreshes
|
||||
reject it.
|
||||
supervisor_resources: dict[str, int], optional
|
||||
CPU, memory, and ephemeral-storage limits for the Function refresh
|
||||
supervisor pod. Keys are ``cpu_millis``, ``memory_bytes`` and
|
||||
``ephemeral_storage_bytes``; all are required and positive.
|
||||
LanceDB Enterprise only; local refreshes reject it.
|
||||
planning_workers: dict[str, object], optional
|
||||
Resources and sizing for the Function refresh planning fleet.
|
||||
``resources`` has the same keys as ``supervisor_resources``; the
|
||||
other keys are ``max_workers``, ``rows_per_worker`` and
|
||||
``fragments_per_worker``. LanceDB Enterprise only; local refreshes
|
||||
reject it.
|
||||
gpu_class: str, optional
|
||||
GPU class for Function workers. Must be a lowercase name of 1-63
|
||||
letters, digits, or hyphens, without a leading or trailing hyphen.
|
||||
@@ -5632,6 +5658,8 @@ class LanceTable(Table):
|
||||
max_concurrency: Optional[int] = None,
|
||||
publication_interval_rows: Optional[int] = None,
|
||||
resource_budget: Optional[Dict[str, int]] = None,
|
||||
supervisor_resources: Optional[Dict[str, int]] = None,
|
||||
planning_workers: Optional[Dict[str, Any]] = None,
|
||||
gpu_class: Optional[str] = None,
|
||||
gpu_count: Optional[int] = None,
|
||||
retry_policy: Optional[FunctionRetryPolicy] = None,
|
||||
@@ -5654,6 +5682,8 @@ class LanceTable(Table):
|
||||
max_concurrency=max_concurrency,
|
||||
publication_interval_rows=publication_interval_rows,
|
||||
resource_budget=resource_budget,
|
||||
supervisor_resources=supervisor_resources,
|
||||
planning_workers=planning_workers,
|
||||
gpu_class=gpu_class,
|
||||
gpu_count=gpu_count,
|
||||
retry_policy=retry_policy,
|
||||
@@ -5676,6 +5706,8 @@ class LanceTable(Table):
|
||||
max_concurrency: Optional[int] = None,
|
||||
publication_interval_rows: Optional[int] = None,
|
||||
resource_budget: Optional[Dict[str, int]] = None,
|
||||
supervisor_resources: Optional[Dict[str, int]] = None,
|
||||
planning_workers: Optional[Dict[str, Any]] = None,
|
||||
gpu_class: Optional[str] = None,
|
||||
gpu_count: Optional[int] = None,
|
||||
retry_policy: Optional[FunctionRetryPolicy] = None,
|
||||
@@ -5700,6 +5732,8 @@ class LanceTable(Table):
|
||||
max_concurrency=max_concurrency,
|
||||
publication_interval_rows=publication_interval_rows,
|
||||
resource_budget=resource_budget,
|
||||
supervisor_resources=supervisor_resources,
|
||||
planning_workers=planning_workers,
|
||||
gpu_class=gpu_class,
|
||||
gpu_count=gpu_count,
|
||||
retry_policy=retry_policy,
|
||||
@@ -8109,6 +8143,8 @@ class AsyncTable:
|
||||
max_concurrency: Optional[int] = None,
|
||||
publication_interval_rows: Optional[int] = None,
|
||||
resource_budget: Optional[Dict[str, int]] = None,
|
||||
supervisor_resources: Optional[Dict[str, int]] = None,
|
||||
planning_workers: Optional[Dict[str, Any]] = None,
|
||||
gpu_class: Optional[str] = None,
|
||||
gpu_count: Optional[int] = None,
|
||||
retry_policy: Optional[FunctionRetryPolicy] = None,
|
||||
@@ -8166,6 +8202,17 @@ class AsyncTable:
|
||||
CPU-only budget. This budget cannot be combined with the top-level
|
||||
``gpu_count`` shorthand. LanceDB Enterprise only; local refreshes
|
||||
reject it.
|
||||
supervisor_resources: dict[str, int], optional
|
||||
CPU, memory, and ephemeral-storage limits for the Function refresh
|
||||
supervisor pod. Keys are ``cpu_millis``, ``memory_bytes`` and
|
||||
``ephemeral_storage_bytes``; all are required and positive.
|
||||
LanceDB Enterprise only; local refreshes reject it.
|
||||
planning_workers: dict[str, object], optional
|
||||
Resources and sizing for the Function refresh planning fleet.
|
||||
``resources`` has the same keys as ``supervisor_resources``; the
|
||||
other keys are ``max_workers``, ``rows_per_worker`` and
|
||||
``fragments_per_worker``. LanceDB Enterprise only; local refreshes
|
||||
reject it.
|
||||
gpu_class: str, optional
|
||||
GPU class for Function workers. Must be a lowercase name of 1-63
|
||||
letters, digits, or hyphens, without a leading or trailing hyphen.
|
||||
@@ -8213,6 +8260,8 @@ class AsyncTable:
|
||||
max_concurrency=max_concurrency,
|
||||
publication_interval_rows=publication_interval_rows,
|
||||
resource_budget=resource_budget,
|
||||
supervisor_resources=supervisor_resources,
|
||||
planning_workers=planning_workers,
|
||||
gpu_class=gpu_class,
|
||||
gpu_count=gpu_count,
|
||||
retry_policy=None
|
||||
@@ -8351,6 +8400,8 @@ class AsyncTable:
|
||||
max_concurrency: Optional[int] = None,
|
||||
publication_interval_rows: Optional[int] = None,
|
||||
resource_budget: Optional[Dict[str, int]] = None,
|
||||
supervisor_resources: Optional[Dict[str, int]] = None,
|
||||
planning_workers: Optional[Dict[str, Any]] = None,
|
||||
gpu_class: Optional[str] = None,
|
||||
gpu_count: Optional[int] = None,
|
||||
retry_policy: Optional[FunctionRetryPolicy] = None,
|
||||
@@ -8407,6 +8458,17 @@ class AsyncTable:
|
||||
CPU-only budget. This budget cannot be combined with the top-level
|
||||
``gpu_count`` shorthand. LanceDB Enterprise only; local refreshes
|
||||
reject it.
|
||||
supervisor_resources: dict[str, int], optional
|
||||
CPU, memory, and ephemeral-storage limits for the Function refresh
|
||||
supervisor pod. Keys are ``cpu_millis``, ``memory_bytes`` and
|
||||
``ephemeral_storage_bytes``; all are required and positive.
|
||||
LanceDB Enterprise only; local refreshes reject it.
|
||||
planning_workers: dict[str, object], optional
|
||||
Resources and sizing for the Function refresh planning fleet.
|
||||
``resources`` has the same keys as ``supervisor_resources``; the
|
||||
other keys are ``max_workers``, ``rows_per_worker`` and
|
||||
``fragments_per_worker``. LanceDB Enterprise only; local refreshes
|
||||
reject it.
|
||||
gpu_class: str, optional
|
||||
GPU class for Function workers. Must be a lowercase name of 1-63
|
||||
letters, digits, or hyphens, without a leading or trailing hyphen.
|
||||
@@ -8471,6 +8533,8 @@ class AsyncTable:
|
||||
max_concurrency=max_concurrency,
|
||||
publication_interval_rows=publication_interval_rows,
|
||||
resource_budget=resource_budget,
|
||||
supervisor_resources=supervisor_resources,
|
||||
planning_workers=planning_workers,
|
||||
gpu_class=gpu_class,
|
||||
gpu_count=gpu_count,
|
||||
retry_policy=None
|
||||
|
||||
@@ -2076,6 +2076,23 @@ def test_remote_create_index_async_returns_job():
|
||||
"gpu_count": 2,
|
||||
}
|
||||
},
|
||||
{
|
||||
"supervisor_resources": {
|
||||
"cpu_millis": 2000,
|
||||
"memory_bytes": 4 * 1024**3,
|
||||
"ephemeral_storage_bytes": 10 * 1024**3,
|
||||
},
|
||||
"planning_workers": {
|
||||
"resources": {
|
||||
"cpu_millis": 1000,
|
||||
"memory_bytes": 2 * 1024**3,
|
||||
"ephemeral_storage_bytes": 5 * 1024**3,
|
||||
},
|
||||
"max_workers": 4,
|
||||
"rows_per_worker": 100_000,
|
||||
"fragments_per_worker": 8,
|
||||
},
|
||||
},
|
||||
{"gpu_class": "a10g", "gpu_count": 2},
|
||||
{
|
||||
"retry_policy": {"transient": True, "max_attempts": 3},
|
||||
@@ -2122,6 +2139,9 @@ async def test_remote_refresh_async_returns_typed_terminal_result(
|
||||
**budget,
|
||||
"gpu_count": budget.get("gpu_count", 0),
|
||||
}
|
||||
for key in ("supervisor_resources", "planning_workers"):
|
||||
if refresh_kwargs.get(key) is not None:
|
||||
expected[key] = refresh_kwargs[key]
|
||||
if refresh_kwargs.get("retry_policy") is not None:
|
||||
expected["retry_policy"] = lancedb.FunctionRetryPolicy.model_validate(
|
||||
refresh_kwargs["retry_policy"]
|
||||
@@ -2350,6 +2370,51 @@ def test_remote_refresh_async_forwards_progress_from_submitted_handle():
|
||||
},
|
||||
"unsupported key 'unknown'",
|
||||
),
|
||||
(
|
||||
{
|
||||
"supervisor_resources": {
|
||||
"cpu_millis": 0,
|
||||
"memory_bytes": 1,
|
||||
"ephemeral_storage_bytes": 1,
|
||||
}
|
||||
},
|
||||
"supervisor_resources.cpu_millis",
|
||||
),
|
||||
(
|
||||
{
|
||||
"supervisor_resources": {
|
||||
"cpu_millis": 1,
|
||||
"memory_bytes": 1,
|
||||
}
|
||||
},
|
||||
"supervisor_resources.ephemeral_storage_bytes",
|
||||
),
|
||||
(
|
||||
{
|
||||
"supervisor_resources": {
|
||||
"cpu_millis": 1,
|
||||
"memory_bytes": 1,
|
||||
"ephemeral_storage_bytes": 1,
|
||||
"unknown": 1,
|
||||
}
|
||||
},
|
||||
"unsupported key 'unknown'",
|
||||
),
|
||||
(
|
||||
{
|
||||
"planning_workers": {
|
||||
"resources": {
|
||||
"cpu_millis": 1,
|
||||
"memory_bytes": 1,
|
||||
"ephemeral_storage_bytes": 1,
|
||||
},
|
||||
"max_workers": 0,
|
||||
"rows_per_worker": 1,
|
||||
"fragments_per_worker": 1,
|
||||
}
|
||||
},
|
||||
"planning_workers.max_workers",
|
||||
),
|
||||
(
|
||||
{"max_executor_processes_per_worker": -2},
|
||||
"max_executor_processes_per_worker",
|
||||
|
||||
@@ -6013,6 +6013,31 @@ def test_refresh_column_rejects_invalid_batch_size(tmp_path, method, batch_size)
|
||||
{"resource_budget": {"cpu_millis": 1000, "memory_bytes": 1024}},
|
||||
"resource_budget",
|
||||
),
|
||||
(
|
||||
{
|
||||
"supervisor_resources": {
|
||||
"cpu_millis": 1000,
|
||||
"memory_bytes": 1024,
|
||||
"ephemeral_storage_bytes": 2048,
|
||||
}
|
||||
},
|
||||
"supervisor_resources",
|
||||
),
|
||||
(
|
||||
{
|
||||
"planning_workers": {
|
||||
"resources": {
|
||||
"cpu_millis": 1000,
|
||||
"memory_bytes": 1024,
|
||||
"ephemeral_storage_bytes": 2048,
|
||||
},
|
||||
"max_workers": 2,
|
||||
"rows_per_worker": 100,
|
||||
"fragments_per_worker": 1,
|
||||
}
|
||||
},
|
||||
"planning_workers",
|
||||
),
|
||||
({"num_workers": 2}, "num_workers"),
|
||||
({"max_executor_processes_per_worker": 2}, "max_executor_processes_per_worker"),
|
||||
],
|
||||
|
||||
+114
-4
@@ -30,8 +30,9 @@ use lancedb::connection::LanceFileVersion;
|
||||
use lancedb::index::scalar::FtsIndexBuilder;
|
||||
use lancedb::table::{
|
||||
AddDataMode, ColumnAlteration, CompactionMode, CompactionOptions, Duration,
|
||||
FieldMetadataUpdate, FtsToken as LanceDbFtsToken, FunctionWorkerResourceBudget, IndexRemapMode,
|
||||
NewColumnTransform, Ref, RefreshColumnOptions, Table as LanceDbTable,
|
||||
FieldMetadataUpdate, FtsToken as LanceDbFtsToken, FunctionRefreshPlanningConfig,
|
||||
FunctionRefreshPodResources, FunctionWorkerResourceBudget, IndexRemapMode, NewColumnTransform,
|
||||
Ref, RefreshColumnOptions, Table as LanceDbTable,
|
||||
};
|
||||
use lancedb::tokenize as lancedb_tokenize;
|
||||
use pyo3::{
|
||||
@@ -52,6 +53,8 @@ struct RefreshColumnArgs {
|
||||
max_concurrency: Option<u32>,
|
||||
publication_interval_rows: Option<i64>,
|
||||
resource_budget: Option<FunctionWorkerResourceBudget>,
|
||||
supervisor_resources: Option<FunctionRefreshPodResources>,
|
||||
planning_workers: Option<FunctionRefreshPlanningConfig>,
|
||||
gpu_class: Option<String>,
|
||||
gpu_count: Option<i64>,
|
||||
retry_policy: Option<String>,
|
||||
@@ -159,6 +162,101 @@ fn parse_resource_budget(
|
||||
))
|
||||
}
|
||||
|
||||
fn structured_integer(value: &Bound<'_, PyAny>, name: &str) -> PyResult<u64> {
|
||||
if value.is_none() || value.is_instance_of::<PyBool>() {
|
||||
return Err(PyValueError::new_err(format!("{name} must be an integer")));
|
||||
}
|
||||
let parsed = value
|
||||
.extract::<u64>()
|
||||
.map_err(|_| PyValueError::new_err(format!("{name} must be an integer")))?;
|
||||
if parsed == 0 {
|
||||
return Err(PyValueError::new_err(format!(
|
||||
"{name} must be greater than zero"
|
||||
)));
|
||||
}
|
||||
Ok(parsed)
|
||||
}
|
||||
|
||||
fn parse_pod_resources(
|
||||
resources: &Bound<'_, PyDict>,
|
||||
prefix: &str,
|
||||
) -> PyResult<FunctionRefreshPodResources> {
|
||||
for key in resources.keys() {
|
||||
let key = key
|
||||
.extract::<String>()
|
||||
.map_err(|_| PyValueError::new_err(format!("{prefix} keys must be strings")))?;
|
||||
if !matches!(
|
||||
key.as_str(),
|
||||
"cpu_millis" | "memory_bytes" | "ephemeral_storage_bytes"
|
||||
) {
|
||||
return Err(PyValueError::new_err(format!(
|
||||
"{prefix} contains unsupported key '{key}'"
|
||||
)));
|
||||
}
|
||||
}
|
||||
let get = |name: &str| -> PyResult<u64> {
|
||||
let value = resources
|
||||
.get_item(name)?
|
||||
.ok_or_else(|| PyValueError::new_err(format!("{prefix}.{name} is required")))?;
|
||||
structured_integer(&value, &format!("{prefix}.{name}"))
|
||||
};
|
||||
Ok(FunctionRefreshPodResources::new(
|
||||
get("cpu_millis")?,
|
||||
get("memory_bytes")?,
|
||||
get("ephemeral_storage_bytes")?,
|
||||
))
|
||||
}
|
||||
|
||||
fn parse_supervisor_resources(
|
||||
resources: Option<&Bound<'_, PyDict>>,
|
||||
) -> PyResult<Option<FunctionRefreshPodResources>> {
|
||||
resources
|
||||
.map(|resources| parse_pod_resources(resources, "supervisor_resources"))
|
||||
.transpose()
|
||||
}
|
||||
|
||||
fn parse_planning_workers(
|
||||
planning: Option<&Bound<'_, PyDict>>,
|
||||
) -> PyResult<Option<FunctionRefreshPlanningConfig>> {
|
||||
let Some(planning) = planning else {
|
||||
return Ok(None);
|
||||
};
|
||||
for key in planning.keys() {
|
||||
let key = key
|
||||
.extract::<String>()
|
||||
.map_err(|_| PyValueError::new_err("planning_workers keys must be strings"))?;
|
||||
if !matches!(
|
||||
key.as_str(),
|
||||
"resources" | "max_workers" | "rows_per_worker" | "fragments_per_worker"
|
||||
) {
|
||||
return Err(PyValueError::new_err(format!(
|
||||
"planning_workers contains unsupported key '{key}'"
|
||||
)));
|
||||
}
|
||||
}
|
||||
let resources = planning
|
||||
.get_item("resources")?
|
||||
.ok_or_else(|| PyValueError::new_err("planning_workers.resources is required"))?;
|
||||
let resources = resources
|
||||
.cast::<PyDict>()
|
||||
.map_err(|_| PyValueError::new_err("planning_workers.resources must be a dict"))?;
|
||||
let resources = parse_pod_resources(resources, "planning_workers.resources")?;
|
||||
let get = |name: &str| -> PyResult<u64> {
|
||||
let value = planning
|
||||
.get_item(name)?
|
||||
.ok_or_else(|| PyValueError::new_err(format!("planning_workers.{name} is required")))?;
|
||||
structured_integer(&value, &format!("planning_workers.{name}"))
|
||||
};
|
||||
let max_workers = usize::try_from(get("max_workers")?)
|
||||
.map_err(|_| PyValueError::new_err("planning_workers.max_workers is too large"))?;
|
||||
Ok(Some(FunctionRefreshPlanningConfig::new(
|
||||
resources,
|
||||
max_workers,
|
||||
get("rows_per_worker")?,
|
||||
get("fragments_per_worker")?,
|
||||
)))
|
||||
}
|
||||
|
||||
fn refresh_column_options(args: RefreshColumnArgs) -> PyResult<RefreshColumnOptions> {
|
||||
let RefreshColumnArgs {
|
||||
where_clause,
|
||||
@@ -166,6 +264,8 @@ fn refresh_column_options(args: RefreshColumnArgs) -> PyResult<RefreshColumnOpti
|
||||
max_concurrency,
|
||||
publication_interval_rows,
|
||||
resource_budget,
|
||||
supervisor_resources,
|
||||
planning_workers,
|
||||
gpu_class,
|
||||
gpu_count,
|
||||
retry_policy,
|
||||
@@ -211,6 +311,8 @@ fn refresh_column_options(args: RefreshColumnArgs) -> PyResult<RefreshColumnOpti
|
||||
options.publication_interval_rows =
|
||||
positive_count(publication_interval_rows, "publication_interval_rows")?;
|
||||
options.resource_budget = resource_budget;
|
||||
options.supervisor_resources = supervisor_resources;
|
||||
options.planning_workers = planning_workers;
|
||||
options.gpu_class = gpu_class;
|
||||
options.gpu_count = gpu_count
|
||||
.map(|count| {
|
||||
@@ -2492,7 +2594,7 @@ impl Table {
|
||||
})
|
||||
}
|
||||
|
||||
#[pyo3(signature = (column, *, r#where=None, batch_size=None, max_concurrency=None, publication_interval_rows=None, resource_budget=None, gpu_class=None, gpu_count=None, retry_policy=None, error_policy=None, max_failed_fraction=None, max_failed_rows=None, row_timeout_seconds=None, init_timeout_seconds=None, num_workers=None, max_executor_processes_per_worker=None))]
|
||||
#[pyo3(signature = (column, *, r#where=None, batch_size=None, max_concurrency=None, publication_interval_rows=None, resource_budget=None, supervisor_resources=None, planning_workers=None, gpu_class=None, gpu_count=None, retry_policy=None, error_policy=None, max_failed_fraction=None, max_failed_rows=None, row_timeout_seconds=None, init_timeout_seconds=None, num_workers=None, max_executor_processes_per_worker=None))]
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn refresh_column<'py>(
|
||||
self_: PyRef<'py, Self>,
|
||||
@@ -2502,6 +2604,8 @@ impl Table {
|
||||
max_concurrency: Option<Bound<'py, PyAny>>,
|
||||
publication_interval_rows: Option<i64>,
|
||||
resource_budget: Option<Bound<'py, PyDict>>,
|
||||
supervisor_resources: Option<Bound<'py, PyDict>>,
|
||||
planning_workers: Option<Bound<'py, PyDict>>,
|
||||
gpu_class: Option<String>,
|
||||
gpu_count: Option<i64>,
|
||||
retry_policy: Option<String>,
|
||||
@@ -2519,6 +2623,8 @@ impl Table {
|
||||
max_concurrency: positive_u32_integer(max_concurrency.as_ref(), "max_concurrency")?,
|
||||
publication_interval_rows,
|
||||
resource_budget: parse_resource_budget(resource_budget.as_ref())?,
|
||||
supervisor_resources: parse_supervisor_resources(supervisor_resources.as_ref())?,
|
||||
planning_workers: parse_planning_workers(planning_workers.as_ref())?,
|
||||
gpu_class,
|
||||
gpu_count,
|
||||
retry_policy,
|
||||
@@ -2540,7 +2646,7 @@ impl Table {
|
||||
})
|
||||
}
|
||||
|
||||
#[pyo3(signature = (column, *, r#where=None, batch_size=None, max_concurrency=None, publication_interval_rows=None, resource_budget=None, gpu_class=None, gpu_count=None, retry_policy=None, error_policy=None, max_failed_fraction=None, max_failed_rows=None, row_timeout_seconds=None, init_timeout_seconds=None, num_workers=None, max_executor_processes_per_worker=None))]
|
||||
#[pyo3(signature = (column, *, r#where=None, batch_size=None, max_concurrency=None, publication_interval_rows=None, resource_budget=None, supervisor_resources=None, planning_workers=None, gpu_class=None, gpu_count=None, retry_policy=None, error_policy=None, max_failed_fraction=None, max_failed_rows=None, row_timeout_seconds=None, init_timeout_seconds=None, num_workers=None, max_executor_processes_per_worker=None))]
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn refresh_column_async<'py>(
|
||||
self_: PyRef<'py, Self>,
|
||||
@@ -2550,6 +2656,8 @@ impl Table {
|
||||
max_concurrency: Option<Bound<'py, PyAny>>,
|
||||
publication_interval_rows: Option<i64>,
|
||||
resource_budget: Option<Bound<'py, PyDict>>,
|
||||
supervisor_resources: Option<Bound<'py, PyDict>>,
|
||||
planning_workers: Option<Bound<'py, PyDict>>,
|
||||
gpu_class: Option<String>,
|
||||
gpu_count: Option<i64>,
|
||||
retry_policy: Option<String>,
|
||||
@@ -2567,6 +2675,8 @@ impl Table {
|
||||
max_concurrency: positive_u32_integer(max_concurrency.as_ref(), "max_concurrency")?,
|
||||
publication_interval_rows,
|
||||
resource_budget: parse_resource_budget(resource_budget.as_ref())?,
|
||||
supervisor_resources: parse_supervisor_resources(supervisor_resources.as_ref())?,
|
||||
planning_workers: parse_planning_workers(planning_workers.as_ref())?,
|
||||
gpu_class,
|
||||
gpu_count,
|
||||
retry_policy,
|
||||
|
||||
Reference in New Issue
Block a user