forked from ray-project/ray
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Data] Move default metadata providers to separate file (ray-project#…
…38031) This PR consolidates the default metadata providers in a single constants file to improve maintainability.
- Loading branch information
1 parent
5fac9f7
commit 6263634
Showing
2 changed files
with
39 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from ray.data.datasource import ( | ||
DefaultFileMetadataProvider, | ||
DefaultParquetMetadataProvider, | ||
FastFileMetadataProvider, | ||
) | ||
from ray.data.datasource.image_datasource import _ImageFileMetadataProvider | ||
|
||
# Used by `read_parquet` | ||
DEFAULT_PARQUET_METADATA_PROVIDER = DefaultParquetMetadataProvider() | ||
# Used by `read_images` | ||
DEFAULT_IMAGE_METADATA_PROVIDER = _ImageFileMetadataProvider() | ||
# Used by `read_parquet_bulk` | ||
DEFAULT_BULK_PARQUET_METADATA_PROVIDER = FastFileMetadataProvider() | ||
# Used by all other file-based `read_*` APIs | ||
DEFAULT_GENERIC_METADATA_PROVIDER = DefaultFileMetadataProvider() | ||
|
||
|
||
__all__ = [ | ||
"DEFAULT_PARQUET_METADATA_PROVIDER", | ||
"DEFAULT_IMAGE_METADATA_PROVIDER", | ||
"DEFAULT_BULK_PARQUET_METADATA_PROVIDER", | ||
"DEFAULT_GENERIC_METADATA_PROVIDER", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters