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

Method read_json

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

Read JSON/JSONL files - dispatched via @ray.remote to cluster workers.

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

Source from the content-addressed store, hash-verified

430 return RemoteDatasetProxy(remote_fn.remote(path, kwargs))
431
432 def read_json(self, path: Union[str, List[str]], **kwargs) -> Any:
433 """Read JSON/JSONL files - dispatched via @ray.remote to cluster workers."""
434 from feast.infra.ray_shared_utils import RemoteDatasetProxy
435
436 @ray.remote
437 def _remote(file_path, read_kwargs):
438 import ray
439
440 return ray.data.read_json(file_path, **read_kwargs)
441
442 opts = self._get_task_options()
443 remote_fn = _remote.options(**opts) if opts else _remote
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."""

Callers

nothing calls this directly

Calls 2

_get_task_optionsMethod · 0.95
RemoteDatasetProxyClass · 0.90

Tested by

no test coverage detected