Skip to content

muazhari/autocode

Repository files navigation

DOI

autocode

Auto Code Improvement by Metrics Optimization.

Description

Autocode selects the best values for optimized metrics. The variable value types could be bool, int, float, and choice (including but not limited to code). This project utilizes a Large Language Model and Mixed-Variable Many-Objective Optimization. Based on our research/literature review, this project hypothetically can contribute to the economic performance of companies.

Features

  • Many-software Value-level Mixed-variable Many-objective Optimization.
  • Variable types are bool, int, float, and choice (including but not limited to code).
  • Error (MAE/MAE_max) for MCDM (single solution suggestion) is up to 0.0000175.
  • Code scoring using LLM.
  • Software cross-language support.
  • Easy software deployment using docker-compose.
  • Scalable to infinite cores to speed up processing in parallel.

How to Use

  1. Install the requirements
  • pypi (old)
    pip install -U autocode-py
  • github (new)
    pip install -U git+https://github.com/muazhari/autocode.git@main
  1. Prepare software to be processed as in the ./example/client folder.
  2. Prepare deployment as in the ./example/client/docker-compose.yml file.
  3. Prepare the controller as in the ./example/controller.ipynb file.
  4. Instantiate optimization then execute optimization.deploy() in the controller.
  5. Open the dashboard in http://localhost:{dashboard_port}/ to see the process in real time.
  6. Wait until all clients are ready (need to wait a long time because the libraries need to be re-downloaded for each client).
  7. Execute optimization.run() in the controller.
  8. Wait until the run is finished.
  9. Analyze and decide the best values.
  10. Execute optimization.reset(keys=["clients"]) then optimization.deploy() to apply different client states.
  11. Try to execute optimization.reset() to totally reset the tool if needed (i.e. data inconsistency).

Demo

Compatibility

Releases

No releases published

Packages

No packages published

Languages