diff --git a/llmfoundry/utils/exceptions.py b/llmfoundry/utils/exceptions.py index 98ea2ebf74..85f43f7fd1 100644 --- a/llmfoundry/utils/exceptions.py +++ b/llmfoundry/utils/exceptions.py @@ -361,9 +361,10 @@ 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: List[str]) -> None: + def __init__(self, file_name: str, supported_extensions: Optional[List[str]]) -> None: message = "Could not find the file '{file_name}' with any of the supported extensions: " - message += ', '.join(supported_extensions) + '.' + 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)