MCPcopy Create free account
hub / github.com/feast-dev/feast / read_text

Method read_text

sdk/python/feast/infra/ray_initializer.py:446–458  ·  view source on GitHub ↗

Read plain-text files - dispatched via @ray.remote to cluster workers.

(self, path: Union[str, List[str]], **kwargs)

Source from the content-addressed store, hash-verified

444 return RemoteDatasetProxy(remote_fn.remote(path, kwargs))
445
446 def read_text(self, path: Union[str, List[str]], **kwargs) -> Any:
447 """Read plain-text files - dispatched via @ray.remote to cluster workers."""
448 from feast.infra.ray_shared_utils import RemoteDatasetProxy
449
450 @ray.remote
451 def _remote(file_path, read_kwargs):
452 import ray
453
454 return ray.data.read_text(file_path, **read_kwargs)
455
456 opts = self._get_task_options()
457 remote_fn = _remote.options(**opts) if opts else _remote
458 return RemoteDatasetProxy(remote_fn.remote(path, kwargs))
459
460 def read_images(self, path: Union[str, List[str]], **kwargs) -> Any:
461 """Read image directory - dispatched via @ray.remote to cluster workers."""

Callers

nothing calls this directly

Calls 2

_get_task_optionsMethod · 0.95
RemoteDatasetProxyClass · 0.90

Tested by

no test coverage detected