8000 Add conditionals for catalog variable by arpitjasa-db · Pull Request #188 · databricks/mlops-stacks · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add conditionals for catalog variable #188

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

Merged
merged 1 commit into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ jobs:

# Update databricks.yml
- script: |
echo -e " staging:\n variables:\n catalog_name: {{ .input_staging_catalog_name }}\n workspace:\n host: {{template `databricks_staging_workspace_host` .}}\n\n prod:\n variables:\n catalog_name: {{ .input_prod_catalog_name }}\n workspace:\n host: {{template `databricks_prod_workspace_host` .}}\n\n test:\n variables:\n catalog_name: {{ .input_test_catalog_name }}\n workspace:\n host: {{template `databricks_staging_workspace_host` .}}" >> "$(PROJECT_NAME_ALPHA)\databricks.yml"
{{if (eq .input_include_models_in_unity_catalog `yes`)}}echo -e " staging:\n variables:\n catalog_name: {{ .input_staging_catalog_name }}\n workspace:\n host: {{template `databricks_staging_workspace_host` .}}\n\n prod:\n variables:\n catalog_name: {{ .input_prod_catalog_name }}\n workspace:\n host: {{template `databricks_prod_workspace_host` .}}\n\n test:\n variables:\n catalog_name: {{ .input_test_catalog_name }}\n workspace:\n host: {{template `databricks_staging_workspace_host` .}}" >> "$(PROJECT_NAME_ALPHA)\databricks.yml"
{{- else}}echo -e " staging:\n workspace:\n host: {{template `databricks_staging_workspace_host` .}}\n\n prod:\n workspace:\n host: {{template `databricks_prod_workspace_host` .}}\n\n test:\n workspace:\n host: {{template `databricks_staging_workspace_host` .}}" >> "$(PROJECT_NAME_ALPHA)\databricks.yml"{{end}}
displayName: 'Update databricks.yml'

# Initialize CICD Bundle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ jobs:
- name: Update databricks.yml
id: update
run: |
echo -e " staging:\n variables:\n catalog_name: {{ .input_staging_catalog_name }}\n workspace:\n host: {{template `databricks_staging_workspace_host` .}}\n\n prod:\n variables:\n catalog_name: {{ .input_prod_catalog_name }}\n workspace:\n host: {{template `databricks_prod_workspace_host` .}}\n\n test:\n variables:\n catalog_name: {{ .input_test_catalog_name }}\n workspace:\n host: {{template `databricks_staging_workspace_host` .}}" >> "$(PROJECT_NAME_ALPHA)\databricks.yml"
{{if (eq .input_include_models_in_unity_catalog `yes`)}}echo -e " staging:\n variables:\n catalog_name: {{ .input_staging_catalog_name }}\n workspace:\n host: {{template `databricks_staging_workspace_host` .}}\n\n prod:\n variables:\n catalog_name: {{ .input_prod_catalog_name }}\n workspace:\n host: {{template `databricks_prod_workspace_host` .}}\n\n test:\n variables:\n catalog_name: {{ .input_test_catalog_name }}\n workspace:\n host: {{template `databricks_staging_workspace_host` .}}" >> "$(PROJECT_NAME_ALPHA)\databricks.yml"
{{- else}}echo -e " staging:\n workspace:\n host: {{template `databricks_staging_workspace_host` .}}\n\n prod:\n workspace:\n host: {{template `databricks_prod_workspace_host` .}}\n\n test:\n workspace:\n host: {{template `databricks_staging_workspace_host` .}}" >> "$(PROJECT_NAME_ALPHA)\databricks.yml"{{end}}
- name: Initialize Bundle
id: initialize
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ variables:
description: Model name for the model training.
{{ if (eq .input_include_models_in_unity_catalog `no`) }}default: ${bundle.target}-{{template `model_name` .}}
{{- else -}}default: {{template `model_name` .}}{{end}}
catalog_name:
description: The catalog name to save the trained model
{{ if (eq .input_include_models_in_unity_catalog `yes`) }}catalog_name:
description: The catalog name to save the trained model{{end}}

include:
# Resources folder contains ML artifact resources for the ML project that defines model and experiment
Expand All @@ -34,27 +34,37 @@ targets:
dev: {{ if (eq .input_include_models_in_unity_catalog `yes`)}} # UC Catalog Name {{ end }}
mode: development
default: true
{{- if (eq .input_include_models_in_unity_catalog `yes`)}}
variables:
catalog_name: dev
{{- end}}
workspace:
# TODO: add dev workspace URL
host:

{{ if (eq .input_setup_cicd_and_project `CICD_and_Project`)}}
{{- if (eq .input_setup_cicd_and_project `CICD_and_Project`)}}

staging:
{{- if (eq .input_include_models_in_unity_catalog `yes`) }}
variables:
catalog_name: {{ .input_staging_catalog_name }}
{{- end}}
workspace:
host: {{template `databricks_staging_workspace_host` .}}

prod:
{{- if (eq .input_include_models_in_unity_catalog `yes`)}}
variables:
catalog_name: {{ .input_prod_catalog_name }}
{{- end}}
workspace:
host: {{template `databricks_prod_workspace_host` .}}

test:
{{- if (eq .input_include_models_in_unity_catalog `yes`)}}
variables:
catalog_name: {{ .input_test_catalog_name }}
{{- end}}
workspace:
host: {{template `databricks_staging_workspace_host` .}}
{{ end }}
Loading
0