semvec/pypi-packages huggingface dataset:
autocode-py 0.0.1.post9
autocode: Auto Code Improvement by Metrics Optimization.

[![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 -U 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` then 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 (need to wait for long time because the libraries need to be re-downloaded for each client).
8. Execute `optimization.run()` in 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
  ![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)
xmodel 1.0.1
Models for working with JSON, ie: JsonModel
Requires Python: <4.0,>=3.10

# Json Modeling Library

Provides easy way to map dict to/from Full-Fledged 'JsonModel' object.

![PythonSupport](https://img.shields.io/static/v1?label=python&message=%203.10|%203.11|%203.12&color=blue?style=flat-square&logo=python)
![PyPI version](https://badge.fury.io/py/xmodel.svg?)

## Documentation

**[📄 Detailed Documentation](https://xyngular.github.io/py-xmodel/latest/)** | **[🐍 PyPi](https://pypi.org/project/xmodel/)**

## Getting Started

???+ warning "Alpha Software!"
    This is pre-release Alpha software, based on another code base and
    the needed changes to make a final release version are not yet
    completed. Everything is subject to change!


```shell
poetry install xmodel
```

or

```shell
pip install xmodel
```

Very basic example:

```python
from xmodel import JsonModel

class MyModel(JsonModel):
    some_attr: str

json_dict_input = {'some_attr': 'a-value'}    

obj = MyModel(json_dict_input)
assert obj.some_attr == 'a-value'

json_dict = obj.api.json()
assert json_dict == json_dict_input
```