Metadata-Version: 2.1
Name: autocode-py
Version: 0.0.1.post6
Summary: autocode: Auto Code Improvement by Metrics Optimization.
Home-page: https://github.com/muazhari/autocode
Author: muazhari
Classifier: Intended Audience :: Developers
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Software Development
Classifier: Topic :: Scientific/Engineering
Description-Content-Type: text/markdown
Requires-Dist: pymoo
Requires-Dist: pydantic_settings
Requires-Dist: fastapi
Requires-Dist: dependency-injector
Requires-Dist: ray
Requires-Dist: fastapi
Requires-Dist: matplotlib<3.9.0
Requires-Dist: sqlmodel
Requires-Dist: dill
Requires-Dist: streamlit
Requires-Dist: numpy<2
Requires-Dist: python-on-whales
Requires-Dist: uvicorn
Requires-Dist: langchain
Requires-Dist: langchain-openai
Requires-Dist: langgraph

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.13225517.svg)](https://doi.org/10.5281/zenodo.13225517)

# autocode

Auto Code Improvement by Metrics Optimization.

## Description

Autocode selects the best values for optimized metrics. The 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.
- Value types include bool, int, float, and choice (code).
- Code scoring and variation generators 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

```bash
pip install autocode-py
```

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 controller as in the [`./example/controller.ipynb`](https://github.com/muazhari/autocode/blob/main/example/controller.ipynb) file.
5. Instantiate `optimization` and execute `optimization.deploy()` in controller.
6. Open dashboard in `http://localhost:{dashboard_port}/` to see the process in real-time.
7. Wait until all client are ready.
8. Execute `optimization.run()` in controller.
9. Wait until the run is finished.
10. Analyze and decide the best values.

## Demo

- [Controller](https://github.com/muazhari/autocode/blob/main/example/controller.ipynb)
- [Client](https://github.com/muazhari/autocode/tree/main/example/client)
- Dashboard
  ![demo-1.png](https://github.com/muazhari/autocode/blob/main/demo-1.png?raw=true)

## Compatibility

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