diff --git a/llmfoundry/utils/exceptions.py b/llmfoundry/utils/exceptions.py index 85f43f7fd1..76e8e719f5 100644 --- a/llmfoundry/utils/exceptions.py +++ b/llmfoundry/utils/exceptions.py @@ -361,9 +361,13 @@ def __init__(self, timeout: int) -> None: class DatasetMissingFileError(UserError): """Error thrown when a dataset cannot find a file.""" - def __init__(self, file_name: str, supported_extensions: Optional[List[str]]) -> None: + def __init__( + self, + file_name: str, + supported_extensions: Optional[List[str]] = None, + ) -> None: message = "Could not find the file '{file_name}' with any of the supported extensions: " - if supported_extensions is not None: + if supported_extensions is not None: message += ', '.join(supported_extensions) + '.' message += ' Please check your train / eval data and try again.' super().__init__(message, file_name=file_name)