Skip to content

Commit 9bee73f

Browse files
dtzareedorenko
authored andcommitted
Add code comments (#114)
1 parent d4a7633 commit 9bee73f

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

.pipelines/azdo-ci-build-train.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,10 @@ stages:
4747
steps:
4848
- script: |
4949
python $(Build.SourcesDirectory)/ml_service/pipelines/run_train_pipeline.py
50+
# Set AMLPIPELINEID variable for next AML Pipeline task in next job
5051
source $(Build.SourcesDirectory)/tmp.sh
5152
echo "##vso[task.setvariable variable=AMLPIPELINEID;isOutput=true]$AMLPIPELINE_ID"
53+
rm $(Build.SourcesDirectory)/tmp.sh
5254
name: 'getpipelineid'
5355
displayName: 'Get Pipeline ID'
5456
env:

code/evaluate/evaluate_model.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646
app_id = os.environ.get('SP_APP_ID')
4747
app_secret = os.environ.get('SP_APP_SECRET')
4848
build_id = os.environ.get('BUILD_BUILDID')
49+
# run_id useful to query previous runs
50+
run_id = "57fee47f-5ae8-441c-bc0c-d4c371f32d70"
4951
service_principal = ServicePrincipalAuthentication(
5052
tenant_id=tenant_id,
5153
service_principal_id=app_id,
@@ -59,7 +61,6 @@
5961
)
6062
ws = aml_workspace
6163
exp = Experiment(ws, experiment_name)
62-
run_id = "57fee47f-5ae8-441c-bc0c-d4c371f32d70"
6364
else:
6465
sys.path.append(os.path.abspath("./util")) # NOQA: E402
6566
from model_helper import get_model_by_tag

code/register/register_model.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ def main():
5050
app_id = os.environ.get('SP_APP_ID')
5151
app_secret = os.environ.get('SP_APP_SECRET')
5252
build_id = os.environ.get('BUILD_BUILDID')
53+
# run_id useful to query previous runs
54+
run_id = "bd184a18-2ac8-4951-8e78-e290bef3b012"
5355
service_principal = ServicePrincipalAuthentication(
5456
tenant_id=tenant_id,
5557
service_principal_id=app_id,
@@ -63,7 +65,6 @@ def main():
6365
)
6466
ws = aml_workspace
6567
exp = Experiment(ws, experiment_name)
66-
run_id = "bd184a18-2ac8-4951-8e78-e290bef3b012"
6768
else:
6869
sys.path.append(os.path.abspath("./util")) # NOQA: E402
6970
from model_helper import get_model_by_tag

ml_service/pipelines/run_train_pipeline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ def main():
4545
savePIDcmd = 'echo "export AMLPIPELINE_ID=$amlpipeline_id" >tmp.sh'
4646
os.system(savePIDcmd)
4747

48-
# Set this to True for local development or
49-
# if not using Azure DevOps pipeline execution task
48+
# Set this to True for local development or if NOT
49+
# using Azure DevOps Azure ML agentless pipeline execution task
5050
skip_train_execution = True
5151
if(skip_train_execution is False):
5252
pipeline_parameters = {"model_name": e.model_name}

0 commit comments

Comments
 (0)