Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Environment:Interpretml Interpret Visualization Environment

From Leeroopedia


Knowledge Sources
Domains Visualization, Infrastructure
Last Updated 2026-02-07 12:00 GMT

Overview

Optional visualization environment requiring Plotly, Dash, and IPython/Jupyter dependencies for rendering interactive EBM explanations.

Description

This environment defines the optional dependencies needed to visualize EBM explanations interactively. The visualization stack has two tiers: Plotly (required for any `.visualize()` calls, producing interactive charts) and Dash (required for the dashboard server that displays multiple explanations). The system also auto-detects the execution environment (Jupyter notebook, Colab, Databricks, Azure ML, VS Code, etc.) to choose the appropriate rendering strategy. A bundled JavaScript file (`interpret-inline.js`) provides inline notebook visualization without requiring a running server.

Usage

Use this environment when calling `show()`, `preserve()`, or any visualization method on EBM explanations. The Plotly extra is needed for any chart rendering. The Dash extra is needed only for the interactive dashboard that compares multiple explanations. Notebook extras are needed for inline rendering in Jupyter environments.

System Requirements

Category Requirement Notes
OS Any (same as core) Visualization is OS-independent
Browser Modern web browser Required for Dash dashboard; Plotly renders inline in notebooks
Network Optional Dashboard server binds to localhost; no internet required for inline vis

Dependencies

Python Packages (Plotly Extra)

  • `plotly` >= 3.8.1

Python Packages (Notebook Extra)

  • `ipykernel` >= 4.10.0
  • `ipython` >= 5.5.0

Python Packages (Dash Extra)

  • `dash` >= 2.0.0, < 3.0.0
  • `dash-cytoscape` >= 0.1.1
  • `gevent` >= 1.3.6
  • `requests` >= 2.19.0

Python Packages (Excel Export Extra)

  • `Xlsxwriter` >= 3.0.1
  • `dotsi` >= 0.0.3
  • `seaborn` >= 0.13.2
  • `matplotlib` >= 3.9.1

Credentials

No credentials are required for visualization.

Quick Install

# Install with Plotly support (charts)
pip install interpret-core[plotly]

# Install with Dash support (interactive dashboard)
pip install interpret-core[dash]

# Install with notebook support
pip install interpret-core[notebook]

# Install with Excel export support
pip install interpret-core[excel]

# Install the full interpret package (includes all visualization extras)
pip install interpret

Code Evidence

Environment auto-detection from `python/interpret-core/interpret/provider/_environment.py:147-162`:

class EnvironmentDetector:
    def __init__(self):
        self.checks = {
            "docker-dev-mode": _is_docker_development_mode,
            "databricks": _detect_databricks,
            "vscode": _detect_vscode,
            "azure": _detect_azure_notebook,
            "azureml": _detect_azureml,
            "kaggle": _detect_kaggle,
            "sagemaker": _detect_sagemaker,
            "binder": _detect_binder,
            "colab": _detect_colab,
            "ipython-zmq": _detect_ipython_zmq,
            "ipython": _detect_ipython,
            "azuresynapse": _detect_azure_synapse,
        }

Cloud vs non-cloud classification from `python/interpret-core/interpret/provider/_environment.py:118-144`:

non_cloud_env = [
    "ipython-zmq",
    "ipython",
    "vscode",
]
cloud_env = [
    "databricks",
    "azure",
    "azureml",
    "kaggle",
    "sagemaker",
    "binder",
    "colab",
    "azuresynapse",
]

Dash version constraint from `python/interpret-core/setup.py:268-273`:

"dash": [
    "dash>=2.0.0,<3.0.0",
    "dash-cytoscape>=0.1.1",
    "gevent>=1.3.6",
    "requests>=2.19.0",
],

Common Errors

Error Message Cause Solution
`ImportError: No module named 'plotly'` Plotly not installed `pip install interpret-core[plotly]`
`ImportError: No module named 'dash'` Dash not installed `pip install interpret-core[dash]`
Dashboard not rendering in notebook Wrong environment detected Check `EnvironmentDetector().detect()` output
Tables not rendering in Dash Known Dash rendering bug Workaround included in code (hidden empty DataTable)

Compatibility Notes

  • Jupyter Notebook: Full inline rendering via `interpret-inline.js` bundle and IPython display.
  • Google Colab: Detected via `import google.colab`. Uses inline rendering.
  • Databricks: Detected via `DATABRICKS_RUNTIME_VERSION` env var. Uses inline rendering.
  • Azure ML: Detected via `/mnt/azmnt/.nbvm` file or `AZUREML_NB_PATH` env var.
  • VS Code: Detected via `VSCODE_PID` env var.
  • SageMaker: Detected via `SM_NUM_CPUS` env var.
  • Kaggle: Detected via `/kaggle/input` directory existence.
  • Dash < 3.0.0: Upper bound constraint exists; Dash 3.x is not yet supported.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment