Skip to content

aistairc/aiaccel

Repository files navigation

aiaccel: an HPO library for ABCI

GitHub license Supported Python version Publish on GitHub Pages CI status

日本語 (Japanese)

A hyperparameter optimization library for AI Bridging Cloud Infrastructure (ABCI). This software solves hyperparameter optimizations related to AI technologies including deep learning and multi-agent simulation. The software currently supports five optimization algorithms: random search, grid search, sobol sequence, nelder-mead method, and TPE.

Installation

The software can be installed using pip.

> pip install git+https://github.com/aistairc/aiaccel.git

Getting started

Running on a local computer

An example for optimizing a simple function (i.e., sphere function) on a local computer.

  1. (Optional) Install Virtualenv and create a virtual environment.

    > python3 -m venv optenv
    > source optenv/bin/activate
  2. Install aiaccel

    > pip install git+https://github.com/aistairc/aiaccel.git 
  3. Create a workspace and copy the sphere example on the repository.

    > mkdir your_workspace_directory
    > cd your_workspace_directory
    > git clone https://github.com/aistairc/aiaccel.git 
    > cp -R ./aiaccel/examples .
    > cd examples
    > ls
    sphere
    
    > cd sphere
    > ls
    config.yaml         user.py
  4. Run the parameter optimization

    > aiaccel-start --config config.yaml

    or

    > python -m aiaccel.cli.start --config config.yaml

    Tips: You can start after cleaning the workspace directory using --clean.

    > aiaccel-start --config config.yaml --clean
  5. Wait for the program to finish and check the optimization results.

    > ls ./work
    abci_output         alive               hp                  lock
    log                 result              runner              state
    
    > cat ./work/result/final_result.result
  6. If you want to change configurations, edit config.yaml.

    > vi config.yaml

Running on ABCI

This tutorial describes how to run examples/sphere on ABCI.

  1. First, setup python environment following the ABCI Users Guide:

    > module load python/3.11/3.11.2
    > python3 -m venv optenv
    > source optenv/bin/activate
  2. Prepare the workspace by following Steps 1 and 2 in Running on a local computer.

  3. Please confirm the configuration file before running master.

    resource:
        type: "abci"
        num_workers: 4
  4. Run on an (interactive) job

    > aiaccel-start --config config.yaml
  5. If you want to check the running jobs, please refer the ABCI User Guide.

Others

  • Check the progress

    > aiaccel-view --config config.yaml
  • Display simple graphs

    > aiaccel-plot --config config.yaml
  • Output results to workspace/results.csv.

    > aiaccel-report --config config.yaml

Acknowledgement

  • Part of this software was developed in a project commissioned by the New Energy and Industrial Technology Development Organization (NEDO).
  • aiaccel is built with the help of Optuna.