Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

setup_mlflow.py 1.2 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  1. import mlflow
  2. ## Construct AzureML MLFLOW TRACKING URI
  3. # def get_azureml_mlflow_tracking_uri(region, subscription_id, resource_group, workspace):
  4. # return "azureml://{}.api.azureml.ms/mlflow/v1.0/subscriptions/{}/resourceGroups/{}/providers/Microsoft.MachineLearningServices/workspaces/{}".format(region, subscription_id, resource_group, workspace)
  5. # region='westeurope' ## example: westus
  6. # subscription_id = '477be13e-1a7f-40f3-8572-8d64baa56411' ## example: 11111111-1111-1111-1111-111111111111
  7. # resource_group = 'rg_0' ## example: myresourcegroup
  8. # workspace = 'ws_0' ## example: myworkspacename
  9. # MLFLOW_TRACKING_URI = get_azureml_mlflow_tracking_uri(region, subscription_id, resource_group, workspace)
  10. MLFLOW_TRACKING_URI = "https://dagshub.com/lsiksous/mauviette.mlflow"
  11. MLFLOW_TRACKING_USERNAME = 'lsiksous'
  12. MLFLOW_TRACKING_PASSWORD = "00bbcc9a272c4647eacede7c17781cef796ce172"
  13. ## Set the MLFLOW TRACKING URI
  14. mlflow.set_tracking_uri(MLFLOW_TRACKING_URI)
  15. ## Make sure the MLflow URI looks something like this:
  16. ## #azureml://<REGION>.api.azureml.ms/mlflow/v1.0/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/providers/Microsoft.MachineLearningServices/workspaces/<AML_WORKSPACE_NAME>
  17. print("MLFlow Tracking URI:", MLFLOW_TRACKING_URI)
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...