From 9adca244807151fa49fbaeb319535c6fb066d72e Mon Sep 17 00:00:00 2001 From: Albert Villanova del Moral <8515462+albertvillanova@users.noreply.github.com> Date: Mon, 23 Dec 2024 17:44:07 +0100 Subject: [PATCH] Delete endpoint on InferenceEndpointTimeoutError --- src/lighteval/models/endpoints/endpoint_model.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lighteval/models/endpoints/endpoint_model.py b/src/lighteval/models/endpoints/endpoint_model.py index 80798b61..5bc5da3b 100644 --- a/src/lighteval/models/endpoints/endpoint_model.py +++ b/src/lighteval/models/endpoints/endpoint_model.py @@ -257,6 +257,7 @@ def __init__( # noqa: C901 logger.error( "Endpoint did not start within 30 minutes, there was a timeout. Please inspect the logs." ) + self.cleanup() raise e except HfHubHTTPError as e: # The endpoint actually already exists, we'll spin it up instead of trying to create a new one