Wildfire AI Series · Support

Notebook Troubleshooting

Setup notes, environment variables, expected outputs, and the most common errors you might hit when running the QWRA pipeline locally or in Google Colab.

← Back to Wildfire AI Series

Repository path

The notebooks read the SP&L wildfire datasets out of the Dynamic Network Model repository. Set DNM_REPO_ROOT before running cells so the loaders know where to look.

import os os.environ["DNM_REPO_ROOT"] = "/path/to/Dynamic-Network-Model"

Default search path for local development is /Users/2agents/Projects/Dynamic-Network-Model. On any other machine, set the env var explicitly.

Required packages

The five notebooks share a small core dependency set. Optional packages enable specific sections.

Core (always required)

pip install pandas numpy scikit-learn pyarrow

Optional (graceful fallback)

pip install lightgbm lifelines

Fallback behavior. If lightgbm is unavailable, notebook 01 substitutes HistGradientBoostingClassifier from scikit-learn. If lifelines is unavailable, notebook 03 uses the logistic-horizon fallback instead of Cox proportional hazards. Both fallbacks produce reviewable results.

Google Colab setup

The Open-in-Colab badges on the series landing page launch each notebook against the published GitHub copy. The shared loaders need the DNM repo cloned into the Colab session before the first cell that touches data.

!git clone https://github.com/SGridworks/Dynamic-Network-Model.git import os os.environ["DNM_REPO_ROOT"] = "/content/Dynamic-Network-Model"

Colab sessions disconnect after ~90 minutes of inactivity. If your session expires, re-run the clone cell. The SP&L parquet datasets re-download in seconds.

Output files

Each notebook writes its results into outputs/ beside the notebook. Notebooks 02, 05 depend on outputs from earlier notebooks; they will raise FileNotFoundError if the upstream step has not run.

Notebook Outputs Consumed by
01 Ignition ignition_probability_timeseries.parquet
ignition_probability_by_cause.parquet
02
02 PSPS psps_feeder_priority.parquet
psps_backtest.parquet
03 Vegetation vegetation_trim_schedule.parquet
04 Burn Probability burn_probability.parquet
conditional_flame_length.parquet
05
05 QWRA NVC qwra_asset_nvc.parquet
qwra_feeder_nvc.parquet
qwra_asset_type_nvc.parquet

Notebook order

Three notebooks (01, 03, 04) stand alone. Run them in any order. Two notebooks (02, 05) depend on upstream outputs.

  • Notebook 02 needs ignition_probability_timeseries.parquet from notebook 01.
  • Notebook 05 needs burn_probability.parquet and conditional_flame_length.parquet from notebook 04.

If you want the full QWRA pipeline end-to-end on a fresh session, run in this order: 01 → 04 → 05 → 02 → 03.

Common errors

FileNotFoundError: DNM repository not found

Set DNM_REPO_ROOT to the folder containing demo_data/ and sisyphean-power-and-light/. The notebooks check this env var before attempting any data load.

ModuleNotFoundError: No module named '_shared'

Run notebooks from the ml-playground/wildfire/ directory, or keep the _shared/ folder beside the notebook file. Colab handles this automatically when you launch via the badge.

FileNotFoundError: Run 01-ignition-prediction.ipynb first

Notebook 02 expects outputs/ignition_probability_timeseries.parquet from notebook 01. Execute notebook 01 in the same working directory before launching notebook 02.

FileNotFoundError: Run 04-burn-probability.ipynb first

Notebook 05 expects outputs/burn_probability.parquet and outputs/conditional_flame_length.parquet from notebook 04. Notebook 04 takes ~1 second locally; on Colab’s CPU runtime, allow ~5 seconds.

Missing optional package: lifelines

Notebook 03 falls back to logistic horizon models. Install lifelines only if you specifically want the Cox proportional hazards section.

LightGBM segfault on Apple Silicon

Some lightgbm wheels on macOS arm64 fail at import. The notebook automatically falls back to scikit-learn’s HistGradientBoostingClassifier, which is competitive and ships with scikit-learn.

Notebook 04 runtime. The Monte Carlo burn-probability simulator runs 200 fire seasons by default. On a modern laptop this takes ~1 second. On Colab’s default CPU runtime, allow ~5 seconds. To speed it up further, reduce N_SEASONS in the parameter cell; to get tighter BP estimates, increase it.

Still stuck? Open an issue on the SP&L repository or email Adam.