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

Uploaded Source

Built Distribution

valohai_yaml-0.37.0-py3-none-any.whl (53.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for valohai_yaml-0.37.0.tar.gz
Algorithm Hash digest
SHA256 f3b0b61c54067f82b2b00fefafb792cb9b30e5125aa7178a1413c7113dfd8f0d
MD5 7e5f1d55222c3b1f830084a8323456ff
BLAKE2b-256 b9d5ad407e68f6082e29c202c19b38ac31111efa35bf9813251edf08557cd3ad

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for valohai_yaml-0.37.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2ad49407197dbb72fabb39387f25791757eedb368c090edd82ba4bb94abf8a58
MD5 632bab661ff2c031b59a0eeae68c708a
BLAKE2b-256 afcee92702482b65482831a2e8a42a1c1bbeab8180acead26bbaf1038863693d

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