ray.data.Dataset.deserialize_lineage#

static Dataset.deserialize_lineage(serialized_ds: bytes) Dataset[source]#

Deserialize the provided lineage-serialized Dataset.

This assumes that the provided serialized bytes were serialized using Dataset.serialize_lineage().

Examples

import ray

ds = ray.data.read_csv("s3://anonymous@ray-example-data/iris.csv")
serialized_ds = ds.serialize_lineage()
ds = ray.data.Dataset.deserialize_lineage(serialized_ds)
print(ds)
Dataset(
   num_rows=?,
   schema={
      sepal length (cm): double,
      sepal width (cm): double,
      petal length (cm): double,
      petal width (cm): double,
      target: int64
   }
)
Parameters:

serialized_ds – The serialized Dataset that we wish to deserialize.

Returns:

A deserialized Dataset instance.

DeveloperAPI: This API may change across minor Ray releases.