Skip to content

Commit

Permalink
Mark deployment clients as experimental (#10468)
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 21, 2023
1 parent ac98a64 commit 12f2279
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions mlflow/deployments/databricks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
)
from mlflow.environment_variables import MLFLOW_HTTP_REQUEST_TIMEOUT
from mlflow.utils import AttrDict
from mlflow.utils.annotations import experimental
from mlflow.utils.databricks_utils import get_databricks_host_creds
from mlflow.utils.rest_utils import augmented_raise_for_status, http_request

Expand All @@ -16,6 +17,7 @@ class DatabricksEndpoint(AttrDict):
pass


@experimental
class DatabricksDeploymentClient(BaseDeploymentClient):
"""
TODO
Expand Down Expand Up @@ -88,6 +90,7 @@ def _call_endpoint(
augmented_raise_for_status(response)
return DatabricksEndpoint(response.json())

@experimental
def predict(self, deployment_name=None, inputs=None, endpoint=None):
"""
TODO
Expand All @@ -100,6 +103,7 @@ def predict(self, deployment_name=None, inputs=None, endpoint=None):
timeout=MLFLOW_DEPLOYMENT_PREDICT_TIMEOUT.get(),
)

@experimental
def create_endpoint(self, name, config=None):
"""
TODO
Expand All @@ -112,6 +116,7 @@ def create_endpoint(self, name, config=None):
payload = {"name": name, "config": config, **extras}
return self._call_endpoint(method="POST", json_body=payload)

@experimental
def update_endpoint(self, endpoint, config=None):
"""
TODO
Expand All @@ -120,18 +125,21 @@ def update_endpoint(self, endpoint, config=None):
method="PUT", route=posixpath.join(endpoint, "config"), json_body=config
)

@experimental
def delete_endpoint(self, endpoint):
"""
TODO
"""
return self._call_endpoint(method="DELETE", route=endpoint)

@experimental
def list_endpoints(self):
"""
TODO
"""
return self._call_endpoint(method="GET").endpoints

@experimental
def get_endpoint(self, endpoint):
"""
TODO
Expand Down
5 changes: 5 additions & 0 deletions mlflow/deployments/mlflow/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from mlflow.deployments import BaseDeploymentClient
from mlflow.utils.annotations import experimental


@experimental
class MLflowDeploymentClient(BaseDeploymentClient):
"""
TODO
Expand Down Expand Up @@ -61,18 +63,21 @@ def delete_endpoint(self, endpoint):
"""
raise NotImplementedError

@experimental
def predict(self, deployment_name=None, inputs=None, endpoint=None):
"""
TODO
"""
raise NotImplementedError("TODO")

@experimental
def list_endpoints(self):
"""
TODO
"""
raise NotImplementedError("TODO")

@experimental
def get_endpoint(self, endpoint):
"""
TODO
Expand Down

0 comments on commit 12f2279

Please sign in to comment.