Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import mlflow
from mlflow import projects
token = dbutils.notebook.entry_point.getDbutils().notebook().getContext().apiToken().get()
dbutils.fs.put("file:///root/.databrickscfg","[DEFAULT]\nhost=https://<>.cloud.databricks.com\ntoken = "+token,overwrite=True)
params = {'learning_rate': 0.0001,'batch_size': 512}
ml_project_uri = "https://github.com/priyanlc/NewYorkTaxiPredictMLflow.git"
print(f"Running with param = {params}")
res_sub = projects.run(ml_project_uri, parameters=params)
print(f"status={res_sub.get_status()}")
print(f"run_id={res_sub.run_id}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.