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)
| 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. |
nothing calls this directly
no test coverage detected