https://github.com/muazhari/autocode
Auto Code Improvements by Metrics Optimization.
https://github.com/muazhari/autocode
large-language-model optimization software-engineering
Last synced: 7 days ago
JSON representation
Auto Code Improvements by Metrics Optimization.
- Host: GitHub
- URL: https://github.com/muazhari/autocode
- Owner: muazhari
- Created: 2024-07-10T11:39:05.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-19T11:38:46.000Z (6 months ago)
- Last Synced: 2025-09-03T21:14:15.327Z (4 months ago)
- Topics: large-language-model, optimization, software-engineering
- Language: Jupyter Notebook
- Homepage: https://pypi.org/project/autocode-py
- Size: 7.14 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://doi.org/10.5281/zenodo.13225516)
# autocode
Auto Code Improvements 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 literature review, this project can hypothetically 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).
- Mean of normalized IGD+ performance metric with 3-minute benchmarks for each of the 36 problems is 68%.
- Code scoring using LLM.
- Support cross-language softwares.
- Easy software deployment using docker-compose.
- Scalable to infinite cores to quicken the parallel processing.
## How to Use
1. Install the requirements
- pypi (old)
```bash
pip install -U autocode-py
```
- github (new)
```bash
pip install -U git+https://github.com/muazhari/autocode.git@main
```
2. Prepare software to be processed as in the [`./example/client`](https://github.com/muazhari/autocode/tree/main/example/client) folder.
3. Prepare deployment as in the [`./example/client/docker-compose.yml`](https://github.com/muazhari/autocode/blob/main/example/client/docker-compose.yml) file.
4. Prepare the controller as in the [`./example/controller.ipynb`](https://github.com/muazhari/autocode/blob/main/example/controller.ipynb) file.
5. Instantiate `optimization` then execute `optimization.deploy()` in the controller.
6. Open the dashboard in `http://localhost:{dashboard_port}/` to see the process in real time.
7. Wait until all clients are ready (need to wait a long time because the libraries need to be re-downloaded for each client).
8. Execute `optimization.run()` in the controller.
9. Wait until the run is finished.
10. Analyze and decide the best values.
11. Execute `optimization.reset(keys=["clients"])` then `optimization.deploy()` to apply different client states.
12. Try to execute `optimization.reset()` to totally reset the tool if needed (i.e., data inconsistency).
## Demo
- [Controller](https://github.com/muazhari/autocode/blob/main/example/controller.ipynb)
- [Client](https://github.com/muazhari/autocode/tree/main/example/client)
- Dashboard

## Compatibility
- Python 3.10, 3.11, 3.12
- Linux
- Docker
- [autocode-go](https://github.com/muazhari/autocode-go)