Skip to main content

WildTorch: Leveraging GPU Acceleration for High-Fidelity, Stochastic Wildfire Simulations with PyTorch

Project description

WildTorch

Hatch project Read the Docs DOI

WildTorch: Leveraging GPU Acceleration for High-Fidelity, Stochastic Wildfire Simulations with PyTorch

Installation

Install with minimal dependencies:

pip install wildtorch

Install with full dependencies (includes visualization and logging):

pip install 'wildtorch[full]'

Quick Start

pip install 'wildtorch[full]'
import wildtorch as wt

wildfire_map = wt.dataset.generate_empty_dataset()

simulator = wt.WildTorchSimulator(
    wildfire_map=wildfire_map,
    simulator_constants=wt.SimulatorConstants(p_continue_burn=0.7),
    initial_ignition=wt.utils.create_ignition(shape=wildfire_map[0].shape),
)

logger = wt.logger.Logger()

for i in range(200):
    simulator.step()
    logger.log_stats(
        step=i,
        num_cells_on_fire=wt.metrics.cell_on_fire(simulator.fire_state).item(),
        num_cells_burned_out=wt.metrics.cell_burned_out(simulator.fire_state).item(),
    )
    logger.snapshot_simulation(simulator)

logger.save_logs()
logger.save_snapshots()

Demo

See Our Live Demo at Hugging Face Space.

API Documents

See at Our Read the Docs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wildtorch-1.0.0b1.tar.gz (22.3 kB view hashes)

Uploaded Source

Built Distribution

wildtorch-1.0.0b1-py3-none-any.whl (16.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page