Welcome to PILOT, a hands-on framework for training and benchmarking physics-informed neural operators.
While the documentation is still a work in progress, a detailed explanation of most modules in the source code can be found in docs/PILOT.pdf.
In your machine's terminal, enter the folder in which you wish to download the repository and run the
git clone https://github.com/NikTimes/PILOT.gitContinue by accessing the folder using your terminal by running:
cd PILOT The PILOT framework was built using python version 3.12. While previous versions are probably compatible with the framework it is recommended that you build a new virtual environment containing python >= 3.12 to ensure compatibility. If you wish to download it in an already existing virtual environment, activate it and run:
pip install -e .If you wish to create a new virtual environment to install PILOT follow any of the following subchapters:
If using Conda run the following command:
conda create -n pilot python=3.12Activate it:
conda activate pilotThen install PILOT
pip install -e .Create the environment:
python -m venv .venvIf using Linux or macOS activate environment using:
source .venv/bin/activateIf using windows:
.venv\Scripts\activateThen install
pip install -e .Install pyenv:
brew install pyenv pyenv-virtualenvInstall a Python version:
pyenv install 3.12.0Create a virtual environment:
pyenv virtualenv 3.12.0 pilotActivate it:
pyenv activate pilotThen install the project:
pip install -e .All experiments shown in docs/PILOT.pdf can be found in the experiments/ directory.
Each file is named according to the physical system we aimed to train an operator for. If the
file name contains the word naive that means the resulting operator was trained without using
Physics Information. The opposite is true if it contains the word PINNS.
Each experiment contains three files:
- Sweep configuration (where applicable)
- Operator trainer of best sweep configuration.
- Benchmarking of trained Operator.
Any file named *_sweep.py contains examples of hyperparameter sweeps carried out using PILOT.
Note that in order to run these sweep files, the user must have an account with Weights & Biases. Each sweep may take from several minutes to hours depending on the machine and configuration. As such, these files are primarily intended as code examples and templates for reproducible experimentation rather than as scripts to be executed directly without modification.
The configurations that yielded the best results after running *_sweep.py were subsequently used in separate *.ipynb training notebooks. These notebooks save the resulting model weights in the /weights directory.
Files named *_benchmark.ipynb contain full benchmarking workflows for evaluating the learned operator using PILOT and the saved weights in /weights. These notebooks are the recommended entry point for verifying that the codebase is functioning correctly.
Note, that in order to use the jupyter notebooks in an interface such as spyder you need to ensure that you have the required packages to support it. In the case of spyder you can follow how to use notebook instructions here: https://pypi.org/project/spyder-notebook/