tinyhumansai/openhuman · error

runtime_python disabled — cannot provision Kompress

Error message

runtime_python disabled — cannot provision Kompress

What it means

ensure_kompress's precondition check found runtime_python.enabled = false: the Kompress venv cannot be provisioned because no base Python interpreter is available. A config gate reached before any provisioning work starts.

Source

Thrown at src/openhuman/runtime/python_server/kompress.rs:106

            } else {
                '_'
            }
        })
        .collect();
    venv_dir.join(format!(".openhuman-kompress-ready-{safe_model}"))
}

/// Cheap, network-free probe: are torch + transformers + the model provisioned?
pub fn kompress_provisioned(config: &Config) -> bool {
    let venv = kompress_venv_dir(config);
    marker_path(&venv, &config.tokenjuice.ml_model_id).exists() && venv_python_path(&venv).exists()
}

/// Ensure a dedicated Kompress venv exists (torch + transformers + model).
pub async fn ensure_kompress(config: &Config) -> Result<KompressRuntime> {
    let _guard = provision_lock().await.lock().await;
    if !config.runtime_python.enabled {
        bail!("runtime_python disabled — cannot provision Kompress");
    }
    if !config.tokenjuice.ml_compression_enabled {
        bail!("tokenjuice.ml_compression_enabled is false");
    }

    let venv_dir = kompress_venv_dir(config);
    let venv_python = venv_python_path(&venv_dir);
    let hf = hf_home(config);

    if marker_path(&venv_dir, &config.tokenjuice.ml_model_id).exists() && venv_python.exists() {
        return Ok(KompressRuntime {
            python_bin: venv_python,
            hf_home: hf,
        });
    }

    tokio::fs::create_dir_all(&hf)
        .await

View on GitHub (pinned to 7491200858)

Solutions

  1. Enable runtime_python in config to allow provisioning
  2. Disable tokenjuice.ml_compression_enabled if ML compression is not needed
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/runtime/python_server/kompress.rs:106 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/654d7d30c0e61107. Report an issue: GitHub.