Registry / ai-ml / hai
library0.4.1pypypi✓ verified 79d ago

hai is a Python utility library developed by Valohai, providing helpers for parallel runs, logging, configuration, and other common infrastructure tasks in ML pipelines. Current version is 0.4.1, with occasional releases.

pip install hai
INSTALL
IMPORT
SIG · HAI
H
hai
ai-mlpythonv0.4.1
Install
1.5s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.4.1 · 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
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ParallelRun
import hai
from hai import ParallelRun

Run a simple parallel task using ParallelRun context manager.

from hai import ParallelRun with ParallelRun() as pr: pr.run(lambda: print('Hello from parallel'))
Debug
Known issues
breakingPython 3.6 support dropped in v0.3.0
fix
Upgrade to Python >=3.7
affects: <0.3.0
gotchaParallelRun context manager requires proper usage; forgetting to use it as context manager can lead to resource leaks.
fix
Always use 'with ParallelRun() as pr:' pattern.
affects: all
Upgrade
Version history
0.4.1latest on PyPI · released Oct 11, 2024
Audit
Dependencies

No dependency data recorded yet.

Agent activity
27 hits · last 30 days
node
22
Amazon
1
OpenAI (training)
1
Resources
hai — pip install hai · libregistry