ts_benchmark.data.suites package

ts_benchmark.data.suites.global_storage module

Functions

sync_data(env)

Sets the global data pool for the worker and synchronizes data from the global storage

Classes

GlobalStorageDataPool(storage)

A simple DataPool that retrieves all data from the globals storage at once

GlobalStorageDataServer(data_src, backend)

A fake data server that share all available data at once

class GlobalStorageDataPool(storage: SharedStorage)[source]

Bases: DataPoolImpl

A simple DataPool that retrieves all data from the globals storage at once

get_series(name: str) pandas.DataFrame | None[source]

Gets the time series from the global storage

NOTE the data in the global storage is considered READ-ONLY, DO NOT perform inplace operations on the return value.

Parameters:

name – The name of the series to get.

Returns:

A time series in DataFrame format.

get_series_meta_info(name: str) pandas.Series | None[source]

Gets the time series meta-info from the global storage

NOTE the data in the global storage is considered READ-ONLY, DO NOT perform inplace operations on the return value.

Parameters:

name – The name of the series to get.

Returns:

The meta-info of a time series in Series format.

sync_data() NoReturn[source]

Synchronizes data from the global storage

class GlobalStorageDataServer(data_src: DataSource, backend: ParallelBackend)[source]

Bases: DataServer

A fake data server that share all available data at once

Users must ensure all target data are loaded in the data source before starting this server.

start_async() NoReturn[source]

make the current data shareable across multiple workers (if exists)

sync_data(env: Dict) NoReturn[source]

Sets the global data pool for the worker and synchronizes data from the global storage

Parameters:

env – The environment dictionary of the parallel backend, which contains the handle to the global storage.