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.56.0.tar.gz (75.4 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.56.0-py3-none-any.whl (60.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: valohai_yaml-0.56.0.tar.gz
  • Upload date:
  • Size: 75.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","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.56.0.tar.gz
Algorithm Hash digest
SHA256 e94097f05b068fd8f6191fd3cd18410e5654a3de73cdb430b9d6bccbad69615f
MD5 5cac20c463de975387bce0cb8a253d80
BLAKE2b-256 bceb675419e5d32b64700aa8dc037e931a77669933f782f8c3bfcb4d7bf4e1f0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: valohai_yaml-0.56.0-py3-none-any.whl
  • Upload date:
  • Size: 60.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","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.56.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e219040c791410a9b4636b107f19f2da384b6b6e9455e91123391cde0cb7617f
MD5 9b3c22a69b1bad1eb313aaa43b00fa01
BLAKE2b-256 58cb9705af5c770726de9e678918f253f0e8796b0855b771934517e3d8878291

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