Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/deepseek-ai/smallpond
/ functions
Functions
992 in github.com/deepseek-ai/smallpond
⨍
Functions
992
◇
Types & classes
154
↳
Endpoints
2
↓ 126 callers
Method
add_argument
Add a command-line argument. This is a wrapper of `argparse.ArgumentParser.add_argument(...)`.
smallpond/execution/driver.py:274
↓ 100 callers
Method
join
(self, timeout=None)
smallpond/execution/executor.py:89
↓ 56 callers
Method
join
(self)
smallpond/utility.py:136
↓ 44 callers
Method
execute_plan
Start a scheduler and `num_executors` executors to execute `plan`, and wait the execution completed, then assert if it succeeds.
tests/test_fabric.py:242
↓ 35 callers
Function
DataSetPartitionNode
Partition the outputs of `input_deps` into n partitions. Parameters ---------- npartitions The number of partitions. The inp
smallpond/logical/node.py:1595
↓ 34 callers
Method
add_elapsed_time
Start or stop the timer. If `metric_name` is provided, add the elapsed time to the task's performance metrics. Example: ```
smallpond/execution/task.py:1078
↓ 31 callers
Method
to_arrow_table
Load the dataset to an arrow table. Parameters ---------- max_workers, optional The maximum number of wo
smallpond/logical/dataset.py:283
↓ 29 callers
Method
map
Apply a function to each row. Parameters ---------- sql_or_func A SQL expression or a function to apply
smallpond/dataframe.py:465
↓ 24 callers
Method
get_output
(self, output_name: str)
smallpond/execution/task.py:3592
↓ 20 callers
Method
__init__
The base class for all nodes in logical plan. Parameters ---------- ctx The context of logical plan.
smallpond/logical/node.py:164
↓ 19 callers
Method
__init__
( self, ctx: RuntimeContext, input_deps: "List[Task]", partition_infos: List[P
smallpond/execution/task.py:578
↓ 18 callers
Method
_compare_arrow_tables
(self, expected: arrow.Table, actual: arrow.Table)
tests/test_fabric.py:280
↓ 18 callers
Method
to_arrow
Convert to an arrow Table. This operation will trigger execution of the lazy transformations performed on this DataFrame.
smallpond/dataframe.py:705
↓ 15 callers
Method
from_items
Create a DataFrame from a list of local Python objects.
smallpond/dataframe.py:74
↓ 15 callers
Function
remove_path
(path: str)
smallpond/io/filesystem.py:26
↓ 13 callers
Method
__str__
(self)
smallpond/logical/node.py:251
↓ 13 callers
Method
load_partitioned_datasets
Split the dataset into a list of partitioned datasets.
smallpond/logical/dataset.py:918
↓ 12 callers
Method
generic_visit
This visitor calls visit() on all children of the node.
smallpond/logical/node.py:2038
↓ 12 callers
Function
get_nth_partition
(items: List[V], n: int, npartitions: int)
smallpond/common.py:95
↓ 11 callers
Function
dump
Dump an object to a file. Args: obj: The object to dump. path: The path to the file to dump the object to. buffering: The
smallpond/io/filesystem.py:60
↓ 11 callers
Method
inject_fault
(self)
smallpond/execution/task.py:866
↓ 11 callers
Method
repartition
Repartition the data into the given number of partitions. Parameters ---------- npartitions The dataset
smallpond/dataframe.py:321
↓ 11 callers
Method
visit
(self, node: Node, depth: int = 0)
smallpond/logical/planner.py:114
↓ 10 callers
Method
_load_parquet_files
( self, paths, filesystem: fsspec.AbstractFileSystem = None )
tests/test_fabric.py:267
↓ 10 callers
Method
clear
(self)
smallpond/utility.py:145
↓ 10 callers
Method
create_task
( self, runtime_ctx: RuntimeContext, input_deps: List[Task], partition_infos:
smallpond/logical/node.py:274
↓ 10 callers
Method
from_arrow
Create a DataFrame from a pyarrow Table.
smallpond/dataframe.py:93
↓ 10 callers
Method
push
(self, item: WorkItem, buffering=False)
smallpond/execution/workqueue.py:250
↓ 9 callers
Function
load_from_parquet_files
( paths_or_ranges: Union[List[str], List[RowRange]], columns: List[str] = None, max_workers: int =
smallpond/io/arrow.py:307
↓ 9 callers
Method
run
The entry point for executor and scheduler of `plan`.
smallpond/execution/driver.py:319
↓ 9 callers
Function
split_into_rows
Evenly split items into npartitions. Example:: >>> split_into_rows(list(range(10)), 3) [[0, 1, 2, 3], [4, 5, 6], [7, 8, 9]]
smallpond/common.py:83
↓ 8 callers
Method
__str__
(self)
smallpond/execution/task.py:652
↓ 8 callers
Method
exec
(self, cq: Optional["WorkQueue"] = None)
smallpond/execution/workqueue.py:166
↓ 8 callers
Method
exec_query
( self, conn: duckdb.DuckDBPyConnection, query_statement: str, enable_profilin
smallpond/execution/task.py:1292
↓ 8 callers
Method
parse_arguments
(self, args=None)
smallpond/execution/driver.py:280
↓ 8 callers
Method
pop
(self, count=1)
smallpond/execution/workqueue.py:241
↓ 8 callers
Function
round_up
(x, align_size=MB)
smallpond/common.py:116
↓ 8 callers
Method
success
(self)
smallpond/execution/scheduler.py:451
↓ 8 callers
Method
to_arrow_table
( self, max_workers=16, filesystem: fsspec.AbstractFileSystem = None, conn: du
smallpond/logical/dataset.py:763
↓ 8 callers
Method
try_enqueue
(self, tasks: Union[Iterable[Task], Task])
smallpond/execution/scheduler.py:1079
↓ 8 callers
Method
write
(self, buffer)
smallpond/execution/task.py:440
↓ 7 callers
Method
__init__
Construct a dataset from a list of paths. Parameters ---------- paths A path or a list of paths or path
smallpond/logical/dataset.py:61
↓ 7 callers
Method
_compute
Compute the data and return the datasets.
smallpond/dataframe.py:278
↓ 7 callers
Function
cast_columns_to_large_string
(table: arrow.Table)
smallpond/io/arrow.py:138
↓ 7 callers
Function
dump_to_parquet_files
( table: arrow.Table, output_dir: str, filename: str = "data", compression="ZSTD", compres
smallpond/io/arrow.py:357
↓ 7 callers
Method
get_latest_sched_state
(self)
tests/test_fabric.py:110
↓ 7 callers
Function
load
Load an object from a file.
smallpond/io/filesystem.py:128
↓ 7 callers
Method
take_all
Return all rows. This operation will trigger execution of the lazy transformations performed on this DataFrame.
smallpond/dataframe.py:682
↓ 6 callers
Method
count
Count the number of rows. If this dataframe consists of more than a read, or if the row count can't be determined from the m
smallpond/dataframe.py:652
↓ 6 callers
Method
process_func
(_runtime_ctx, tables: List[arrow.Table])
smallpond/dataframe.py:452
↓ 6 callers
Method
push
(self, item: WorkItem, buffering=False)
smallpond/execution/scheduler.py:220
↓ 6 callers
Method
run
(self)
smallpond/execution/task.py:916
↓ 6 callers
Method
shutdown
Shutdown the session.
smallpond/dataframe.py:152
↓ 6 callers
Method
sql_query_fragment
Return a sql fragment that represents the dataset.
smallpond/logical/dataset.py:255
↓ 6 callers
Method
terminate
(self)
smallpond/execution/executor.py:31
↓ 6 callers
Method
to_duckdb_type
(self)
smallpond/logical/udf.py:45
↓ 6 callers
Method
wait
Wait for all DataFrames to be computed. Example ------- This can be used to wait for multiple outputs from a pipelin
smallpond/dataframe.py:124
↓ 5 callers
Method
__init__
( self, key: str, cpu_limit: int = None, gpu_limit: float = None, memo
smallpond/execution/workqueue.py:49
↓ 5 callers
Function
clamp_row_group_bytes
( val, minval=DEFAULT_ROW_GROUP_BYTES, maxval=MAX_ROW_GROUP_BYTES )
smallpond/common.py:44
↓ 5 callers
Method
create_exec_plan
( self, logical_plan: LogicalPlan, manifest_only_final_results=True )
smallpond/logical/planner.py:17
↓ 5 callers
Method
from_pandas
Create a DataFrame from a pandas DataFrame.
smallpond/dataframe.py:86
↓ 5 callers
Method
log_overall_progress
(self)
smallpond/execution/scheduler.py:968
↓ 5 callers
Method
pop
(self)
smallpond/execution/scheduler.py:193
↓ 5 callers
Method
prepare_connection
(self, conn: duckdb.DuckDBPyConnection)
smallpond/execution/task.py:1250
↓ 5 callers
Method
reset
Reset the dataset with new paths, root_dir, and recursive flag.
smallpond/logical/dataset.py:133
↓ 5 callers
Method
start
(self)
smallpond/execution/executor.py:28
↓ 5 callers
Method
to_batch_reader
Return an arrow record batch reader to read the dataset. Parameters ---------- batch_size, optional The
smallpond/logical/dataset.py:307
↓ 4 callers
Method
broadcast_input_deps
(self, node: Node, depth: int)
smallpond/logical/planner.py:262
↓ 4 callers
Function
build_batch_reader_from_files
( paths_or_ranges: Union[List[str], List[RowRange]], *, columns: Optional[List[str]] = None, b
smallpond/io/arrow.py:197
↓ 4 callers
Method
clean_complex_attrs
(self)
smallpond/execution/task.py:1030
↓ 4 callers
Method
cpu_count
(self)
smallpond/execution/scheduler.py:139
↓ 4 callers
Method
create_random_sleep_plan
( self, npartitions, max_sleep_secs, fail_first_try=False )
tests/test_scheduler.py:70
↓ 4 callers
Method
get_driver_arguments
(self, to_dict=True)
smallpond/execution/driver.py:299
↓ 4 callers
Method
get_local_gpus
(self)
smallpond/execution/task.py:300
↓ 4 callers
Method
log
Log the dataset to the logger.
smallpond/logical/dataset.py:265
↓ 4 callers
Method
merge
Merge multiple datasets into a single dataset.
smallpond/logical/dataset.py:127
↓ 4 callers
Method
parquet_kv_metadata_bytes
(self, extra_partitions: List[PartitionInfo] = None)
smallpond/execution/task.py:697
↓ 4 callers
Method
parquet_kv_metadata_str
(self, extra_partitions: List[PartitionInfo] = None)
smallpond/execution/task.py:680
↓ 4 callers
Method
partial_sql
Execute a SQL query on each partition of the input DataFrames. The query can contain placeholder `{0}`, `{1}`, etc. for the input Da
smallpond/dataframe.py:100
↓ 4 callers
Method
partition_by_files
Evenly split into `npartition` datasets by files.
smallpond/logical/dataset.py:343
↓ 4 callers
Function
pytest_running
()
smallpond/common.py:32
↓ 4 callers
Method
read_csv
Create a DataFrame from CSV files.
smallpond/dataframe.py:38
↓ 4 callers
Method
ready
(self)
smallpond/execution/executor.py:44
↓ 4 callers
Method
run
(self)
tests/test_workqueue.py:25
↓ 4 callers
Function
size_str_to_bytes
Parse size string to bytes. e.g. 1k -> 1024, 1M -> 1024^2, 1G -> 1024^3, 1T -> 1024^4
examples/fstest.py:122
↓ 4 callers
Function
sort_mock_urls
( input_paths, npartitions: int, engine_type="duckdb", external_output_path: Optional[str] = N
examples/sort_mock_urls.py:30
↓ 4 callers
Method
to_pandas
Convert the dataset to a pandas dataframe.
smallpond/logical/dataset.py:277
↓ 4 callers
Method
write_table
(writer: parquet.ParquetWriter, table: arrow.Table)
smallpond/execution/task.py:2353
↓ 3 callers
Method
__init__
(self, ctx: Context, input_deps: Tuple[Node, ...], msg: str)
tests/test_execution.py:104
↓ 3 callers
Method
_get_entries
(self, path=None)
smallpond/execution/workqueue.py:304
↓ 3 callers
Method
add_state_observer
(self, observer: StateObserver)
smallpond/execution/scheduler.py:964
↓ 3 callers
Method
cleanup
(self)
smallpond/execution/task.py:1024
↓ 3 callers
Method
clear_cached_executor_lists
(self)
smallpond/execution/scheduler.py:568
↓ 3 callers
Method
collect_finished_works
(self)
smallpond/execution/executor.py:281
↓ 3 callers
Method
compute
Compute the data. This operation will trigger execution of the lazy transformations performed on this DataFrame.
smallpond/dataframe.py:270
↓ 3 callers
Method
create
(ctx: RuntimeContext, id: str)
smallpond/execution/executor.py:126
↓ 3 callers
Method
create_function
Define a Python UDF to be referenced in the logical plan. Currently only scalar functions (return one element per row) are supported.
smallpond/logical/node.py:96
↓ 3 callers
Method
create_input_views
( self, conn: duckdb.DuckDBPyConnection, input_datasets: List[DataSet], filesy
smallpond/execution/task.py:1275
↓ 3 callers
Method
create_merge_task
( self, runtime_ctx: RuntimeContext, input_deps: List[Task], partition_infos:
smallpond/logical/node.py:1989
↓ 3 callers
Method
dump
(self)
smallpond/execution/task.py:1072
next →
1–100 of 992, ranked by callers