Skip to content

Commit

Permalink
Set timeout default to None (#10487)
Browse files Browse the repository at this point in the history
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
  • Loading branch information
harupy committed Nov 22, 2023
1 parent fdb2779 commit 8ca8429
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions mlflow/deployments/databricks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def _call_endpoint(
prefix: str = "/api/2.0",
route: Optional[str] = None,
json_body: Optional[Dict[str, Any]] = None,
timeout: int = MLFLOW_HTTP_REQUEST_TIMEOUT.get(),
timeout: Optional[int] = None,
):
call_kwargs = {}
if method.lower() == "get":
Expand All @@ -82,7 +82,7 @@ def _call_endpoint(
host_creds=get_databricks_host_creds(self.target_uri),
endpoint=posixpath.join(prefix, "serving-endpoints", route or ""),
method=method,
timeout=timeout,
timeout=MLFLOW_HTTP_REQUEST_TIMEOUT.get() if timeout is None else timeout,
raise_on_status=False,
retry_codes=MLFLOW_DEPLOYMENT_CLIENT_REQUEST_RETRY_CODES,
**call_kwargs,
Expand Down
4 changes: 2 additions & 2 deletions mlflow/deployments/mlflow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def _call_endpoint(
method: str,
route: str,
json_body: Optional[str] = None,
timeout: int = MLFLOW_HTTP_REQUEST_TIMEOUT.get(),
timeout: Optional[int] = None,
):
call_kwargs = {}
if method.lower() == "get":
Expand All @@ -105,7 +105,7 @@ def _call_endpoint(
host_creds=_get_default_host_creds(self.target_uri),
endpoint=route,
method=method,
timeout=timeout,
timeout=MLFLOW_HTTP_REQUEST_TIMEOUT.get() if timeout is None else timeout,
retry_codes=MLFLOW_DEPLOYMENT_CLIENT_REQUEST_RETRY_CODES,
raise_on_status=False,
**call_kwargs,
Expand Down

0 comments on commit 8ca8429

Please sign in to comment.