-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated model example structure (#1909)
* updated model example structure * remove on needed file reference * updated path * added updated workflows * Update README.md
- Loading branch information
Showing
8 changed files
with
142 additions
and
38 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
.github/workflows/cli-jobs-basics-hello-model-as-input.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# This code is autogenerated. | ||
# Code is generated by running custom script: python3 readme.py | ||
# Any manual changes to this file may cause incorrect behavior. | ||
# Any manual changes will be overwritten if the code is regenerated. | ||
|
||
name: cli-jobs-basics-hello-model-as-input | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 0/8 * * *" | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- cli/jobs/basics/** | ||
- infra/** | ||
- .github/workflows/cli-jobs-basics-hello-model-as-input.yml | ||
- cli/setup.sh | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: check out repo | ||
uses: actions/checkout@v2 | ||
- name: azure login | ||
uses: azure/login@v1 | ||
with: | ||
creds: ${{secrets.AZUREML_CREDENTIALS}} | ||
- name: bootstrap resources | ||
run: | | ||
echo '${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}'; | ||
bash bootstrap.sh | ||
working-directory: infra | ||
continue-on-error: false | ||
- name: setup-cli | ||
run: | | ||
source "${{ github.workspace }}/infra/sdk_helpers.sh"; | ||
source "${{ github.workspace }}/infra/init_environment.sh"; | ||
bash setup.sh | ||
working-directory: cli | ||
continue-on-error: true | ||
- name: run job | ||
run: | | ||
source "${{ github.workspace }}/infra/sdk_helpers.sh"; | ||
source "${{ github.workspace }}/infra/init_environment.sh"; | ||
bash -x ../../run-job.sh hello-model-as-input.yml | ||
working-directory: cli/jobs/basics |
50 changes: 50 additions & 0 deletions
50
.github/workflows/cli-jobs-basics-hello-model-as-output.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# This code is autogenerated. | ||
# Code is generated by running custom script: python3 readme.py | ||
# Any manual changes to this file may cause incorrect behavior. | ||
# Any manual changes will be overwritten if the code is regenerated. | ||
|
||
name: cli-jobs-basics-hello-model-as-output | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 0/8 * * *" | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- cli/jobs/basics/** | ||
- infra/** | ||
- .github/workflows/cli-jobs-basics-hello-model-as-output.yml | ||
- cli/setup.sh | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: check out repo | ||
uses: actions/checkout@v2 | ||
- name: azure login | ||
uses: azure/login@v1 | ||
with: | ||
creds: ${{secrets.AZUREML_CREDENTIALS}} | ||
- name: bootstrap resources | ||
run: | | ||
echo '${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}'; | ||
bash bootstrap.sh | ||
working-directory: infra | ||
continue-on-error: false | ||
- name: setup-cli | ||
run: | | ||
source "${{ github.workspace }}/infra/sdk_helpers.sh"; | ||
source "${{ github.workspace }}/infra/init_environment.sh"; | ||
bash setup.sh | ||
working-directory: cli | ||
continue-on-error: true | ||
- name: run job | ||
run: | | ||
source "${{ github.workspace }}/infra/sdk_helpers.sh"; | ||
source "${{ github.workspace }}/infra/init_environment.sh"; | ||
bash -x ../../run-job.sh hello-model-as-output.yml | ||
working-directory: cli/jobs/basics |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
$schema: https://azuremlschemas.azureedge.net/latest/commandJob.schema.json | ||
|
||
# Possible Paths for models: | ||
# AzureML Datastore: azureml://datastores/<datastore-name>/paths/<path_on_datastore> | ||
# MLflow run: runs:/<run-id>/<path-to-model-relative-to-the-root-of-the-artifact-location> | ||
# Job: azureml://jobs/<job-name>/outputs/<output-name>/paths/<path-to-model-relative-to-the-named-output-location> | ||
# Model Asset: azureml:<my_model>:<version> | ||
|
||
command: | | ||
ls ${{inputs.my_model}} | ||
inputs: | ||
my_model: | ||
type: mlflow_model # List of all model types here: https://learn.microsoft.com/azure/machine-learning/reference-yaml-model#yaml-syntax | ||
path: ../../assets/model/mlflow-model | ||
environment: azureml:AzureML-sklearn-1.0-ubuntu20.04-py38-cpu@latest | ||
compute: azureml:cpu-cluster |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
$schema: https://azuremlschemas.azureedge.net/latest/commandJob.schema.json | ||
|
||
# Possible Paths for Model: | ||
# Local path: mlflow-model/model.pkl | ||
# AzureML Datastore: azureml://datastores/<datastore-name>/paths/<path_on_datastore> | ||
# MLflow run: runs:/<run-id>/<path-to-model-relative-to-the-root-of-the-artifact-location> | ||
# Job: azureml://jobs/<job-name>/outputs/<output-name>/paths/<path-to-model-relative-to-the-named-output-location> | ||
# Model Asset: azureml:<my_model>:<version> | ||
|
||
code: src | ||
command: >- | ||
python hello-model-as-output.py | ||
--input_model ${{inputs.input_model}} | ||
--custom_model_output ${{outputs.output_folder}} | ||
inputs: | ||
input_model: | ||
type: mlflow_model # mlflow_model,custom_model, triton_model | ||
path: ../../assets/model/mlflow-model | ||
outputs: | ||
output_folder: | ||
type: custom_model # mlflow_model,custom_model, triton_model | ||
environment: azureml:AzureML-sklearn-1.0-ubuntu20.04-py38-cpu@latest | ||
compute: azureml:cpu-cluster |
File renamed without changes.