diff --git a/.github/workflows/nano.save b/.github/workflows/nano.save new file mode 100644 index 00000000..62d8fe9f --- /dev/null +++ b/.github/workflows/nano.save @@ -0,0 +1 @@ +X diff --git a/.github/workflows/workshop_cd.yml b/.github/workflows/workshop_cd.yml index df3e7214..ea6c3038 100644 --- a/.github/workflows/workshop_cd.yml +++ b/.github/workflows/workshop_cd.yml @@ -42,8 +42,8 @@ jobs: - name: Run deployment uses: ./.github/actions/aml-endpoint-deploy with: - resourceGroup: azureml #setup replace azureml with the name of your resource group in Azure - workspaceName: ws01ent #setup replace ws01ent with the name of your workspace in Azure + resourceGroup: mlops-rg-948695 #setup replace azureml with the name of your resource group in Azure + workspaceName: aml948695 #setup replace ws01ent with the name of your workspace in Azure endpointFile: src/workshop/core/scoring/endpoint.yml deploymentFile: src/workshop/core/scoring/deployment.yml modelVersion: latest @@ -51,14 +51,14 @@ jobs: - name: Test deployment uses: ./.github/actions/aml-endpoint-test with: - resourceGroup: azureml #setup replace azureml with the name of your resource group in Azure - workspaceName: ws01ent #setup replace ws01ent with the name of your workspace in Azure + resourceGroup: mlops-rg-948695 #setup replace azureml with the name of your resource group in Azure + workspaceName: aml948695 #setup replace ws01ent with the name of your workspace in Azure endpointFile: src/workshop/core/scoring/endpoint.yml requestFile: src/workshop/core/scoring/scoring_test_request.json - name: Swap deployment uses: ./.github/actions/aml-endpoint-swap with: - resourceGroup: azureml #setup replace azureml with the name of your resource group in Azure - workspaceName: ws01ent #setup replace ws01ent with the name of your workspace in Azure - endpointFile: src/workshop/core/scoring/endpoint.yml \ No newline at end of file + resourceGroup: mlops-rg-948695 #setup replace azureml with the name of your resource group in Azure + workspaceName: aml948695 #setup replace ws01ent with the name of your workspace in Azure + endpointFile: src/workshop/core/scoring/endpoint.yml diff --git a/.github/workflows/workshop_ci.yml b/.github/workflows/workshop_ci.yml index 09c0ea72..be62ada8 100644 --- a/.github/workflows/workshop_ci.yml +++ b/.github/workflows/workshop_ci.yml @@ -1,3 +1,4 @@ +#random comment name: workshop-ci on: workflow_dispatch: @@ -32,7 +33,7 @@ jobs: - name: Install az ml & set default values for AML run: | #setup: provide group, workspace and location az extension add -n ml -y --version 2.2.1 - az configure --defaults group=azureml workspace=ws01ent location=westus2 + az configure --defaults group=mlops-rg-948695 workspace=aml948695 location=eastus2 - name: run training and model validation run: | az ml job create -s -f src/workshop/core/pipelines/training_pipeline.yml diff --git a/.github/workflows/workshop_unit_test.yml b/.github/workflows/workshop_unit_test.yml index 3c1382c3..5214d3ef 100644 --- a/.github/workflows/workshop_unit_test.yml +++ b/.github/workflows/workshop_unit_test.yml @@ -1,3 +1,4 @@ +#the change name: feature_engineering_unit_test on: workflow_dispatch: @@ -31,7 +32,7 @@ jobs: - name: Install AZ ML and tools run: | # SETUP line 34 to point to your own AML workspace az extension add -n ml -y --version 2.2.1 - az configure --defaults group=azureml workspace=ws01ent location=westus2 + az configure --defaults group=mlops-rg-948695 workspace=aml948695 location=eastus2 - name: Run Feature Engineering uses: ./.github/actions/aml-job-create with: diff --git a/.github/workflows/workshop_unit_test.yml.save b/.github/workflows/workshop_unit_test.yml.save new file mode 100644 index 00000000..57149c83 --- /dev/null +++ b/.github/workflows/workshop_unit_test.yml.save @@ -0,0 +1,39 @@ +name: feature_engineering_unit_test +on: + workflow_dispatch: + push: + branches-ignore: + - main + - integration + paths: + - src/workshop/core/data_engineering/* + - .github/workflows/workshop_unit_test.yml + +jobs: + unit-test: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - name: Setup python + uses: actions/setup-python@v2 + with: + python-version: '3.8' # Version range or exact version of a Python version to use, using SemVer's version range syntax + - name: Upgrade pip + run: | + python -m pip install --upgrade pip + python -m pip install --upgrade build + python -m pip install --upgrade twine + - name: AZ Login + uses: azure/login@v1 + with: + creds: $} # SETUP: replace AZURE_SERVICE_PRINCIPAL with your own secret name + - name: Install AZ ML and tools + run: | # SETUP line 34 to point to your own AML workspace + az extension add -n ml -y --version 2.2.1 + az configure --defaults group=azureml workspace=ws01ent location=westus2 + - name: Run Feature Engineering + uses: ./.github/actions/aml-job-create + with: + jobFile: src/workshop/core/data_engineering/feature_engineering.yml + diff --git a/src/workshop/core/scoring/deployment.yml b/src/workshop/core/scoring/deployment.yml index 29c3500c..70e5584a 100644 --- a/src/workshop/core/scoring/deployment.yml +++ b/src/workshop/core/scoring/deployment.yml @@ -1,6 +1,6 @@ $schema: https://azuremlschemas.azureedge.net/latest/managedOnlineDeployment.schema.json name: green -endpoint_name: mlops-workshop-endpoint #setup replace `mlops-workshop-endpoint` with your own endpoint name defined in endpoint.yml +endpoint_name: calin-endpoint #setup replace `mlops-workshop-endpoint` with your own endpoint name defined in endpoint.yml model: azureml:nyc_fare_prediction:1 code_configuration: code: ./ diff --git a/src/workshop/core/scoring/endpoint.yml b/src/workshop/core/scoring/endpoint.yml index 611e0721..2b65b2fa 100644 --- a/src/workshop/core/scoring/endpoint.yml +++ b/src/workshop/core/scoring/endpoint.yml @@ -1,3 +1,3 @@ $schema: https://azuremlschemas.azureedge.net/latest/managedOnlineEndpoint.schema.json -name: mlops-workshop-endpoint #setup replace `mlops-workshop-endpoint` with your own endpoint name. It has to be globally unique +name: calin-endpoint #setup replace `mlops-workshop-endpoint` with your own endpoint name. It has to be globally unique auth_mode: key diff --git a/src/workshop/core/training/.amlignore b/src/workshop/core/training/.amlignore new file mode 100644 index 00000000..0621f9fc --- /dev/null +++ b/src/workshop/core/training/.amlignore @@ -0,0 +1,6 @@ +## This file was auto generated by the Azure Machine Learning Studio. Please do not remove. +## Read more about the .amlignore file here: https://docs.microsoft.com/azure/machine-learning/how-to-save-write-experiment-files#storage-limits-of-experiment-snapshots + +.ipynb_aml_checkpoints/ +*.amltmp +*.amltemp \ No newline at end of file diff --git a/src/workshop/core/training/.amlignore.amltmp b/src/workshop/core/training/.amlignore.amltmp new file mode 100644 index 00000000..0621f9fc --- /dev/null +++ b/src/workshop/core/training/.amlignore.amltmp @@ -0,0 +1,6 @@ +## This file was auto generated by the Azure Machine Learning Studio. Please do not remove. +## Read more about the .amlignore file here: https://docs.microsoft.com/azure/machine-learning/how-to-save-write-experiment-files#storage-limits-of-experiment-snapshots + +.ipynb_aml_checkpoints/ +*.amltmp +*.amltemp \ No newline at end of file diff --git a/src/workshop/core/training/ml_training.py b/src/workshop/core/training/ml_training.py index 6f59dcdd..c85b8ad5 100644 --- a/src/workshop/core/training/ml_training.py +++ b/src/workshop/core/training/ml_training.py @@ -43,7 +43,7 @@ def createClassModel(algo_name, catg, nums): #--------------------------------------------- #setup: Update alpha value #--------------------------------------------- - model = Ridge(alpha=100000) #setup + model = Ridge(alpha=100) #setup elif algo_name == 'random_forest': model = RandomForestRegressor() else: @@ -100,4 +100,4 @@ def main(args): # parse args args = parse_args() # run main function - main(args) \ No newline at end of file + main(args) diff --git a/src/workshop/data/linear_regression.joblib b/src/workshop/data/linear_regression.joblib index d6bd0590..da6d2c79 100644 Binary files a/src/workshop/data/linear_regression.joblib and b/src/workshop/data/linear_regression.joblib differ