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

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

Uploaded Source

Built Distribution

valohai_yaml-0.31.0-py3-none-any.whl (48.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: valohai_yaml-0.31.0.tar.gz
  • Upload date:
  • Size: 42.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for valohai_yaml-0.31.0.tar.gz
Algorithm Hash digest
SHA256 9ea9c065fd9314f55e12e9803b6c63cd7e1430544c72d4dd6feaccc7d48463b4
MD5 662da9493b29183888441caf4bf8b7d0
BLAKE2b-256 be84a63e9df3907bb4f54b9eed40ba6ec71e19171e41a72bdc467b9cc50b35f4

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for valohai_yaml-0.31.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0893e0e3f73b518de65465aa22ad2f26e0f456d33fa8eb02e09cda0c368bb6df
MD5 75c4d08fe0af106e2b71aefe4d00a998
BLAKE2b-256 91b5afabf81d82000aacddbd0b2b2b0ca8a9221bbb06331670ea51728783a0b5

See more details on using hashes here.

Provenance

Supported by

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