vllm.transformers_utils.s3_utils ¶
_filter_allow ¶
_filter_ignore ¶
glob ¶
List full file names from S3 path and filter by allow pattern.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
s3 | S3 client to use. | None | |
path | str | The S3 path to list from. | '' |
allow_pattern | Optional[list[str]] | A list of patterns of which files to pull. | None |
Returns:
Type | Description |
---|---|
list[str] | list[str]: List of full S3 paths allowed by the pattern |
Source code in vllm/transformers_utils/s3_utils.py
list_files ¶
list_files(
s3,
path: str,
allow_pattern: Optional[list[str]] = None,
ignore_pattern: Optional[list[str]] = None,
) -> tuple[str, str, list[str]]
List files from S3 path and filter by pattern.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
s3 | S3 client to use. | required | |
path | str | The S3 path to list from. | required |
allow_pattern | Optional[list[str]] | A list of patterns of which files to pull. | None |
ignore_pattern | Optional[list[str]] | A list of patterns of which files not to pull. | None |
Returns:
Type | Description |
---|---|
tuple[str, str, list[str]] | tuple[str, str, list[str]]: A tuple where: - The first element is the bucket name - The second element is string represent the bucket and the prefix as a dir like string - The third element is a list of files allowed or disallowed by pattern |