ray.data.datasource.FileExtensionFilter#

class ray.data.datasource.FileExtensionFilter(file_extensions: Union[str, List[str]], allow_if_no_extension: bool = False)[source]#

Bases: ray.data.datasource.partitioning.PathPartitionFilter

A file-extension-based path filter that filters files that don’t end with the provided extension(s).

file_extensions#

File extension(s) of files to be included in reading.

allow_if_no_extension#

If this is True, files without any extensions will be included in reading.

PublicAPI (beta): This API is in beta and may change before becoming stable.

Methods

of

Creates a path-based partition filter using a flattened argument list.

Attributes

parser

Returns the path partition parser for this filter.