From be45a0b4e5291ad3d91e616eab86632cb31b8226 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20de=20la=20R=C3=BAa=20Mart=C3=ADnez?= Date: Thu, 14 Nov 2024 10:36:29 -0500 Subject: [PATCH] [HWORKS-1805] Increase timeouts for starting/stopping deployments (#399) --- python/hsml/deployment.py | 6 +++--- python/tests/test_deployment.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/python/hsml/deployment.py b/python/hsml/deployment.py index f6c064759..f23eec2ed 100644 --- a/python/hsml/deployment.py +++ b/python/hsml/deployment.py @@ -67,7 +67,7 @@ def __init__( self._model_registry_id = None @usage.method_logger - def save(self, await_update: Optional[int] = 60): + def save(self, await_update: Optional[int] = 120): """Persist this deployment including the predictor and metadata to Model Serving. # Arguments @@ -79,7 +79,7 @@ def save(self, await_update: Optional[int] = 60): self._serving_engine.save(self, await_update) @usage.method_logger - def start(self, await_running: Optional[int] = 60): + def start(self, await_running: Optional[int] = 120): """Start the deployment # Arguments @@ -91,7 +91,7 @@ def start(self, await_running: Optional[int] = 60): self._serving_engine.start(self, await_status=await_running) @usage.method_logger - def stop(self, await_stopped: Optional[int] = 60): + def stop(self, await_stopped: Optional[int] = 120): """Stop the deployment # Arguments diff --git a/python/tests/test_deployment.py b/python/tests/test_deployment.py index 63e791126..88cffe9fb 100644 --- a/python/tests/test_deployment.py +++ b/python/tests/test_deployment.py @@ -145,7 +145,7 @@ def test_save_default(self, mocker, backend_fixtures): d.save() # Assert - mock_serving_engine_save.assert_called_once_with(d, 60) + mock_serving_engine_save.assert_called_once_with(d, 120) def test_save(self, mocker, backend_fixtures): # Arrange @@ -176,7 +176,7 @@ def test_start_default(self, mocker, backend_fixtures): d.start() # Assert - mock_serving_engine_start.assert_called_once_with(d, await_status=60) + mock_serving_engine_start.assert_called_once_with(d, await_status=120) def test_start(self, mocker, backend_fixtures): # Arrange @@ -207,7 +207,7 @@ def test_stop_default(self, mocker, backend_fixtures): d.stop() # Assert - mock_serving_engine_stop.assert_called_once_with(d, await_status=60) + mock_serving_engine_stop.assert_called_once_with(d, await_status=120) def test_stop(self, mocker, backend_fixtures): # Arrange