YAML For Azure ML

Get introduced to YAML, a markup language used for building Azure ML pipelines, and its syntax.

We'll cover the following

What is YAML?

YAML stands for YAML ain’t markup language. It is a user-friendly serialization language (similar to XML and JSON). YAML appears to be Gen-Y for XML. Don’t be mistaken; there is also ZAML, which is unrelated to YAML. We can represent sequential, hierarchical data very well in YAML. It has steadily increased its popularity in recent years.

YAML has the following key features:

  • YAML is a broad language and can work with all programming languages.
  • It is mainly used for preparing configuration files.
  • Its object serialization capabilities make it similar to the JSON format.
  • YAML is a more readable language.

Azure supports the YAML language for pipeline creation. Azure Pipelines is a cloud service used for automatically building and testing code or ML projects.

Using YAML templates, we can define reusable content, logic, and parameters in separate templates that load into the pipeline at runtime.

We can divide these templates into one of four categories:

  • Stage: Define a set of stages for related jobs.

  • Job: Define a collection of steps run by an agent.

  • Step: Define a linear sequence of operations for a job.

  • Variable: An alternative to hardcoded values or variable groups.

YAML examples

Let’s look at a sample Azure job in YAML below:

Get hands-on with 1200+ tech skills courses.