gluonts.dataset.loader module

class gluonts.dataset.loader.DataLoader(data_iterable: Iterable[Dict[str, Any]], *, batch_size: int, stack_fn: Callable, num_workers: Optional[int] = None, num_prefetch: Optional[int] = None, decode_fn: Callable = <function DataLoader.<lambda>>)[source]

Bases: typing.Iterable

gluonts.dataset.loader.InferenceDataLoader(dataset: Iterable[Dict[str, Any]], *, transform: gluonts.transform._base.Transformation, batch_size: int, stack_fn: Callable, num_workers: Optional[int] = None, num_prefetch: Optional[int] = None, shuffle_buffer_length: Optional[int] = None, decode_fn: Callable = <function <lambda>>)[source]
class gluonts.dataset.loader.MultiProcessBatcher(dataset: Iterable[Dict[str, Any]], batch_size: int, stack_fn: Callable, num_workers: int, max_queue_size: Optional[int] = None, decode_fn: Callable = <function MultiProcessBatcher.<lambda>>)[source]

Bases: typing.Iterator

static worker_fn(worker_id: int, num_workers: int, dataset, batch_size: int, stack_fn: Callable, batch_queue: multiprocessing.context.BaseContext.Queue, terminate_event, exhausted_event)[source]
gluonts.dataset.loader.TrainDataLoader(dataset: Iterable[Dict[str, Any]], *, transform: gluonts.transform._base.Transformation, batch_size: int, stack_fn: Callable, num_batches_per_epoch: Optional[int] = None, num_workers: Optional[int] = None, num_prefetch: Optional[int] = None, shuffle_buffer_length: Optional[int] = None, decode_fn: Callable = <function <lambda>>)[source]
gluonts.dataset.loader.ValidationDataLoader(dataset: Iterable[Dict[str, Any]], *, transform: gluonts.transform._base.Transformation, batch_size: int, stack_fn: Callable, num_workers: Optional[int] = None, num_prefetch: Optional[int] = None, shuffle_buffer_length: Optional[int] = None, decode_fn: Callable = <function <lambda>>)[source]
gluonts.dataset.loader.win32_guard(num_workers: Optional[int]) → Optional[int][source]