aistore.pytorch.base_map_dataset

View as Markdown

Base class for AIS Map Style Datasets

Copyright (c) 2024-2025, NVIDIA CORPORATION. All rights reserved.

Module Contents

Classes

NameDescription
AISBaseMapDatasetA base class for creating map-style AIS Datasets. Should not be instantiated directly. Subclasses

API

class aistore.pytorch.base_map_dataset.AISBaseMapDataset(
ais_source_list: typing.Union[aistore.sdk.AISSource, typing.List[aistore.sdk.AISSource]],
prefix_map: typing.Dict[aistore.sdk.AISSource, typing.Union[str, typing.List[str]]] = {}
)
Abstract

Bases: Dataset

A base class for creating map-style AIS Datasets. Should not be instantiated directly. Subclasses should implement :meth:__getitem__ which fetches a samples given a key from the dataset and can optionally override other methods from torch Dataset such as :meth:__len__ and :meth:__getitems__.

Parameters:

ais_source_list
Union[AISSource, List[AISSource]]

Single or list of AISSource objects to load data

prefix_map
Dict(AISSource, List[str])Defaults to {}

Map of AISSource objects to list of prefixes that only allows

_ais_source_list
_obj_list
= self._create_objects_list()
aistore.pytorch.base_map_dataset.AISBaseMapDataset.__getitem__(
index
)
abstract
aistore.pytorch.base_map_dataset.AISBaseMapDataset.__getitems__(
indices: typing.List[int]
)
aistore.pytorch.base_map_dataset.AISBaseMapDataset._create_objects_list() -> typing.List[aistore.sdk.Object]

Create a list of all the objects in the given URLs and AIS sources.

Returns: List[Object]

List[Object]: List of all the objects in the given URLs and AIS sources

aistore.pytorch.base_map_dataset.AISBaseMapDataset.get_obj_list() -> typing.List[aistore.sdk.Object]

Getter for internal object data list.

Returns: List[Object]

List[Object]: Object data of the dataset