MCPcopy Index your code

hub / github.com/deepseek-ai/smallpond / functions

Functions992 in github.com/deepseek-ai/smallpond

↓ 126 callersMethodadd_argument
Add a command-line argument. This is a wrapper of `argparse.ArgumentParser.add_argument(...)`.
smallpond/execution/driver.py:274
↓ 100 callersMethodjoin
(self, timeout=None)
smallpond/execution/executor.py:89
↓ 56 callersMethodjoin
(self)
smallpond/utility.py:136
↓ 44 callersMethodexecute_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 callersFunctionDataSetPartitionNode
Partition the outputs of `input_deps` into n partitions. Parameters ---------- npartitions The number of partitions. The inp
smallpond/logical/node.py:1595
↓ 34 callersMethodadd_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 callersMethodto_arrow_table
Load the dataset to an arrow table. Parameters ---------- max_workers, optional The maximum number of wo
smallpond/logical/dataset.py:283
↓ 29 callersMethodmap
Apply a function to each row. Parameters ---------- sql_or_func A SQL expression or a function to apply
smallpond/dataframe.py:465
↓ 24 callersMethodget_output
(self, output_name: str)
smallpond/execution/task.py:3592
↓ 20 callersMethod__init__
The base class for all nodes in logical plan. Parameters ---------- ctx The context of logical plan.
smallpond/logical/node.py:164
↓ 19 callersMethod__init__
( self, ctx: RuntimeContext, input_deps: "List[Task]", partition_infos: List[P
smallpond/execution/task.py:578
↓ 18 callersMethod_compare_arrow_tables
(self, expected: arrow.Table, actual: arrow.Table)
tests/test_fabric.py:280
↓ 18 callersMethodto_arrow
Convert to an arrow Table. This operation will trigger execution of the lazy transformations performed on this DataFrame.
smallpond/dataframe.py:705
↓ 15 callersMethodfrom_items
Create a DataFrame from a list of local Python objects.
smallpond/dataframe.py:74
↓ 15 callersFunctionremove_path
(path: str)
smallpond/io/filesystem.py:26
↓ 13 callersMethod__str__
(self)
smallpond/logical/node.py:251
↓ 13 callersMethodload_partitioned_datasets
Split the dataset into a list of partitioned datasets.
smallpond/logical/dataset.py:918
↓ 12 callersMethodgeneric_visit
This visitor calls visit() on all children of the node.
smallpond/logical/node.py:2038
↓ 12 callersFunctionget_nth_partition
(items: List[V], n: int, npartitions: int)
smallpond/common.py:95
↓ 11 callersFunctiondump
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 callersMethodinject_fault
(self)
smallpond/execution/task.py:866
↓ 11 callersMethodrepartition
Repartition the data into the given number of partitions. Parameters ---------- npartitions The dataset
smallpond/dataframe.py:321
↓ 11 callersMethodvisit
(self, node: Node, depth: int = 0)
smallpond/logical/planner.py:114
↓ 10 callersMethod_load_parquet_files
( self, paths, filesystem: fsspec.AbstractFileSystem = None )
tests/test_fabric.py:267
↓ 10 callersMethodclear
(self)
smallpond/utility.py:145
↓ 10 callersMethodcreate_task
( self, runtime_ctx: RuntimeContext, input_deps: List[Task], partition_infos:
smallpond/logical/node.py:274
↓ 10 callersMethodfrom_arrow
Create a DataFrame from a pyarrow Table.
smallpond/dataframe.py:93
↓ 10 callersMethodpush
(self, item: WorkItem, buffering=False)
smallpond/execution/workqueue.py:250
↓ 9 callersFunctionload_from_parquet_files
( paths_or_ranges: Union[List[str], List[RowRange]], columns: List[str] = None, max_workers: int =
smallpond/io/arrow.py:307
↓ 9 callersMethodrun
The entry point for executor and scheduler of `plan`.
smallpond/execution/driver.py:319
↓ 9 callersFunctionsplit_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 callersMethod__str__
(self)
smallpond/execution/task.py:652
↓ 8 callersMethodexec
(self, cq: Optional["WorkQueue"] = None)
smallpond/execution/workqueue.py:166
↓ 8 callersMethodexec_query
( self, conn: duckdb.DuckDBPyConnection, query_statement: str, enable_profilin
smallpond/execution/task.py:1292
↓ 8 callersMethodparse_arguments
(self, args=None)
smallpond/execution/driver.py:280
↓ 8 callersMethodpop
(self, count=1)
smallpond/execution/workqueue.py:241
↓ 8 callersFunctionround_up
(x, align_size=MB)
smallpond/common.py:116
↓ 8 callersMethodsuccess
(self)
smallpond/execution/scheduler.py:451
↓ 8 callersMethodto_arrow_table
( self, max_workers=16, filesystem: fsspec.AbstractFileSystem = None, conn: du
smallpond/logical/dataset.py:763
↓ 8 callersMethodtry_enqueue
(self, tasks: Union[Iterable[Task], Task])
smallpond/execution/scheduler.py:1079
↓ 8 callersMethodwrite
(self, buffer)
smallpond/execution/task.py:440
↓ 7 callersMethod__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 callersMethod_compute
Compute the data and return the datasets.
smallpond/dataframe.py:278
↓ 7 callersFunctioncast_columns_to_large_string
(table: arrow.Table)
smallpond/io/arrow.py:138
↓ 7 callersFunctiondump_to_parquet_files
( table: arrow.Table, output_dir: str, filename: str = "data", compression="ZSTD", compres
smallpond/io/arrow.py:357
↓ 7 callersMethodget_latest_sched_state
(self)
tests/test_fabric.py:110
↓ 7 callersFunctionload
Load an object from a file.
smallpond/io/filesystem.py:128
↓ 7 callersMethodtake_all
Return all rows. This operation will trigger execution of the lazy transformations performed on this DataFrame.
smallpond/dataframe.py:682
↓ 6 callersMethodcount
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 callersMethodprocess_func
(_runtime_ctx, tables: List[arrow.Table])
smallpond/dataframe.py:452
↓ 6 callersMethodpush
(self, item: WorkItem, buffering=False)
smallpond/execution/scheduler.py:220
↓ 6 callersMethodrun
(self)
smallpond/execution/task.py:916
↓ 6 callersMethodshutdown
Shutdown the session.
smallpond/dataframe.py:152
↓ 6 callersMethodsql_query_fragment
Return a sql fragment that represents the dataset.
smallpond/logical/dataset.py:255
↓ 6 callersMethodterminate
(self)
smallpond/execution/executor.py:31
↓ 6 callersMethodto_duckdb_type
(self)
smallpond/logical/udf.py:45
↓ 6 callersMethodwait
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 callersMethod__init__
( self, key: str, cpu_limit: int = None, gpu_limit: float = None, memo
smallpond/execution/workqueue.py:49
↓ 5 callersFunctionclamp_row_group_bytes
( val, minval=DEFAULT_ROW_GROUP_BYTES, maxval=MAX_ROW_GROUP_BYTES )
smallpond/common.py:44
↓ 5 callersMethodcreate_exec_plan
( self, logical_plan: LogicalPlan, manifest_only_final_results=True )
smallpond/logical/planner.py:17
↓ 5 callersMethodfrom_pandas
Create a DataFrame from a pandas DataFrame.
smallpond/dataframe.py:86
↓ 5 callersMethodlog_overall_progress
(self)
smallpond/execution/scheduler.py:968
↓ 5 callersMethodpop
(self)
smallpond/execution/scheduler.py:193
↓ 5 callersMethodprepare_connection
(self, conn: duckdb.DuckDBPyConnection)
smallpond/execution/task.py:1250
↓ 5 callersMethodreset
Reset the dataset with new paths, root_dir, and recursive flag.
smallpond/logical/dataset.py:133
↓ 5 callersMethodstart
(self)
smallpond/execution/executor.py:28
↓ 5 callersMethodto_batch_reader
Return an arrow record batch reader to read the dataset. Parameters ---------- batch_size, optional The
smallpond/logical/dataset.py:307
↓ 4 callersMethodbroadcast_input_deps
(self, node: Node, depth: int)
smallpond/logical/planner.py:262
↓ 4 callersFunctionbuild_batch_reader_from_files
( paths_or_ranges: Union[List[str], List[RowRange]], *, columns: Optional[List[str]] = None, b
smallpond/io/arrow.py:197
↓ 4 callersMethodclean_complex_attrs
(self)
smallpond/execution/task.py:1030
↓ 4 callersMethodcpu_count
(self)
smallpond/execution/scheduler.py:139
↓ 4 callersMethodcreate_random_sleep_plan
( self, npartitions, max_sleep_secs, fail_first_try=False )
tests/test_scheduler.py:70
↓ 4 callersMethodget_driver_arguments
(self, to_dict=True)
smallpond/execution/driver.py:299
↓ 4 callersMethodget_local_gpus
(self)
smallpond/execution/task.py:300
↓ 4 callersMethodlog
Log the dataset to the logger.
smallpond/logical/dataset.py:265
↓ 4 callersMethodmerge
Merge multiple datasets into a single dataset.
smallpond/logical/dataset.py:127
↓ 4 callersMethodparquet_kv_metadata_bytes
(self, extra_partitions: List[PartitionInfo] = None)
smallpond/execution/task.py:697
↓ 4 callersMethodparquet_kv_metadata_str
(self, extra_partitions: List[PartitionInfo] = None)
smallpond/execution/task.py:680
↓ 4 callersMethodpartial_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 callersMethodpartition_by_files
Evenly split into `npartition` datasets by files.
smallpond/logical/dataset.py:343
↓ 4 callersFunctionpytest_running
()
smallpond/common.py:32
↓ 4 callersMethodread_csv
Create a DataFrame from CSV files.
smallpond/dataframe.py:38
↓ 4 callersMethodready
(self)
smallpond/execution/executor.py:44
↓ 4 callersMethodrun
(self)
tests/test_workqueue.py:25
↓ 4 callersFunctionsize_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 callersFunctionsort_mock_urls
( input_paths, npartitions: int, engine_type="duckdb", external_output_path: Optional[str] = N
examples/sort_mock_urls.py:30
↓ 4 callersMethodto_pandas
Convert the dataset to a pandas dataframe.
smallpond/logical/dataset.py:277
↓ 4 callersMethodwrite_table
(writer: parquet.ParquetWriter, table: arrow.Table)
smallpond/execution/task.py:2353
↓ 3 callersMethod__init__
(self, ctx: Context, input_deps: Tuple[Node, ...], msg: str)
tests/test_execution.py:104
↓ 3 callersMethod_get_entries
(self, path=None)
smallpond/execution/workqueue.py:304
↓ 3 callersMethodadd_state_observer
(self, observer: StateObserver)
smallpond/execution/scheduler.py:964
↓ 3 callersMethodcleanup
(self)
smallpond/execution/task.py:1024
↓ 3 callersMethodclear_cached_executor_lists
(self)
smallpond/execution/scheduler.py:568
↓ 3 callersMethodcollect_finished_works
(self)
smallpond/execution/executor.py:281
↓ 3 callersMethodcompute
Compute the data. This operation will trigger execution of the lazy transformations performed on this DataFrame.
smallpond/dataframe.py:270
↓ 3 callersMethodcreate
(ctx: RuntimeContext, id: str)
smallpond/execution/executor.py:126
↓ 3 callersMethodcreate_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 callersMethodcreate_input_views
( self, conn: duckdb.DuckDBPyConnection, input_datasets: List[DataSet], filesy
smallpond/execution/task.py:1275
↓ 3 callersMethodcreate_merge_task
( self, runtime_ctx: RuntimeContext, input_deps: List[Task], partition_infos:
smallpond/logical/node.py:1989
↓ 3 callersMethoddump
(self)
smallpond/execution/task.py:1072
next →1–100 of 992, ranked by callers