Skip to main content

Valohai.yaml validation and parsing

Project description

valohai-yaml

Build Status Codecov License: MIT

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

Snapshots

Update syrupy snapshots after making changes to the examples.

pytest --snapshot-update

Project details


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.55.0.tar.gz (68.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

valohai_yaml-0.55.0-py3-none-any.whl (59.0 kB view details)

Uploaded Python 3

File details

Details for the file valohai_yaml-0.55.0.tar.gz.

File metadata

  • Download URL: valohai_yaml-0.55.0.tar.gz
  • Upload date:
  • Size: 68.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for valohai_yaml-0.55.0.tar.gz
Algorithm Hash digest
SHA256 d21e3f2b9bf468410343af0bd9f9e1000d95e8721c7f7e1a467e3b340df34f4c
MD5 c32b66b6f09aab237a8de3b532bc61cb
BLAKE2b-256 c25c3b593397a65fed3d59731623f78d3713657eb21c99c56be0006463583a7f

See more details on using hashes here.

File details

Details for the file valohai_yaml-0.55.0-py3-none-any.whl.

File metadata

  • Download URL: valohai_yaml-0.55.0-py3-none-any.whl
  • Upload date:
  • Size: 59.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for valohai_yaml-0.55.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8427cf847cbdd0c24656ed8a6acee4bd57acbf91b6114fee50a6afba2c3f2d54
MD5 2bacad8deda2943fa8fcb005ce881680
BLAKE2b-256 d88b57eb3d0f4c319053468930551729032d6ca32aac0e71396cb394931978aa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page