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

Uploaded Source

Built Distribution

valohai_yaml-0.42.0-py3-none-any.whl (55.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: valohai_yaml-0.42.0.tar.gz
  • Upload date:
  • Size: 52.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for valohai_yaml-0.42.0.tar.gz
Algorithm Hash digest
SHA256 8d1621a033ed8b1d494add1b7ad36a2c10ecfe9cc2d3717f8bdaa683aea9e3d9
MD5 a2ff7e3a69518e2f902ed10be801edf9
BLAKE2b-256 e160698645b841c6997912a1f792788fb07ea1519208f250f28b2e050584b70f

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for valohai_yaml-0.42.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1aa54ef14f82dd536ba18fb32ba406d110765da533807ef8945f1e4054fda8cc
MD5 8736e837b64eccaa0d54fb0ac2a8fa3f
BLAKE2b-256 927016815e3936c5cd55b4bd44b527525616988ee8efc53a53d7be8faa7a7b67

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