Skip to content

Commit

Permalink
Merge pull request #8 from RafiKurlansik/dev/max_depth
Browse files Browse the repository at this point in the history
Lowering MD
  • Loading branch information
RafiKurlansik authored Oct 24, 2022
2 parents ac3c79c + 1d34954 commit f21204e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion conf/pipeline_configs/model_train.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pipeline_params:

model_params:
n_estimators: 100
max_depth: 18
max_depth: 16
min_samples_leaf: 1
max_features: 'auto'
random_state: 42
20 changes: 20 additions & 0 deletions telco_churn/utils/mlflow_registry_utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Helper functions
import mlflow
from mlflow.utils.rest_utils import http_request
import json

def mlflow_call_endpoint(endpoint, method, body='{}'):
def client():
mlflow.tracking.client.MlflowClient()

host_creds = client()._tracking_client.store.get_host_creds()
host = host_creds.host
token = host_creds.token

if method == 'GET':
response = http_request(
host_creds=host_creds, endpoint="/api/2.0/mlflow/{}".format(endpoint), method=method, params=json.loads(body))
else:
response = http_request(
host_creds=host_creds, endpoint="/api/2.0/mlflow/{}".format(endpoint), method=method, json=json.loads(body))
return response.json()

0 comments on commit f21204e

Please sign in to comment.