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

Uploaded Python 3

File details

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

File metadata

  • Download URL: valohai_yaml-0.57.0.tar.gz
  • Upload date:
  • Size: 75.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","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.57.0.tar.gz
Algorithm Hash digest
SHA256 f8497344482c8c3c5c8da465cae3b8df6fb3b7fc28930c29949620637b784eb8
MD5 1204b6c366a8119196e975cbb1eea6c9
BLAKE2b-256 d0b06699502ecc69ad9d9c9ad8e5f53eaadcb9c57cd9dcfce2ed4a05eae5f7ca

See more details on using hashes here.

File details

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

File metadata

  • Download URL: valohai_yaml-0.57.0-py3-none-any.whl
  • Upload date:
  • Size: 60.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","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.57.0-py3-none-any.whl
Algorithm Hash digest
SHA256 14cff96329907bde72909a01d11a7b32d799101adbe994f68a20960c3bc17281
MD5 97feed84e08941acafb6b0887663ba4a
BLAKE2b-256 fd49bbd11b30c0e68f04c11e576e041fe23fd69f4b4fbf7807c9d68325239448

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