This web app is for interactively visualising the attention heads of the weather forecasting machine learning model, Pangu-Weather.
Please download the pre-trained models (~1.1GB each) from Google drive or Baidu netdisk:
- The 1-hour model (pangu_weather_1.onnx): Google drive/Baidu netdisk
- The 3-hour model (pangu_weather_3.onnx): Google drive/Baidu netdisk
- The 6-hour model (pangu_weather_6.onnx): Google drive/Baidu netdisk
- The 24-hour model (pangu_weather_24.onnx): Google drive/Baidu netdisk
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
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
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