Install & Compatibility
Where this runs
tested against v0.7.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 1.138s · 28.2MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 3.2s · import 1.050s · 29MB
27MB installed
● package 27MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
valohai
✓ import valohai
✗ import valohai_utils
valohai-utils is the PyPI package, but importable as valohai
task_context
✓ from valohai import task_context
✗ from valohai.utils import task_context
Renamed in older versions; always use valohai.task_context
Inputs
✓ from valohai.internals.inputs import Inputs
✗ from valohai import Inputs
Inputs helper is in internals submodule, not direct import
Minimal Valohai pipeline step using task_context for input/output management.
import valohai
from valohai import task_context
if __name__ == '__main__':
with task_context() as ctx:
# Access input files
for file_path in ctx.inputs['dataset']:
print(f"Processing {file_path}")
# Write outputs
for output_name in ctx.outputs:
ctx.write_output(output_name, data=[], output_path='/some/path')
valohai --version
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'valohai'
The import is 'valohai' not 'valohai_utils'. The package is installed as valohai-utils but import uses valohai.
fixInstall valohai-utils (pip install valohai-utils) then use 'import valohai'.
KeyError: 'dataset' when accessing ctx.inputs['dataset']
The input name in code does not match the key defined in valohai.yaml inputs section.
fixEnsure the input key in valohai.yaml matches exactly: e.g., inputs: [name: dataset] then code uses ctx.inputs['dataset'].
Upgrade
Version history
0.7.0latest on PyPI · released Mar 21, 2025
Audit
Dependencies
valohairequiredCore client library for Valohai API interactions
clickoptionalCommand-line interface framework