Skip to content

Web app for interactively visualising the attention patterns of the Pangu-Weather model

Notifications You must be signed in to change notification settings

LewisLee26/Pangu-Weather-Attention-Head-Visualisation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Summary

This web app is for interactively visualising the attention heads of the weather forecasting machine learning model, Pangu-Weather.

Set Up

Download Model

Please download the pre-trained models (~1.1GB each) from Google drive or Baidu netdisk:

Create environment

This project uses Conda to manage the Python packages. Run the following bash commands to set up and activate the Conda enviroment used for the data preparation Python scripts listed below. The Conda environment is not required for hosting the web app.

conda env create -f requirements.yml
conda activate pangu-weather-att-head-vis

Preprocess Data

With the environment activated, run the preprocess_data.py script which downloads the pangu data, runs the models to extract the intermidate activations, and formats the data into binaries for the web app.

Read more about how to set up the data at preprocess_data.md.

python scripts/preprocess_data.py --start_date 2018-01-01 --end_date 2018-01-05

Host Web App

The web app can be hosted locally for easy access once all of the data has been formated correctly. By default, the web app can be access from http://localhost:8000/main.html.

python -m http.server --directory src

About

Web app for interactively visualising the attention patterns of the Pangu-Weather model

Resources

Stars

Watchers

Forks