Skip to content
This repository has been archived by the owner on Apr 15, 2022. It is now read-only.

Commit

Permalink
DBAAS-2961: allow for mlmanager e-e test in testing mode (#27)
Browse files Browse the repository at this point in the history
* DBAAS-2961: allow for mlmanager e-e test in testing mode
* adding amrit as codeowner
  • Loading branch information
Epstein authored and edriggers committed Oct 24, 2019
1 parent 3d3b6bf commit a6e3032
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Global-Reviewers

#* @splicemachine/splice-cloudops
* @bklo94 @Ben-Epstein @edriggers @jhoule-splice @jramineni @njnygaard @patricksplice @splicemaahs @troysplice
* @bklo94 @Ben-Epstein @edriggers @jhoule-splice @jramineni @njnygaard @patricksplice @splicemaahs @troysplice @abaveja313
9 changes: 5 additions & 4 deletions splicemachine/ml/management.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
from requests.auth import HTTPBasicAuth


def get_pod_uri(pod, port, pod_count=0, testing=False):
def get_pod_uri(pod, port, pod_count=0, _testing=False):
"""
Get address of MLFlow Container for Kubernetes
"""

if testing:
if _testing:
return "http://{pod}:{port}".format(pod=pod, port=port) # mlflow docker container endpoint

try:
Expand Down Expand Up @@ -129,8 +129,9 @@ def __init__(self, splice_context, tracking_uri=None, _testing=False):
will be assumed as a file store. Defaults to
MLFlow DC/OS Pod
"""
self._testing = _testing
if not tracking_uri:
server_endpoint = get_pod_uri("mlflow", "5001", testing=_testing)
server_endpoint = get_pod_uri("mlflow", "5001", _testing=_testing)
else:
server_endpoint = tracking_uri

Expand Down Expand Up @@ -731,7 +732,7 @@ def _initiate_job(self, payload, endpoint):
" Please run manager.login_director(username, password)"
)
request = requests.post(
get_pod_uri('mlflow', 5003) + endpoint,
get_pod_uri('mlflow', 5003, _testing=self._testing) + endpoint,
auth=self._basic_auth,
json=payload,

Expand Down

0 comments on commit a6e3032

Please sign in to comment.