⌘K ctrl+k
Search Shortcut cmd + k | ctrl + k
DuckDB 2.0 ドキュメント 全文検索
per page, with , order by , clip by
Results of 1 - 2 of about 2 for tensors (0.003 sec.)
Integration with PyTorch 11228
PyTorch tensors can be built from DuckDB query results by exporting each result batch as Apache Arrow . This pattern is useful when training or serving models on Parquet data because DuckDB can filter and project the input before the batche ... s are converted to tensors. Installation pip install -U duckdb numpy pyarrow torch DuckDB to PyTorch This example queries a Parquet-backed Arrow data ... set, streams the result as RecordBatch objects and converts each batch into feature and label tensors. import pathlib import tempfile import duckdb import numpy as np import pyarrow as pa import pyarrow.dataset as ds import ... E label = 1 filter and the selected columns into the dataset scan, so only the requested rows and columns are converted to tensors. The to_arrow_reader method of a relation streams the result in batches instead of materializing the full result in memory ...
https://man.mtool.work/duckdb/2.0/guides/python/pytorch.html
Python Client API 7485
Connection class duckdb. Appender Bases: object append_row ( self , * args ) → None Buffer one row, one value per column, each converted as an executemany parameter would be append_rows ( self , rows : object ) → None Buffer each row of an ... lation object from the named table function with given parameters. tf ( self ) → dict Fetch a result as dict of TensorFlow Tensors following execute() to_arrow_reader ( batch_size : int = 131072 ) → Any A reader over every row the pending result still h ... → Any Every row the pending result still holds, as an Arrow Table. torch ( self ) → dict Fetch a result as dict of PyTorch Tensors following execute() type ( self , type_str : str ) → _duckdb._sqltypes.DuckDBPyType Create a type object by parsing the ‘t ... . Detailed examples can be found at Relational API page . tf ( ) → dict [ str , Any ] Fetch a result as dict of TensorFlow Tensors. Detailed examples can be found at Relational API page . to_arrow_reader ( batch_size : int = 131072 ) → Any Execute and r ...
https://man.mtool.work/duckdb/2.0/clients/python/reference/
PREV 1 NEXT
DuckDB 2.0 Documentation / man.mtool.work