Valohai.yaml validation and parsing
Project description
valohai-yaml
Parses and validates valohai.yaml
files.
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.
Installation
pip install valohai-yaml
Usage
Validation
Programmatic usage:
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)
Command-line usage:
valohai-yaml my_yaml.yaml
echo $? # 1 if errors, 0 if ok
Parsing
from valohai_yaml import parse
with open('path/to/valohai.yaml') as f:
config = parse(f)
print(config.steps['cool step'].command)
Development
# setup development dependencies
make dev
# run linting and type checks
make lint
# run tests
make test
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
valohai_yaml-0.43.0.tar.gz
(52.5 kB
view details)
Built Distribution
File details
Details for the file valohai_yaml-0.43.0.tar.gz
.
File metadata
- Download URL: valohai_yaml-0.43.0.tar.gz
- Upload date:
- Size: 52.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b8f06fb9ffc43b6f575f5778791207bd2afbc73a77bf3ed7424b6183a74bb8b |
|
MD5 | 2fdfd79a1c5d97c2a1bb30eba6d52cc7 |
|
BLAKE2b-256 | 4364e75293c21d0cd0f6e916ee884be989c38d89375d65db317d9cfe56b0541f |
File details
Details for the file valohai_yaml-0.43.0-py3-none-any.whl
.
File metadata
- Download URL: valohai_yaml-0.43.0-py3-none-any.whl
- Upload date:
- Size: 55.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5d9591551a357dcc7749f2784ac434978c6fafb65d571aa15c1ecde8fc7b0cb |
|
MD5 | eb6eb542eba348291ac6c8dada601053 |
|
BLAKE2b-256 | 54c520137e053f0f7f907f2fcb9d333690e1398062274b9a28a9d26c0507c0d2 |