Skip to main content

Tools for processing and evaluating anemoi based EAGLE ML models.

Project description

eagle-tools

Tools for processing and evaluating anemoi based EAGLE ML models

⚠️ Disclaimer ⚠️

This package is pip-installable, but it is more in the form of research code rather than well-documented and tested software. There are likely better and more efficient ways to accomplish the main functionality of this package, but this gets the job done.

Installation

For more discussion on installing the right versions of torch and flash-attention, see this discussion.

Install as a user

Since some dependencies are only available on conda, it's recommended to create a conda environment for all dependencies. Note that this package is not (yet) available on conda, but it can still be installed via pip.

Note also that the module load statements are for working on Perlmutter, and would need to be changed for different machines.

module load cudnn nccl
conda create -n eagle -c conda-forge python=3.12 ufs2arco
conda activate eagle
pip install git+https://github.com/timothyas/xmovie.git@feature/gif-scale
pip install anemoi-datasets anemoi-graphs anemoi-models anemoi-training[azure] anemoi-inference anemoi-utils anemoi-transform
pip install eagle-tools
pip install "torch<2.7" torchvision
pip install --no-cache-dir --no-build-isolation flash-attn==2.7.4.post1
pip install "mlflow-skinny<3.0"

Note that it is no longer necessary to module load gcc since gcc-native is a loaded default. Also, it is possible to install ufs2arco without mpich as detailed here, since this may be necessary to hook up to prebuilt MPI distributions on different HPC machines.

Install as a developer (Perlmutter example)

It is sometimes necessary to install anemoi, ufs2arco, and eagle-tools repos so that they are modifiable. This requires a slightly different path than the one outlined above. The following are steps that worked on Perlmutter on Dec 9, 2025. Unfortunately some packages (e.g. flash-attn, torch) through different errors based on how the machine is configured, so your mileage may vary.

Note that here we set the environment repo_path, which assumes that all repositories are located in that location. This will need to be changed as necessary based on your repo locations. Also, developers may not need to install editable versions of every single repo as is done here, it's up to you.

module load cudnn nccl
export repo_path=$HOME
conda create -n eagle -c conda-forge python=3.12 xesmf esmf=*=nompi* jupyter seaborn
conda activate eagle
MPICC="cc -shared" pip install --force --no-cache-dir --no-binary=mpi4py mpi4py
pip install git+https://github.com/timothyas/xmovie.git@feature/gif-scale
pip install -e $repo_path/anemoi-utils
pip install -e $repo_path/anemoi-transform
pip install -e $repo_path/anemoi-datasets
pip install -e $repo_path/anemoi-core/graphs
pip install -e $repo_path/anemoi-core/models
pip install -e $repo_path/anemoi-core/training[azure]
pip install -e $repo_path/anemoi-core/inference
pip install -e $repo_path/ufs2arco
pip install -e $repo_path/eagle-tools
pip install "torch<2.7" torchvision
pip install --no-cache-dir --no-build-isolation flash-attn==2.7.4.post1
pip install "mlflow-skinny<3.0"

Usage

This provides the following functionality. Note that each command uses a configuration yaml, and documentation of the yaml contents can be found by running eagle-tools <command> --help. For example, one can run eagle-tools inference --help to get documentation.

Inference

Run anemoi-inference over many initial conditions

eagle-tools inference config.yaml

Averaged Error Metrics

Compute Root Mean Squared Error (RMSE) and Mean Absolute Error (MAE), preserving the initial condition dimension (t0).

eagle-tools metrics config.yaml

Spatial Error Metrics

Compute the spatial distribution of RMSE and MAE for each lead time. By default, these are averaged over all initial conditions used.

eagle-tools spatial config.yaml

Power Spectra

Compute the power spectrum, averaged of initial conditions.

eagle-tools spectra config.yaml

Visualize Predictions Compared to Targets

Make figures or movies, showing the targets and predictions. Note that the argument end_date has different meanings for each. For figures, end_date is the date plotted, whereas for movies, all timestamps between start_date and end_date get shown in the movie.

eagle-tools figures config.yaml
eagle-tools movies config.yaml

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

eagle_tools-0.6.1.tar.gz (40.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eagle_tools-0.6.1-py3-none-any.whl (44.8 kB view details)

Uploaded Python 3

File details

Details for the file eagle_tools-0.6.1.tar.gz.

File metadata

  • Download URL: eagle_tools-0.6.1.tar.gz
  • Upload date:
  • Size: 40.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for eagle_tools-0.6.1.tar.gz
Algorithm Hash digest
SHA256 7b3ca73a87ebf03a9cf397267edeb4a40026d74c785a112520677f56eb02fdf3
MD5 ff314f49984d06d31264f1ecb277f9d2
BLAKE2b-256 bb3c04e7fa5760c51f9439898aa8c82ad7d2521e65879b8925792439254cb179

See more details on using hashes here.

Provenance

The following attestation bundles were made for eagle_tools-0.6.1.tar.gz:

Publisher: publish.yaml on NOAA-PSL/eagle-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eagle_tools-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: eagle_tools-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 44.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for eagle_tools-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5e97d2a96e33b1d6b93fb1c43ddbddd3856840ca735f8f656f385f7d70c7e64a
MD5 7d19bc1de38d58ce7e5fa5b33e0002ef
BLAKE2b-256 5beaa4ed10b43883067231ddd4aecc62752b6f8b4dbf3a0b34263727b0a62306

See more details on using hashes here.

Provenance

The following attestation bundles were made for eagle_tools-0.6.1-py3-none-any.whl:

Publisher: publish.yaml on NOAA-PSL/eagle-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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