Parses and validates
Valohai YAML files are used to define how your machine learning project workloads and pipelines are ran on the Valohai ecosystem. Refer to Valohai Documentation to learn how to write the actual YAML files and for more in-depth usage examples.
pip install valohai-yaml
from valohai_yaml import validate, ValidationErrors try: with open('path/to/valohai.yaml') as f: validate(f) except ValidationErrors as errors: print('oh no!') for err in errors: print(err)
valohai-yaml my_yaml.yaml echo $? # 1 if errors, 0 if ok
from valohai_yaml import parse with open('path/to/valohai.yaml') as f: config = parse(f) print(config.steps['cool step'].command)
pip install -e .[dev] pytest