Usage Guide

This guide explains the primary ways to run experiments using the Ensemble Genetic Algorithm project.



Alternative: Programmatic Usage with the Example Notebook

For development, debugging, or a more interactive walkthrough, you can use the example_usage.ipynb notebook. This notebook provides a script-based implementation of the same workflow orchestrated by main.py. See the Example Usage Notebook Guide guide for a detailed breakdown of its contents.

To execute the notebook from the command line (useful for HPC environments), use the following command from the root of the repository:

jupyter nbconvert --to notebook --execute notebooks/example_usage.ipynb --output notebooks/example_usage_executed.ipynb

This command will:

  • Run the notebook example_usage.ipynb using the current Python environment.

  • Save the executed version as executed_example_usage.ipynb in the same notebooks/ directory.

  • Preserve interactive IPython functionality (e.g., display, widgets) during execution.

📌 Note: Make sure the ga_env (or .venv) environment is activated before running this command:

source ga_env/bin/activate # Or .venv/bin/activate if installed manually

This ensures all required dependencies are available for successful execution.