tinyhumansai/openhuman · error

tokenjuice.ml_compression_enabled is false

Error message

tokenjuice.ml_compression_enabled is false

What it means

ensure_kompress's precondition check found tokenjuice.ml_compression_enabled = false — the caller asked for the Kompress runtime while the feature flag that owns it is off. Deliberate opt-out, not a provisioning failure.

Source

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

        })
        .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
        .with_context(|| format!("creating kompress hf home {}", hf.display()))?;

    log::info!(

View on GitHub (pinned to 7491200858)

Solutions

  1. Set tokenjuice.ml_compression_enabled = true if ML compression is wanted
  2. Avoid the code path that requests Kompress compression
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/runtime/python_server/kompress.rs:109 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/4aa80f89fd7fc73d. Report an issue: GitHub.