Metadata-Version: 2.3
Name: wildtorch
Version: 1.0.0b1
Summary: WildTorch: Leveraging GPU Acceleration for High-Fidelity, Stochastic Wildfire Simulations with PyTorch
Project-URL: Documentation, https://github.com/xiazeyu/WildTorch#readme
Project-URL: Issues, https://github.com/xiazeyu/WildTorch/issues
Project-URL: Source, https://github.com/xiazeyu/WildTorch
Author-email: Zeyu Xia <i@xiaze.pro>
License: MIT License
        
        Copyright (c) 2024 Zeyu Xia
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: GPU
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
Requires-Python: >=3.8
Requires-Dist: einops>=0.7.0
Requires-Dist: torch>=2.0.0
Requires-Dist: torchvision>=0.15.1
Provides-Extra: full
Requires-Dist: datasets>=2.11.0; extra == 'full'
Requires-Dist: einops>=0.7.0; extra == 'full'
Requires-Dist: gradio>=4.25.0; extra == 'full'
Requires-Dist: imageio[pyav]>=2.31.1; extra == 'full'
Requires-Dist: matplotlib>=3.7.1; extra == 'full'
Requires-Dist: numpy>=1.25.0; extra == 'full'
Requires-Dist: pandas>=2.0.0; extra == 'full'
Requires-Dist: tensorboard>=2.12.1; extra == 'full'
Requires-Dist: torch>=2.0.0; extra == 'full'
Requires-Dist: torchvision>=0.15.1; extra == 'full'
Description-Content-Type: text/markdown

# WildTorch

[![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch)
[![Read the Docs](https://readthedocs.org/projects/wildtorch/badge/)](https://wildtorch.readthedocs.io/)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10968647.svg)](https://doi.org/10.5281/zenodo.10968647)

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

### Installation

Install with minimal dependencies:

```shell
pip install wildtorch
```

Install with full dependencies (includes visualization and logging):

```shell
pip install 'wildtorch[full]'
```

### Quick Start

```shell
pip install 'wildtorch[full]'
```

```python
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](https://xiazeyu-wildtorch.hf.space/).

### API Documents

See at Our [Read the Docs](https://wildtorch.readthedocs.io/).
