Skip to content

vllm.transformers_utils.s3_utils

Functions:

  • glob –

    List full file names from S3 path and filter by allow pattern.

  • list_files –

    List files from S3 path and filter by pattern.

glob(s3=None, path='', allow_pattern=None)

List full file names from S3 path and filter by allow pattern.

Parameters:

  • s3

    (BaseClient | None, default: None ) –

    S3 client to use.

  • path

    (str, default: '' ) –

    The S3 path to list from.

  • allow_pattern

    (list[str] | None, default: None ) –

    A list of patterns of which files to pull.

Returns:

  • list[str] –

    list[str]: List of full S3 paths allowed by the pattern

list_files(s3, path, allow_pattern=None, ignore_pattern=None)

List files from S3 path and filter by pattern.

Parameters:

  • s3

    (BaseClient) –

    S3 client to use.

  • path

    (str) –

    The S3 path to list from.

  • allow_pattern

    (list[str] | None, default: None ) –

    A list of patterns of which files to pull.

  • ignore_pattern

    (list[str] | None, default: None ) –

    A list of patterns of which files not to pull.

Returns:

  • 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