(Experimental) RandomAccessDataset API

class ray.data.random_access_dataset.RandomAccessDataset(dataset: Dataset[T], key: str, num_workers: int)[source]

A class that provides distributed, random access to a Dataset.

See: Dataset.to_random_access_dataset().

PublicAPI (beta): This API is in beta and may change before becoming stable.

get_async(key: Any) ray.types.ObjectRef[Optional[ray.data.block.T]][source]

Asynchronously finds the record for a single key.

Parameters

key – The key of the record to find.

Returns

ObjectRef containing the record (in pydict form), or None if not found.

multiget(keys: List[Any]) List[Optional[ray.data.block.T]][source]

Synchronously find the records for a list of keys.

Parameters

keys – List of keys to find the records for.

Returns

List of found records (in pydict form), or None for missing records.

stats() str[source]

Returns a string containing access timing information.