Skip to content

Latest commit

 

History

History
80 lines (64 loc) · 2.23 KB

README.md

File metadata and controls

80 lines (64 loc) · 2.23 KB

Jet Leg Learn

This repository contains the dataset generation and network training code for the stability margin network detailed in the work of Orsolino. et al. 2021.

Setup

This guide assumes that $PROJECT_ROOT refers to the absolute path to this repository.

Installing and Setting Up Virtual Environment

To setup a virtual environment inside the project directory:

sudo apt install -y python-venv
python -m venv $PROJECT_ROOT/venv
source $PROJECT_ROOT/venv/bin/activate

Now, you are ready to use the virtual environment. To install the dependencies related to this project, make sure you activate the environment and then run:

cd $PROJECT_ROOT/jet_leg_common
pip install -e .

And then

cd $PROJECT_ROOT
pip install -e .

Data Generation

If everything went well, you should be able to run the data generation script data_generation/stability_margin.py, assuming you have activated the virtual environment, like so:

cd $PROJECT_ROOT/scripts
python data_generation/stability_margin.py

If you want to generate a large amount of data, run

cd $PROJECT_ROOT/scripts/data_generation
./repeat_generation.sh

The script will repeatedly run the data generating script data_generation/stability_margin.py. This avoids running the data generating script once with a large amount of data, filling up the RAM in the process. The generated dataset will be stored in the $PROJECT_ROOT/data directory.

Training

After generating the training dataset, you can start the training using the script training/stability_margin.py:

cd $PROJECT_ROOT/scripts
python training/stability_margin.py

Deployment

Use the script utility/model_to_txt_converter.py to save the trained model parameters to a txt file for use with the custom C++ MLP implementation:

cd $PROJECT_ROOT/scripts
python utility/model_to_txt_converter.py

Author(s)

Installation Errors

You might need to set the PYTHONPATH to your Conda environment's site-packages

export PYTHONPATH=/path/to/miniconda3/envs/your-env/lib/pythonX.Y/site-packages