Managing Large YAML Files
Why This Matters
YAML Anchors & Aliases: The Basics
Define a reusable block with &anchor
&anchor- definitions:
my-common-inputs: &common_inputs # <- Anchor named "common_inputs"
- name: dataset
default: s3://my-bucket/train.csv
- name: config
default: s3://my-bucket/config.yaml
- step:
name: train-model
image: tensorflow/tensorflow:2.6.0
command: python train.py
inputs: *common_inputs # Uses the block defined above
- step:
name: evaluate-model
image: tensorflow/tensorflow:2.6.0
command: python evaluate.py
inputs: *common_inputs # Same inputs, no repetitionCommon Use Cases
Shared input datasets
Repeated parameters
Standard commands
Merge and Override with <<: *anchor
<<: *anchorTips for Large YAML Files
What's Next?
Last updated
Was this helpful?
