Valohai PAPI

raw JSON →
0.1.3 verified Fri May 01 auth: no python

Experimental imperative Valohai pipeline API for building and executing machine learning pipelines. Current version 0.1.3, requires Python >=3.6.1, <4.0.0. This library is in early development with frequent breaking changes.

pip install valohai-papi
error ModuleNotFoundError: No module named 'papi'
cause Incorrect import path; tried `import papi` instead of `from valohai.papi import ...`
fix
Use from valohai.papi import pipeline
error ImportError: cannot import name 'pipeline' from 'valohai.papi'
cause Mismatched version where the `pipeline` symbol does not exist or was renamed.
fix
Upgrade/downgrade to a compatible version or check the installed package version and documentation.
breaking The API is experimental and subject to breaking changes between minor versions. Do not rely on internal modules or undocumented functions.
fix Pin to exact version and test after upgrades.
gotcha The import path is `valohai.papi`, not `papi` or `valohai_papi`. The package name on PyPI uses hyphens, but Python modules use dots.
fix Use `from valohai.papi import pipeline`.
deprecated The `@pipeline` decorator may change or be replaced as the API evolves. Check documentation for the latest approach.
fix Monitor the GitHub repository for deprecation notices.

Define and run a simple Valohai pipeline using the decorator.

from valohai.papi import pipeline

@pipeline
def my_pipeline(message: str) -> None:
    print(f"Hello {message}")

if __name__ == "__main__":
    my_pipeline(message="world")