MCPcopy Index your code
hub / github.com/ray-project/ray / materialize

Method materialize

python/ray/data/iterator.py:1227–1245  ·  view source on GitHub ↗

Execute and materialize this data iterator into object store memory. .. note:: This method triggers the execution and materializes all blocks of the iterator, returning its contents as a :class:`~ray.data.dataset.MaterializedDataset` for further processin

(self)

Source from the content-addressed store, hash-verified

1225
1226 @PublicAPI
1227 def materialize(self) -> "MaterializedDataset":
1228 """Execute and materialize this data iterator into object store memory.
1229
1230 .. note::
1231 This method triggers the execution and materializes all blocks
1232 of the iterator, returning its contents as a
1233 :class:`~ray.data.dataset.MaterializedDataset` for further processing.
1234 """
1235
1236 from ray.data.dataset import MaterializedDataset
1237
1238 ref_bundles_iter, stats, _, _ = self._to_ref_bundle_iterator()
1239 ref_bundles = list(ref_bundles_iter)
1240 context = self.get_context()
1241 logical_plan = LogicalPlan(
1242 InputData(input_data=ref_bundles),
1243 context,
1244 )
1245 return MaterializedDataset(logical_plan, context, stats)
1246
1247
1248# Backwards compatibility alias.

Callers

nothing calls this directly

Calls 6

get_contextMethod · 0.95
LogicalPlanClass · 0.90
InputDataClass · 0.90
MaterializedDatasetClass · 0.90
listFunction · 0.85

Tested by

no test coverage detected