Automated and Parallel Library for Neural Operators Research
Project description
HyperNOs Documentation
Introduction
HyperNOs is a Python project focused on the implementation of completely automatic, distributed and parallel neural operators hyperparameter optimization. The project aims to provide a framework for training neural operator models using Pytorch and Ray Tune for hyperparameter tuning. The library is designed to be highly flexible, making it easy to use with any kind of model and dataset. In the context of Neural Operators, where architecture design is still an active area of research, performing extensive hyperparameter optimization is crucial to obtain state-of-the-art results.
For a more detailed explanation of the library and its capabilities, please refer to our article: HyperNOs: Automated and Parallel Library for Neural Operators Research.
Supported Libraries
HyperNOs allows users to easily integrate and use models from popular neural-operator libraries or custom models. Is also very flexible and can be used with many different datasets.
I already implemented some examples of usage with the following popular libraries:
- NeuralOperator: Implement neural operator architectures like FNO, SFNO, TFNO, UNO, UQNO, GINO, FNOGNO, LocalNO, RNO, CODANO, OTNO.
- DeepXDE: Implement operator learning models like DeepONet, MIONet, POD-DeepONet, POD-MIONet.
You can find examples of how to use these models in the hypernos/examples directory with two dedicated subdirectories: deepxde_lib and neuralop_lib. There are implemented examples both for training a given architecture and for hyperparameter optimization routines.
Visualization website
The project also includes a visualization website: (https://hypernos.streamlit.app) that allows users to visualize the results obtained with HyperNOs library.
Installation
To set up the HyperNOs project, follow these steps:
-
Clone the repository:
git clone --depth=1 https://github.com/MaxGhi8/HyperNOs.git cd HyperNOs
-
Install the required dependencies. It is recommended to create a virtual environment before installing the dependencies; I personally use
pyenv(but others, likeuv, are fine) and Python version3.12.7for this purpose:pyenv install 3.12.7 pyenv virtualenv 3.12.7 hypernos pyenv activate hypernos
Install in editable mode
pip install -e .
Installing the package makes it available as `hypernos` across your system and sets up the `hypernos-run` command. > [!WARNING] > For PyTorch, more attention may be needed during installation. We highly recommend following the [official documentation](https://pytorch.org/get-started/locally/) to install the correct version for your system (e.g., matching your CUDA version). -
Download the dataset using the
download_data.shscript:./download_data.sh
[!WARNING] Only for Windows I recommend to install WSL. Then open the WSL terminal and navigate where you have installed the HyperNOs library
cd /mnt/c/Users/<your_user>/<your_path_to_HyperNOs>
and then try to run the program with
./download_data.shif you get an error like/bin/bash^M: bad interpreter. No such file or directorythis can be due toCRandLFin Windows. In this case try to run the following line and then rerun the program.sed -i -e 's/\r$//' download_data.sh ./download_data.sh
-
Download pre-trained models (optional):
git clone --depth=1 https://github.com/MaxGhi8/tests
The previous repository contains the Tensorboard support for every model, the information about the training and the architecture's hyperparameters chosen. Then you can download running the following script and select the model that you want to download:
./download_trained_model.sh
[!WARNING] As before, for Windows, if you are on WSL and get the error
/bin/bash^M: bad interpreter. No such file or directorytry to runsed -i -e 's/\r$//' download_trained_model.shand then rerun the script./download_trained_model.sh.
Usage
After installation, you can run the provided examples in the neural_operators/examples directory.
Interactive Tutorials
We provide interactive Jupyter Notebooks in the notebook/ directory to help you get started:
- Training Tutorial: Learn how to train a Neural Operator.
- Ray Tune Tutorial: Learn how to tune hyperparameters of a Neural Operator.
Basic Training
To train a model (e.g., FNO) on a single machine, simply run the corresponding python script:
cd neural_operators/examples/
python train_fno.py
Python API
You can now import HyperNOs directly in your own scripts:
import torch
from hypernos.examples.train_fno import train_fno
# Run a training session
train_fno("poisson", "best", "L2")
Hyperparameter Optimization with Ray Tune
You can use Ray Tune to optimize hyperparameters.
Local Machine
To run Ray Tune on your local machine, first start a Ray head node:
ray start --head
Then run the Ray script:
cd neural_operators/examples/
python ray_fno.py
Cluster (Slurm)
For running on a cluster using Slurm, refer to SLURM_USAGE.md for instructions on using template.slurm.
Citation
If you use our library please consider citing our paper:
@misc{ghiotto2025hypernosautomatedparallellibrary,
title={HyperNOs: Automated and Parallel Library for Neural Operators Research},
author={Massimiliano Ghiotto},
year={2025},
eprint={2503.18087},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2503.18087},
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hypernos-0.1.0.tar.gz.
File metadata
- Download URL: hypernos-0.1.0.tar.gz
- Upload date:
- Size: 38.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9de9651388c3025537d2bf0f32936fc5cbf834fcec19e1fd14f08a8e4aee6f4f
|
|
| MD5 |
a757985f750acf9dd1402e95273dee8d
|
|
| BLAKE2b-256 |
75d1cf36571e994e65b231ae68eff6b687afb8e8092bb588c36d433636f28c91
|
Provenance
The following attestation bundles were made for hypernos-0.1.0.tar.gz:
Publisher:
publish.yml on MaxGhi8/HyperNOs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hypernos-0.1.0.tar.gz -
Subject digest:
9de9651388c3025537d2bf0f32936fc5cbf834fcec19e1fd14f08a8e4aee6f4f - Sigstore transparency entry: 1148098066
- Sigstore integration time:
-
Permalink:
MaxGhi8/HyperNOs@41423afe7d0f9266be13457fb662a5c8ce8dd848 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/MaxGhi8
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@41423afe7d0f9266be13457fb662a5c8ce8dd848 -
Trigger Event:
release
-
Statement type:
File details
Details for the file hypernos-0.1.0-py3-none-any.whl.
File metadata
- Download URL: hypernos-0.1.0-py3-none-any.whl
- Upload date:
- Size: 37.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d93b89163b5373a2346eea8446ad12fafa14411c001eaf27341120a513d2a4d6
|
|
| MD5 |
6aeb1feec59c7a9bd078762051316ad7
|
|
| BLAKE2b-256 |
13cdcb2e4f78f85f67cf19581292cb7290a9d28c263cee2599a76f25df1b296d
|
Provenance
The following attestation bundles were made for hypernos-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on MaxGhi8/HyperNOs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hypernos-0.1.0-py3-none-any.whl -
Subject digest:
d93b89163b5373a2346eea8446ad12fafa14411c001eaf27341120a513d2a4d6 - Sigstore transparency entry: 1148098094
- Sigstore integration time:
-
Permalink:
MaxGhi8/HyperNOs@41423afe7d0f9266be13457fb662a5c8ce8dd848 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/MaxGhi8
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@41423afe7d0f9266be13457fb662a5c8ce8dd848 -
Trigger Event:
release
-
Statement type: