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
pip install -e . -r requirements-test.txt pre-commit
pre-commit install

# run linting and type checks
pre-commit run --all-files

# run tests
pytest

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

Uploaded Source

Built Distribution

valohai_yaml-0.29.1-py3-none-any.whl (46.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: valohai_yaml-0.29.1.tar.gz
  • Upload date:
  • Size: 40.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.29.1.tar.gz
Algorithm Hash digest
SHA256 2843cdc4078922c9e085ceed62f8e05e09d30a4898839bd71bc5e763dd172185
MD5 db43cddcbee15394ac6bd8a229dac308
BLAKE2b-256 84ca0383f95843f3c1f4aae01b74c994335ebf062d4fce31de1b8fea7a6f14ee

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for valohai_yaml-0.29.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f8592baeaa9d20de4f45404b774455b1cea76c10dfe265009d9992b09a310899
MD5 c8074a4d312efff4c12ba6cb5ab08621
BLAKE2b-256 8146f2a62903e5115261a9118f6b9e6d13f503dd9a2f7f20e061ef156419d87d

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