Skip to content

Commit ce2f81d

Browse files
committed
refactor(api)!: align signatures of to_torch method
1 parent 6b055b1 commit ce2f81d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

ibis/backends/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ def to_pyarrow_batches(
307307
def to_torch(
308308
self,
309309
expr: ir.Expr,
310+
/,
310311
*,
311312
params: Mapping[ir.Scalar, Any] | None = None,
312313
limit: int | str | None = None,

ibis/backends/duckdb/__init__.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,10 +1357,11 @@ def execute(
13571357
def to_torch(
13581358
self,
13591359
expr: ir.Expr,
1360+
/,
13601361
*,
13611362
params: Mapping[ir.Scalar, Any] | None = None,
13621363
limit: int | str | None = None,
1363-
**_: Any,
1364+
**kwargs: Any,
13641365
) -> dict[str, torch.Tensor]:
13651366
"""Execute an expression and return results as a dictionary of torch tensors.
13661367
@@ -1379,9 +1380,10 @@ def to_torch(
13791380
-------
13801381
dict[str, torch.Tensor]
13811382
A dictionary of torch tensors, keyed by column name.
1382-
13831383
"""
1384-
return self._to_duckdb_relation(expr, params=params, limit=limit).torch()
1384+
return self._to_duckdb_relation(
1385+
expr, params=params, limit=limit, **kwargs
1386+
).torch()
13851387

13861388
@util.experimental
13871389
def to_parquet(

0 commit comments

Comments
 (0)