Skip to content

Labs 06 & 07: missing local Git/VS Code setup, a YAML indentation error in the workflow snippet, and an undocumented prod-environment approval step #57

@lostspace003

Description

@lostspace003

Summary

While following Lab 06 – Automate model training with GitHub Actions (docs/06-automate-model-training.md) and Lab 07 – Deploy and monitor a model (docs/07-deploy-monitor.md), I ran into several places where the instructions are incomplete or inaccurate enough to block a learner who follows them literally. Each item below includes a suggested fix.


Lab 06 — Automate model training with GitHub Actions

File: docs/06-automate-model-training.md

  1. No local-environment / Git identity setup before the first commit.
    The lab says "Clone your mslearn-mlops repository … to a development environment where you can edit files and push changes back to GitHub" and later "commit them to your local repository, and push the changes to the main branch" — but never explains how to clone (e.g. VS Code → Git: Clone), how to sign in to GitHub, or how to configure a Git identity.
    A first-time user who follows this literally hits Author identity unknown / Please tell me who you are on git commit.
    Suggested fix: add a short "Set up your local environment" step covering cloning in VS Code, signing in to GitHub (needed for private repos), and:

    git config --global user.name "Your Name"
    git config --global user.email "your-email@example.com"
    
  2. Incorrect YAML indentation in the workflow snippet (will break on paste).
    The step the learner is told to append is shown as:

    - name: Run Azure Machine Learning training job
        run: az ml job create -f src/job.yml --stream --resource-group ${{vars.AZURE_RESOURCE_GROUP}} --workspace-name ${{vars.AZURE_WORKSPACE_NAME}}

    run: is indented one level deeper than name:. They are keys of the same map and must be at the same indent. As written it produces invalid/misparsed workflow YAML when pasted.
    Suggested fix: align run: under name:, and add a note that GitHub Actions YAML is space-indented (no tabs) and the step must match the indentation of the sibling steps already in the file.

  3. "fork" terminology is inconsistent with the template flow.
    The lab says "push the changes to the main branch of your fork", but earlier instructs the learner to create the repo via Use this template (a template-generated repo, not a fork).
    Suggested fix: change "your fork" to "your repository".

  4. Vague edit instruction.
    "Make a small, safe change to the training configuration. For example, adjust a hyperparameter value in src/train-model-parameters.py or in src/job.yml." doesn't say which parameter or value.
    Suggested fix: name it concretely, e.g. "change the --reg_rate default from 0.01 to 0.1 in the parse_args() function of src/train-model-parameters.py."

  5. Outdated GitHub branch-protection UI.
    "Settings > Branches and select Add branch protection rule" no longer matches current GitHub (classic branch protection has moved, and Rulesets is now the primary path).
    Suggested fix: update the navigation/labels to the current UI (or note the Rulesets alternative).

  6. (Minor) PR creation has no concrete steps.
    "In GitHub, create a pull request from your feature branch into main" could note the Compare & pull request banner / Pull requests → New pull request path for less experienced users.


Lab 07 — Deploy and monitor a model

File: docs/07-deploy-monitor.md

  1. Undocumented approval gate for the optional prod environment rule (most confusing item).
    The lab offers "(Optional) In the prod environment, add an environment protection rule that requires manual approval before a job can run", but never explains the consequence: once enabled, the /train-prod and /deploy-prod runs pause and wait for approval instead of running. Nothing in the lab tells the learner to approve them, so they appear stuck.
    Suggested fix: add a step after each comment-triggered run, e.g. "If you enabled the optional approval rule, open the waiting run on the Actions tab, select Review deployments, tick prod, and select Approve and deploy." and add a note at the optional step explaining this is the expected behavior.

  2. No local-environment / Git identity setup (same as Lab 06).
    "Clone your mslearn-mlops repository … to a development machine where you can edit files and push changes" — no clone/sign-in/git config guidance before the first commit.
    Suggested fix: same as Lab 06, item 1.

  3. Inconsistent level of detail between the dev and drift retraining flows.
    In the dev-training section the steps are prose only — "create a new feature branch and make a small, safe hyperparameter change", "Commit your change and push the new branch", "create a pull request" — with no commands. The later "Simulate drift and retrain" section, by contrast, does provide the exact commands (git checkout -b …, git add/commit/push …).
    Suggested fix: add the same git checkout -b / git add / git commit / git push commands (and the concrete --reg_rate edit) to the dev-training section so both flows are consistent and followable.

  4. (Minor) "detects … that the infra/setup.sh script created" can mislead.
    The review bullets state the workflows "Detect the resource group and workspace that the infra/setup.sh script created." In practice the workflows discover them by querying Azure for names starting with rg-ai300-l / mlw-ai300-l, not by reading anything the script wrote.
    Suggested fix: reword to "automatically detects the resource group and workspace by querying Azure."


Environment

  • Followed via the hosted (Cloud Slice) lab environment; issues above were cross-checked against the current main of docs/06-automate-model-training.md and docs/07-deploy-monitor.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions