Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 213
Add support for experiments in direct deployment#3669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
c65ab0b69d0f48c6418069978371107ad816950f61402f820d1599e5cf0621defaac5ed152619314eaeae89752c340efaa32b3b26d1ec3a934d0aebb767f923ecaee2179f19ae0d9a93fea04ea2a8a63ef3ecb624eb302cfb4e095File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| update experiments.my_experiment | ||
| Plan: 0 to add, 1 to change, 0 to delete, 0 unchanged | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,198 @@ | ||
| === create the experiment | ||
| >>> export EXPERIMENT_ARTIFACT_LOCATION=s3://original-[UNIQUE_NAME] | ||
| >>> export EXPERIMENT_NAME_PREFIX=original | ||
| >>> envsubst | ||
| >>> [CLI] bundle plan | ||
| create experiments.my_experiment | ||
| Plan: 1 to add, 0 to change, 0 to delete, 0 unchanged | ||
| >>> [CLI] bundle deploy | ||
| Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/experiment-basic-[UNIQUE_NAME]/default/files... | ||
| Deploying resources... | ||
| Updating deployment state... | ||
| Deployment complete! | ||
| >>> [CLI] experiments get-experiment [NUMID] | ||
| { | ||
| "name": "/Users/[USERNAME]/original-[UNIQUE_NAME]", | ||
| "artifact_location": "s3://original-[UNIQUE_NAME]", | ||
| "tags": [ | ||
| { | ||
| "key": "k1", | ||
| "value": "v1" | ||
| }, | ||
| { | ||
| "key": "mlflow.ownerId", | ||
| "value": "[USERID]" | ||
| }, | ||
| { | ||
| "key": "mlflow.experiment.sourceName", | ||
| "value": "/Users/[USERNAME]/original-[UNIQUE_NAME]" | ||
| }, | ||
| { | ||
| "key": "mlflow.ownerId", | ||
| "value": "[USERID]" | ||
| }, | ||
| { | ||
| "key": "mlflow.ownerEmail", | ||
| "value": "[USERNAME]" | ||
| }, | ||
| { | ||
| "key": "mlflow.experimentType", | ||
| "value": "MLFLOW_EXPERIMENT" | ||
| } | ||
| ] | ||
| } | ||
| === update the name | ||
| >>> export EXPERIMENT_NAME_PREFIX=new-name | ||
| >>> envsubst | ||
| >>> [CLI] bundle plan | ||
| update experiments.my_experiment | ||
| Plan: 0 to add, 1 to change, 0 to delete, 0 unchanged | ||
| >>> [CLI] bundle deploy | ||
| Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/experiment-basic-[UNIQUE_NAME]/default/files... | ||
| Deploying resources... | ||
| Updating deployment state... | ||
| Deployment complete! | ||
| >>> [CLI] experiments get-experiment [NUMID] | ||
| { | ||
| "name": "/Users/[USERNAME]/new-name-[UNIQUE_NAME]", | ||
| "artifact_location": "s3://original-[UNIQUE_NAME]", | ||
| "tags": [ | ||
| { | ||
| "key": "k1", | ||
| "value": "v1" | ||
| }, | ||
| { | ||
| "key": "mlflow.ownerId", | ||
| "value": "[USERID]" | ||
| }, | ||
| { | ||
| "key": "mlflow.experiment.sourceName", | ||
| "value": "/Users/[USERNAME]/new-name-[UNIQUE_NAME]" | ||
| }, | ||
| { | ||
| "key": "mlflow.ownerId", | ||
| "value": "[USERID]" | ||
| }, | ||
| { | ||
| "key": "mlflow.ownerEmail", | ||
| "value": "[USERNAME]" | ||
| }, | ||
| { | ||
| "key": "mlflow.experimentType", | ||
| "value": "MLFLOW_EXPERIMENT" | ||
| } | ||
| ] | ||
| } | ||
| === updating the artifact location should cause a recreation | ||
| >>> export EXPERIMENT_ARTIFACT_LOCATION=s3://new-[UNIQUE_NAME] | ||
| >>> envsubst | ||
| >>> [CLI] bundle plan | ||
| recreate experiments.my_experiment | ||
| Plan: 1 to add, 0 to change, 1 to delete, 0 unchanged | ||
| >>> [CLI] bundle deploy | ||
| Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/experiment-basic-[UNIQUE_NAME]/default/files... | ||
| Deploying resources... | ||
| Updating deployment state... | ||
| Deployment complete! | ||
| >>> [CLI] experiments get-experiment [NUMID] | ||
| { | ||
| "name": "/Users/[USERNAME]/new-name-[UNIQUE_NAME]", | ||
| "artifact_location": "s3://new-[UNIQUE_NAME]", | ||
| "tags": [ | ||
| { | ||
| "key": "k1", | ||
| "value": "v1" | ||
| }, | ||
| { | ||
| "key": "mlflow.ownerId", | ||
| "value": "[USERID]" | ||
| }, | ||
| { | ||
| "key": "mlflow.experiment.sourceName", | ||
| "value": "/Users/[USERNAME]/new-name-[UNIQUE_NAME]" | ||
| }, | ||
| { | ||
| "key": "mlflow.ownerId", | ||
| "value": "[USERID]" | ||
| }, | ||
| { | ||
| "key": "mlflow.ownerEmail", | ||
| "value": "[USERNAME]" | ||
| }, | ||
| { | ||
| "key": "mlflow.experimentType", | ||
| "value": "MLFLOW_EXPERIMENT" | ||
| } | ||
| ] | ||
| } | ||
| === adding a new tag should be a no-op | ||
| >>> envsubst | ||
| >>> [CLI] bundle plan | ||
| >>> [CLI] bundle deploy | ||
| Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/experiment-basic-[UNIQUE_NAME]/default/files... | ||
| Deploying resources... | ||
| Updating deployment state... | ||
| Deployment complete! | ||
| >>> [CLI] experiments get-experiment [NUMID] | ||
| { | ||
| "name": "/Users/[USERNAME]/new-name-[UNIQUE_NAME]", | ||
| "artifact_location": "s3://new-[UNIQUE_NAME]", | ||
| "tags": [ | ||
| { | ||
| "key": "k1", | ||
| "value": "v1" | ||
| }, | ||
| { | ||
| "key": "mlflow.ownerId", | ||
| "value": "[USERID]" | ||
| }, | ||
| { | ||
| "key": "mlflow.experiment.sourceName", | ||
| "value": "/Users/[USERNAME]/new-name-[UNIQUE_NAME]" | ||
| }, | ||
| { | ||
| "key": "mlflow.ownerId", | ||
| "value": "[USERID]" | ||
| }, | ||
| { | ||
| "key": "mlflow.ownerEmail", | ||
| "value": "[USERNAME]" | ||
| }, | ||
| { | ||
| "key": "mlflow.experimentType", | ||
| "value": "MLFLOW_EXPERIMENT" | ||
| } | ||
| ] | ||
| } | ||
| >>> [CLI] bundle destroy --auto-approve | ||
| The following resources will be deleted: | ||
| delete experiment my_experiment | ||
| All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/experiment-basic-[UNIQUE_NAME]/default | ||
| Deleting files... | ||
| Destroy complete! |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| cleanup() { | ||
| trace $CLI bundle destroy --auto-approve | ||
| } | ||
| trap cleanup EXIT | ||
| title "create the experiment" | ||
| trace export EXPERIMENT_ARTIFACT_LOCATION="s3://original-${UNIQUE_NAME}" | ||
| trace export EXPERIMENT_NAME_PREFIX="original" | ||
| trace envsubst < templates/one_tag.tmpl > databricks.yml | ||
| trace $CLI bundle plan | ||
| trace $CLI bundle deploy | ||
| experiment_id=$($CLI bundle summary --output json | jq -r '.resources.experiments.my_experiment.id') | ||
| trace $CLI experiments get-experiment $experiment_id | jq '.experiment | {name, artifact_location, tags}' | ||
| title "update the name" | ||
| trace export EXPERIMENT_NAME_PREFIX="new-name" | ||
| trace envsubst < templates/one_tag.tmpl > databricks.yml | ||
| trace $CLI bundle plan | ||
| trace $CLI bundle deploy | ||
| experiment_id=$($CLI bundle summary --output json | jq -r '.resources.experiments.my_experiment.id') | ||
| trace $CLI experiments get-experiment $experiment_id | jq '.experiment | {name, artifact_location, tags}' | ||
| title "updating the artifact location should cause a recreation" | ||
| trace export EXPERIMENT_ARTIFACT_LOCATION="s3://new-${UNIQUE_NAME}" | ||
| trace envsubst < templates/one_tag.tmpl > databricks.yml | ||
| trace $CLI bundle plan | ||
| trace $CLI bundle deploy | ||
| experiment_id=$($CLI bundle summary --output json | jq -r '.resources.experiments.my_experiment.id') | ||
| trace $CLI experiments get-experiment $experiment_id | jq '.experiment | {name, artifact_location, tags}' | ||
| title "adding a new tag should be a no-op" | ||
| trace envsubst < templates/two_tag.tmpl > databricks.yml | ||
| trace $CLI bundle plan > out.plan.$DATABRICKS_BUNDLE_ENGINE.txt | ||
| trace $CLI bundle deploy | ||
| experiment_id=$($CLI bundle summary --output json | jq -r '.resources.experiments.my_experiment.id') | ||
| trace $CLI experiments get-experiment $experiment_id | jq '.experiment | {name, artifact_location, tags}' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| bundle: | ||
| name: experiment-basic-$UNIQUE_NAME | ||
| resources: | ||
| experiments: | ||
| my_experiment: | ||
| artifact_location: $EXPERIMENT_ARTIFACT_LOCATION | ||
| name: /Users/${CURRENT_USER_NAME}/${EXPERIMENT_NAME_PREFIX}-${UNIQUE_NAME} | ||
| tags: | ||
| - key: "k1" | ||
| value: "v1" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| bundle: | ||
| name: experiment-basic-$UNIQUE_NAME | ||
| resources: | ||
| experiments: | ||
| my_experiment: | ||
| artifact_location: $EXPERIMENT_ARTIFACT_LOCATION | ||
| name: /Users/${CURRENT_USER_NAME}/${EXPERIMENT_NAME_PREFIX}-${UNIQUE_NAME} | ||
| tags: | ||
| - key: "k1" | ||
| value: "v1" | ||
| - key: "k2" | ||
| value: "v2" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| Cloud = true | ||
| Local = true | ||
| [[Repls]] | ||
| Old = '\d{3,}' | ||
| New = "[NUMID]" | ||
| # Test both terraform and direct deployment engines | ||
| [EnvMatrix] | ||
| DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct-exp"] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we have 'update' for terraform but 'skip' for direct here? @shreyas-goenka
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I remember now, terraform shows changes but does not perform the update. Direct also does not do the update for tags but also does not show it in the plan.