Valohai YAML

Each Valohai-enabled git repository has a valohai.yaml configuration file that defines the runs that can be executed and what kind of REST endpoints can be automatically generated by the project. We’ll cover these execution types or “steps”, as we call them, in the next section.

A single configuration file can be used by multiple projects by various users, as long as the user has access to the git repository.

Large YAML files

Each Project can have one valohai.yaml file. As your project grows, you might start having repetitive content in your YAML file.

We recommend using YAML anchors, aliases, and extensions to define and re-use repeatitive content.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
- definitions:
    my-inputs: &my_inputs
        - name: test-set
          keep-directories: suffix
          default: s3://onboard-sample/test/*
        - name: train-set
          keep-directories: suffix
          default: s3://onboard-sample/train/*

- step:
    name: train-model
    image: tensorflow/tensorflow:2.0.1
    command:
      - pip install valohai-utils numpy
      - python ./train.py {parameters}
    parameters:
      - name: epoch
        default: 5
        type: integer
    inputs: *my_inputs
🐞 Give feedback about this page