{"id":23836,"library":"hai","title":"hai - Valohai toolbelt library","description":"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.","status":"active","version":"0.4.1","language":"python","source_language":"en","source_url":"https://github.com/valohai/hai","tags":["valohai","toolbelt","parallel","utilities"],"install":[{"cmd":"pip install hai","lang":"bash","label":"Install latest"}],"dependencies":[],"imports":[{"note":"Top-level import is the correct pattern since hai v0.3+","wrong":"from hai.parallel import ParallelRun","symbol":"ParallelRun","correct":"from hai import ParallelRun"},{"note":"Commonly accessed submodule","wrong":null,"symbol":"util","correct":"from hai import util"}],"quickstart":{"code":"from hai import ParallelRun\n\nwith ParallelRun() as pr:\n    pr.run(lambda: print('Hello from parallel'))","lang":"python","description":"Run a simple parallel task using ParallelRun context manager."},"warnings":[{"fix":"Upgrade to Python >=3.7","message":"Python 3.6 support dropped in v0.3.0","severity":"breaking","affected_versions":"<0.3.0"},{"fix":"Always use 'with ParallelRun() as pr:' pattern.","message":"ParallelRun context manager requires proper usage; forgetting to use it as context manager can lead to resource leaks.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install hai'","cause":"Library not installed or installed in wrong environment.","error":"ModuleNotFoundError: No module named 'hai'"},{"fix":"Use 'from hai import ParallelRun' instead of 'from hai.parallel import ParallelRun'","cause":"Trying to import from old module path.","error":"AttributeError: module 'hai' has no attribute 'ParallelRun'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}