diff --git a/.github/workflows/ci-pytorch-test-conda.yml b/.github/workflows/ci-pytorch-test-conda.yml index 3498f087ef..a0ec35973b 100644 --- a/.github/workflows/ci-pytorch-test-conda.yml +++ b/.github/workflows/ci-pytorch-test-conda.yml @@ -27,7 +27,7 @@ jobs: - {python-version: "3.8", pytorch-version: "1.10"} - {python-version: "3.9", pytorch-version: "1.11"} - {python-version: "3.9", pytorch-version: "1.12"} - timeout-minutes: 30 + timeout-minutes: 40 steps: - name: Workaround for https://github.com/actions/checkout/issues/760 diff --git a/src/pytorch_lightning/serve/servable_module_validator.py b/src/pytorch_lightning/serve/servable_module_validator.py index ddee2a729a..305e520e42 100644 --- a/src/pytorch_lightning/serve/servable_module_validator.py +++ b/src/pytorch_lightning/serve/servable_module_validator.py @@ -47,7 +47,7 @@ class ServableModuleValidator(Callback): server: Literal["fastapi", "ml_server", "torchserve", "sagemaker"] = "fastapi", host: str = "127.0.0.1", port: int = 8080, - timeout: int = 10, + timeout: int = 20, exit_on_failure: bool = True, ): super().__init__() @@ -109,7 +109,8 @@ class ServableModuleValidator(Callback): except requests.exceptions.ConnectionError: pass if time.time() - t0 > self.timeout: - raise Exception(f"The Server didn't start in {self.timeout}") + process.kill() + raise Exception(f"The server didn't start within {self.timeout} seconds.") time.sleep(0.1) payload = servable_module.configure_payload()