Azure-Samples / azure-databricks-mlops-mlflow

Azure Databricks MLOps sample for Python based source code using MLflow without using MLflow Project.
MIT License
76 stars 49 forks source link

Fix make databricks-authenticate #49

Closed jjlangen closed 2 years ago

jjlangen commented 2 years ago

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ x ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

git clone https://github.com/Azure-Samples/azure-databricks-mlops-mlflow.git make databricks-authenticate

Any log messages given by the failure

$ make databricks-authenticate Authenticate Databricks CLI Follow https://docs.microsoft.com/en-us/azure/databricks/dev-tools/cli/ for getting Host and token value Taking Backup of .databrickscfg file in .env/databrickscfg Creating env script file for mlflow databricks configure --token Databricks Host (should begin with https://): https://adb-xxx.x.azuredatabricks.net Token: cp ~/.databrickscfg .env/.databrickscfg cp: cannot create regular file ‘.env/.databrickscfg’: No such file or directory make: *** [databricks-authenticate] Error 1

Expected/desired behavior

$ make databricks-authenticate Authenticate Databricks CLI Follow https://docs.microsoft.com/en-us/azure/databricks/dev-tools/cli/ for getting Host and token value Taking Backup of .databrickscfg file in .env/databrickscfg Creating env script file for mlflow databricks configure --token Databricks Host (should begin with https://): https://adb-xxx.x.azuredatabricks.net Token: mkdir .env cp ~/.databrickscfg .env/.databrickscfg DATABRICKS_HOST="$(cat ~/.databrickscfg | grep '^host' | cut -d' ' -f 3)"; \ DATABRICKS_TOKEN="$(cat ~/.databrickscfg | grep '^token' | cut -d' ' -f 3)"; \ echo "export MLFLOW_TRACKING_URI=databricks"> .env/.databricks_env.sh; \ echo "export DATABRICKS_HOST=$DATABRICKS_HOST" >> .env/.databricks_env.sh; \ echo "export DATABRICKS_TOKEN=$DATABRICKS_TOKEN" >> .env/.databricks_env.sh

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?) RHEL 7.9

Versions

Mention any other details that might be useful

It seems like the .env directory needs to be made. Adding a simple mkdir .env statement before the cp solves this


Thanks! We'll be in touch soon.

prabdeb commented 2 years ago

Thanks a lot @jjlangen we will get it fixed!

prabdeb commented 2 years ago

Fixed now!