pymilo


Namepymilo JSON
Version 1.1 PyPI version JSON
download
home_pagehttps://github.com/openscilab/pymilo
SummaryTransportation of ML models
upload_time2024-11-25 17:01:03
maintainerNone
docs_urlNone
authorPyMilo Development Team
requires_python>=3.6
licenseMIT
keywords python3 python machine_learning ml
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            
<div align="center">
    <img src="https://github.com/openscilab/pymilo/raw/main/otherfiles/logo.png" width="500" height="300">
    <br/>
    <br/>
    <a href="https://codecov.io/gh/openscilab/pymilo"><img src="https://codecov.io/gh/openscilab/pymilo/branch/main/graph/badge.svg" alt="Codecov"/></a>
    <a href="https://badge.fury.io/py/pymilo"><img src="https://badge.fury.io/py/pymilo.svg" alt="PyPI version" height="18"></a>
    <a href="https://anaconda.org/openscilab/pymilo"><img src="https://anaconda.org/openscilab/pymilo/badges/version.svg"></a>
    <a href="https://www.python.org/"><img src="https://img.shields.io/badge/built%20with-Python3-green.svg" alt="built with Python3"></a>
    <a href="https://discord.gg/mtuMS8AjDS"><img src="https://img.shields.io/discord/1064533716615049236.svg" alt="Discord Channel"></a>
</div>

----------

## Overview
<p align="justify">
PyMilo is an open source Python package that provides a simple, efficient, and safe way for users to export pre-trained machine learning models in a transparent way. By this, the exported model can be used in other environments, transferred across different platforms, and shared with others. PyMilo allows the users to export the models that are trained using popular Python libraries like scikit-learn, and then use them in deployment environments, or share them without exposing the underlying code or dependencies. The transparency of the exported models ensures reliability and safety for the end users, as it eliminates the risks of binary or pickle formats.
</p>
<table>
    <tr>
        <td align="center">PyPI Counter</td>
        <td align="center">
	    <a href="https://pepy.tech/projects/pymilo">
	        <img src="https://static.pepy.tech/badge/pymilo" alt="PyPI Downloads">
	    </a>
        </td>
    </tr>
    <tr>
        <td align="center">Github Stars</td>
        <td align="center">
            <a href="https://github.com/openscilab/pymilo">
                <img src="https://img.shields.io/github/stars/openscilab/pymilo.svg?style=social&label=Stars">
            </a>
        </td>
    </tr>
</table>
<table>
    <tr> 
        <td align="center">Branch</td>
        <td align="center">main</td>
        <td align="center">dev</td>
    </tr>
    <tr>
        <td align="center">CI</td>
        <td align="center">
            <img src="https://github.com/openscilab/pymilo/actions/workflows/test.yml/badge.svg?branch=main">
        </td>
        <td align="center">
            <img src="https://github.com/openscilab/pymilo/actions/workflows/test.yml/badge.svg?branch=dev">
            </td>
    </tr>
</table>

<table>
	<tr> 
		<td align="center">Code Quality</td>
		<td align="center"><a href="https://www.codefactor.io/repository/github/openscilab/pymilo"><img src="https://www.codefactor.io/repository/github/openscilab/pymilo/badge" alt="CodeFactor" /></a></td>
		<td align="center"><a href="https://app.codacy.com/gh/openscilab/pymilo/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade"><img src="https://app.codacy.com/project/badge/Grade/9eeec99ed11f4d9b86af36dc90f5f753"></a></td>
		<td align="center"><a href="https://codebeat.co/projects/github-com-openscilab-pymilo-dev"><img alt="codebeat badge" src="https://codebeat.co/badges/1259254f-39fc-4491-8469-17d8a43b6697" /></a></td>
	</tr>
</table>


## Installation

### PyPI

- Check [Python Packaging User Guide](https://packaging.python.org/installing/)
- Run `pip install pymilo==1.1`
### Source code
- Download [Version 1.1](https://github.com/openscilab/pymilo/archive/v1.1.zip) or [Latest Source](https://github.com/openscilab/pymilo/archive/dev.zip)
- Run `pip install .`

### Conda

- Check [Conda Managing Package](https://conda.io/)
- Update Conda using `conda update conda`
- Run `conda install -c openscilab pymilo`


## Usage
### Import/Export
Imagine you want to train a `LinearRegression` model representing this equation: $y = x_0 + 2x_1 + 3$. You will create data points (`X`, `y`) and train your model as follows.
```python
import numpy as np
from sklearn.linear_model import LinearRegression
X = np.array([[1, 1], [1, 2], [2, 2], [2, 3]])
y = np.dot(X, np.array([1, 2])) + 3
# y = 1 * x_0 + 2 * x_1 + 3
model = LinearRegression().fit(X, y)
pred = model.predict(np.array([[3, 5]]))
# pred = [16.] (=1 * 3 + 2 * 5 + 3)
```

Using PyMilo `Export` class you can easily serialize and export your trained model into a JSON file.
```python
from pymilo import Export
Export(model).save("model.json")
```

You can check out your model as a JSON file now.
```json
{
    "data": {
        "fit_intercept": true,
        "copy_X": true,
        "n_jobs": null,
        "positive": false,
        "n_features_in_": 2,
        "coef_": {
            "pymiloed-ndarray-list": [
                1.0000000000000002,
                1.9999999999999991
            ],
            "pymiloed-ndarray-dtype": "float64",
            "pymiloed-ndarray-shape": [
                2
            ],
            "pymiloed-data-structure": "numpy.ndarray"
        },
        "rank_": 2,
        "singular_": {
            "pymiloed-ndarray-list": [
                1.618033988749895,
                0.6180339887498948
            ],
            "pymiloed-ndarray-dtype": "float64",
            "pymiloed-ndarray-shape": [
                2
            ],
            "pymiloed-data-structure": "numpy.ndarray"
        },
        "intercept_": {
            "value": 3.0000000000000018,
            "np-type": "numpy.float64"
        }
    },
    "sklearn_version": "1.4.2",
    "pymilo_version": "0.8",
    "model_type": "LinearRegression"
}
```
You can see all the learned parameters of the model in this file and change them if you want. This JSON representation is a transparent version of your model.

Now let's load it back. You can do it easily by using PyMilo `Import` class.
```python
from pymilo import Import
model = Import("model.json").to_model()
pred = model.predict(np.array([[3, 5]]))
# pred = [16.] (=1 * 3 + 2 * 5 + 3)
```
This loaded model is exactly the same as the original trained model.

### ML streaming
You can easily serve your ML model from a remote server using `ML streaming` feature of PyMilo.

⚠️ `ML streaming` feature exists in versions `>=1.0`

⚠️ In order to use `ML streaming` feature, make sure you've installed the `streaming` mode of PyMilo

You can choose either `REST` or `WebSocket` as the communication medium protocol.

#### Server
Let's assume you are in the remote server and you want to import the exported JSON file and start serving your model through `REST` protocol!
```python
from pymilo import Import
from pymilo.streaming import PymiloServer, CommunicationProtocol
my_model = Import("model.json").to_model()
communicator = PymiloServer(
    model=my_model,
    port=8000,
    communication_protocol=CommunicationProtocol["REST"],
    ).communicator
communicator.run()
```
Now `PymiloServer` runs on port `8000` and exposes REST API to `upload`, `download` and retrieve **attributes** either **data attributes** like `model._coef` or **method attributes** like `model.predict(x_test)`.

#### Client
By using `PymiloClient` you can easily connect to the remote `PymiloServer` and execute any functionalities that the given ML model has, let's say you want to run `predict` function on your remote ML model and get the result:
```python
from pymilo.streaming import PymiloClient, CommunicationProtocol
pymilo_client = PymiloClient(
    mode=PymiloClient.Mode.LOCAL,
    server_url="SERVER_URL",
    communication_protocol=CommunicationProtocol["REST"],
    )
pymilo_client.toggle_mode(PymiloClient.Mode.DELEGATE)
result = pymilo_client.predict(x_test)
```

ℹ️ If you've deployed `PymiloServer` locally (on port `8000` for instance), then `SERVER_URL` would be `http://127.0.0.1:8000` or `ws://127.0.0.1:8000` based on the selected protocol for the communication medium.

You can also download the remote ML model into your local and execute functions locally on your model.

Calling `download` function on `PymiloClient` will sync the local model that `PymiloClient` wraps upon with the remote ML model, and it doesn't save model directly to a file.

```python
pymilo_client.download()
```
If you want to save the ML model to a file in your local, you can use `Export` class.
```python
from pymilo import Export
Export(pymilo_client.model).save("model.json")
```
Now that you've synced the remote model with your local model, you can run functions.
```python
pymilo_client.toggle_mode(mode=PymiloClient.Mode.LOCAL)
result = pymilo_client.predict(x_test)
```
`PymiloClient` wraps around the ML model, either to the local ML model or the remote ML model, and you can work with `PymiloClient` in the exact same way that you did with the ML model, you can run exact same functions with same signature.

ℹ️ Through the usage of `toggle_mode` function you can specify whether `PymiloClient` applies requests on the local ML model `pymilo_client.toggle_mode(mode=Mode.LOCAL)` or delegates it to the remote server `pymilo_client.toggle_mode(mode=Mode.DELEGATE)`


## Supported ML models
| scikit-learn | PyTorch | 
| ---------------- | ---------------- | 
| Linear Models &#x2705; | - | 
| Neural Networks &#x2705; | -  | 
| Trees &#x2705; | -  | 
| Clustering &#x2705; | -  | 
| Naïve Bayes &#x2705; | -  | 
| Support Vector Machines (SVMs) &#x2705; | -  | 
| Nearest Neighbors &#x2705; | -  |  
| Ensemble Models &#x2705; | - | 
| Pipeline Model &#x2705; | - |
| Preprocessing Models &#x2705; | - |
| Cross Decomposition Models &#x2705; | - |


Details are available in [Supported Models](https://github.com/openscilab/pymilo/blob/main/SUPPORTED_MODELS.md).

## Issues & bug reports

Just fill an issue and describe it. We'll check it ASAP! or send an email to [pymilo@openscilab.com](mailto:pymilo@openscilab.com "pymilo@openscilab.com"). 

- Please complete the issue template
 
You can also join our discord server

<a href="https://discord.gg/mtuMS8AjDS">
  <img src="https://img.shields.io/discord/1064533716615049236.svg?style=for-the-badge" alt="Discord Channel">
</a>

## Acknowledgments

[Python Software Foundation (PSF)](https://www.python.org/psf/) grants PyMilo library partially for versions **1.0, 1.1**. [PSF](https://www.python.org/psf/) is the organization behind Python. Their mission is to promote, protect, and advance the Python programming language and to support and facilitate the growth of a diverse and international community of Python programmers.

<a href="https://www.python.org/psf/"><img src="https://github.com/openscilab/pymilo/raw/main/otherfiles/psf.png" height="65px" alt="Python Software Foundation"></a>

[Trelis Research](https://trelis.com/) grants PyMilo library partially for version **1.0**. [Trelis Research](https://trelis.com/) provides tools and tutorials for businesses and developers looking to fine-tune and deploy large language models.

<a href="https://trelis.com/"><img src="https://trelis.com/wp-content/uploads/2023/10/android-chrome-512x512-1.png" height="75px" alt="Trelis Research"></a>


## Show your support


### Star this repo

Give a ⭐️ if this project helped you!

### Donate to our project
If you do like our project and we hope that you do, can you please support us? Our project is not and is never going to be working for profit. We need the money just so we can continue doing what we do ;-) .			

<a href="https://openscilab.com/#donation" target="_blank"><img src="https://github.com/openscilab/pymilo/raw/main/otherfiles/donation.png" height="90px" width="270px" alt="PyMilo Donation"></a>

# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [1.1] - 2024-11-25
### Added
- `is_socket_closed` function in `streaming.communicator.py`
- `validate_http_url` function in `streaming.util.py`
- `validate_websocket_url` function in `streaming.util.py`
- `ML Streaming` WebSocket testcases
- `CommunicationProtocol` Enum in `streaming.communicator.py`
- `WebSocketClientCommunicator` class in `streaming.communicator.py`
- `WebSocketServerCommunicator` class in `streaming.communicator.py`
- batch operation testcases
- `batch_export` function in `pymilo/pymilo_obj.py` 
- `batch_import` function in `pymilo/pymilo_obj.py`
- `CCA` model
- `PLSCanonical` model
- `PLSRegression` model
- Cross decomposition models test runner
- Cross decomposition chain
- PyMilo exception types added in `pymilo/exceptions/__init__.py`
- PyMilo exception types added in `pymilo/__init__.py`
### Changed
- `core` and `streaming` tests divided in `test.yml`
- `communication_protocol` parameter added to `PyMiloClient` class
- `communication_protocol` parameter added to `PyMiloServer` class
- `ML Streaming` testcases updated to support protocol selection
- `README.md` updated
- Tests config modified
- Cross decomposition params initialized in `pymilo_param`
- Cross decomposition support added to `pymilo_func.py`
- `SUPPORTED_MODELS.md` updated
- `README.md` updated
- GitHub actions are limited to the `dev` and `main` branches
- `Python 3.13` added to `test.yml`
## [1.0] - 2024-09-16
### Added
- Compression method test in `ML Streaming` RESTful testcases
- `CLI` handler in `tests/test_ml_streaming/run_server.py`
- `Compression` Enum in `streaming.compressor.py`
- `GZIPCompressor` class in `streaming.compressor.py`
- `ZLIBCompressor` class in `streaming.compressor.py`
- `LZMACompressor` class in `streaming.compressor.py`
- `BZ2Compressor` class in `streaming.compressor.py`
- `encrypt_compress` function in `PymiloClient`
- `parse` function in `RESTServerCommunicator`
- `is_callable_attribute` function in `PymiloServer`
- `streaming.param.py`
- `attribute_type` function in `RESTServerCommunicator`
- `AttributeTypePayload` class in `RESTServerCommunicator`
- `attribute_type` function in `RESTClientCommunicator`
- `Mode` Enum in `PymiloClient`
- Import from url testcases
- `download_model` function in `utils.util.py`
- `PymiloServer` class in `streaming.pymilo_server.py`
- `PymiloClient` class in `PymiloClient`
- `Communicator` interface in `streaming.interfaces.py`
- `RESTClientCommunicator` class in `streaming.communicator.py`
- `RESTServerCommunicator` class in `streaming.communicator.py`
- `Compressor` interface in `streaming.interfaces.py`
- `DummyCompressor` class in `streaming.compressor.py`
- `Encryptor` interface in `streaming.interfaces.py`
- `DummyEncryptor` class in `streaming.encryptor.py`
- `ML Streaming` RESTful testcases
- `streaming-requirements.txt`
### Changed
- `README.md` updated
- `ML Streaming` RESTful testcases
- `attribute_call` function in `RESTServerCommunicator`
- `AttributeCallPayload` class in `RESTServerCommunicator`
- upload function in `RESTClientCommunicator`
- download function in `RESTClientCommunicator`
- `__init__` function in `RESTClientCommunicator`
- `attribute_calls` function in `RESTClientCommunicator`
- `requests` added to `requirements.txt`
- `uvicorn`, `fastapi`, `requests` and `pydantic` added to `dev-requirements.txt`
- `ML Streaming` RESTful testcases
- `__init__` function in `PymiloServer`
- `__getattr__` function in `PymiloClient`
- `__init__` function in `PymiloClient`
- `toggle_mode` function in `PymiloClient`
- `upload` function in `PymiloClient`
- `download` function in `PymiloClient`
- `__init__` function in `PymiloServer`
- `serialize_cfnode` function in `transporters.cfnode_transporter.py`
- `__init__` function in `Import` class
- `serialize` function in `transporters.tree_transporter.py`
- `deserialize` function in `transporters.tree_transporter.py`
- `serialize` function in `transporters.sgdoptimizer_transporter.py`
- `deserialize` function in `transporters.sgdoptimizer_transporter.py`
- `serialize` function in `transporters.randomstate_transporter.py`
- `deserialize` function in `transporters.randomstate_transporter.py`
- `serialize` function in `transporters.bunch_transporter.py`
- `deserialize` function in `transporters.bunch_transporter.py`
- `serialize` function in `transporters.adamoptimizer_transporter.py`
- `deserialize` function in `transporters.adamoptimizer_transporter.py`
- `serialize_linear_model` function in `chains.linear_model_chain.py`
- `serialize_ensemble` function in `chains.ensemble_chain.py`
- `serialize` function in `GeneralDataStructureTransporter` Transporter refactored
- `get_deserialized_list` function in `GeneralDataStructureTransporter` Transporter refactored
- `Export` class call by reference bug fixed
## [0.9] - 2024-07-01
### Added
- Anaconda workflow
- `prefix_list` function in `utils.util.py`
- `KBinsDiscretizer` preprocessing model
- `PowerTransformer` preprocessing model
- `SplineTransformer` preprocessing model
- `TargetEncoder` preprocessing model
- `QuantileTransformer` preprocessing model
- `RobustScaler` preprocessing model
- `PolynomialFeatures` preprocessing model
- `OrdinalEncoder` preprocessing model
- `Normalizer` preprocessing model
- `MaxAbsScaler` preprocessing model
- `MultiLabelBinarizer` preprocessing model
- `KernelCenterer` preprocessing model
- `FunctionTransformer` preprocessing model
- `Binarizer` preprocessing model
- Preprocessing models test runner
### Changed
- `Command` enum class in `transporter.py`
- `SerializationErrorTypes` enum class in `serialize_exception.py`
- `DeserializationErrorTypes` enum class in `deserialize_exception.py`
- `meta.yaml` modified
- `NaN` type in `pymilo_param`
- `NaN` type transportation in `GeneralDataStructureTransporter` Transporter
- `BSpline` Transportation in `PreprocessingTransporter` Transporter
- one layer deeper transportation in `PreprocessingTransporter` Transporter
- dictating outer ndarray dtype in `GeneralDataStructureTransporter` Transporter 
- preprocessing params fulfilled in `pymilo_param`
- `SUPPORTED_MODELS.md` updated
- `README.md` updated
- `serialize_possible_ml_model` in the Ensemble chain
## [0.8] - 2024-05-06
### Added
- `StandardScaler` Transformer in `pymilo_param.py`
- `PreprocessingTransporter` Transporter
- ndarray shape config in `GeneralDataStructure` Transporter
- `util.py` in chains
- `BinMapperTransporter` Transporter
- `BunchTransporter` Transporter
- `GeneratorTransporter` Transporter
- `TreePredictorTransporter` Transporter
- `AdaboostClassifier` model
- `AdaboostRegressor` model
- `BaggingClassifier` model
- `BaggingRegressor` model
- `ExtraTreesClassifier` model
- `ExtraTreesRegressor` model
- `GradientBoosterClassifier` model
- `GradientBoosterRegressor` model
- `HistGradientBoosterClassifier` model
- `HistGradientBoosterRegressor` model
- `RandomForestClassifier` model
- `RandomForestRegressor` model
- `IsolationForest` model
- `RandomTreesEmbedding` model
- `StackingClassifier` model
- `StackingRegressor` model
- `VotingClassifier` model
- `VotingRegressor` model
- `Pipeline` model
- Ensemble models test runner
- Ensemble chain
- `SECURITY.md`
### Changed
- `Pipeline` test updated
- `LabelBinarizer`,`LabelEncoder` and `OneHotEncoder` got embedded in `PreprocessingTransporter`
- Preprocessing support added to Ensemble chain
- Preprocessing params initialized in `pymilo_param`
- `util.py` in utils updated
- `test_pymilo.py` updated
- `pymilo_func.py` updated
- `linear_model_chain.py` updated
- `neural_network_chain.py` updated
- `decision_tree_chain.py` updated
- `clustering_chain.py` updated
- `naive_bayes_chain.py` updated
- `neighbours_chain.py` updated
- `svm_chain.py` updated
- `GeneralDataStructure` Transporter updated
- `LossFunction` Transporter updated
- `AbstractTransporter` updated
- Tests config modified
- Unequal sklearn version error added in `pymilo_param.py`
- Ensemble params initialized in `pymilo_param`
- Ensemble support added to `pymilo_func.py`
- `SUPPORTED_MODELS.md` updated
- `README.md` updated
## [0.7] - 2024-04-03
### Added
- `pymilo_nearest_neighbor_test` function added to `test_pymilo.py`
- `NeighborsTreeTransporter` Transporter
- `LocalOutlierFactor` model
- `RadiusNeighborsClassifier` model
- `RadiusNeighborsRegressor` model
- `NearestCentroid` model
- `NearestNeighbors` model
- `KNeighborsClassifier` model
- `KNeighborsRegressor` model
- Neighbors models test runner
- Neighbors chain
### Changed
- Tests config modified
- Neighbors params initialized in `pymilo_param`
- Neighbors support added to `pymilo_func.py`
- `SUPPORTED_MODELS.md` updated
- `README.md` updated
## [0.6] - 2024-03-27
### Added
- `deserialize_primitive_type` function in `GeneralDataStructureTransporter`
- `is_deserialized_ndarray` function in `GeneralDataStructureTransporter`
- `deep_deserialize_ndarray` function in `GeneralDataStructureTransporter`
- `deep_serialize_ndarray`  function in `GeneralDataStructureTransporter`
- `SVR` model
- `SVC` model
- `One Class SVM` model
- `NuSVR` model
- `NuSVC` model
- `Linear SVR` model
- `Linear SVC` model
- SVM models test runner
- SVM chain
### Changed
- `pymilo_param.py` updated
- `pymilo_obj.py` updated to use predefined strings
- `TreeTransporter` updated
- `get_homogeneous_type` function in `util.py` updated
- `GeneralDataStructureTransporter` updated to use deep ndarray serializer & deserializer
- `check_str_in_iterable` updated
- `Label Binarizer` Transporter updated
- `Function` Transporter updated
- `CFNode` Transporter updated
- `Bisecting Tree` Transporter updated
- Tests config modified
- SVM params initialized in `pymilo_param`
- SVM support added to `pymilo_func.py`
- `SUPPORTED_MODELS.md` updated
- `README.md` updated
## [0.5] - 2024-01-31
### Added
- `reset` function in the `Transport` interface
- `reset` function implementation in `AbstractTransporter`
- `Gaussian Naive Bayes` declared as `GaussianNB` model 
- `Multinomial Naive Bayes` model declared as `MultinomialNB` model
- `Complement Naive Bayes` model declared as `ComplementNB` model
- `Bernoulli Naive Bayes` model declared as `BernoulliNB` model
- `Categorical Naive Bayes` model declared as `CategoricalNB` model
- Naive Bayes models test runner
- Naive Bayes chain
### Changed
- `Transport` function of `AbstractTransporter` updated
- fix the order of `CFNode` fields serialization in `CFNodeTransporter`
- `GeneralDataStructureTransporter` support list of ndarray with different shapes
- Tests config modified
- Naive Bayes params initialized in `pymilo_param`
- Naive Bayes support added to `pymilo_func.py`
- `SUPPORTED_MODELS.md` updated
- `README.md` updated
## [0.4] - 2024-01-22
### Added
- `has_named_parameter` method in `util.py`
- `CFSubcluster` Transporter(inside `CFNode` Transporter)
- `CFNode` Transporter
- `Birch` model
- `SpectralBiclustering` model
- `SpectralCoclustering` model
- `MiniBatchKMeans` model
- `feature_request.yml` template
- `config.yml` for issue template
- `BayesianGaussianMixture` model
- `serialize_tuple` method in `GeneralDataStructureTransporter`
- `import_function` method in `util.py`
- `Function` Transporter
- `FeatureAgglomeration` model
- `HDBSCAN` model
- `GaussianMixture` model
- `OPTICS` model
- `DBSCAN` model
- `AgglomerativeClustering` model
- `SpectralClustering` model
- `MeanShift` model 
- `AffinityPropagation` model
- `Kmeans` model
- Clustering models test runner
- Clustering chain 
### Changed
- `LossFunctionTransporter` enhanced to handle scikit 1.4.0 `_loss_function_` field
- Codacy Static Code Analyzer's suggestions applied
- Spectral Clustering test folder refactored
- Bug report template modified
- `GeneralDataStructureTransporter` updated
- Tests config modified
- Clustering data set preparation added to `data_exporter.py`
- Clustering params initialized in `pymilo_param`
- Clustering support added to `pymilo_func.py`
- `Python 3.12` added to `test.yml`
- `dev-requirements.txt` updated
- Code quality badges added to `README.md`
- `SUPPORTED_MODELS.md` updated
- `README.md` updated
## [0.3] - 2023-09-27
### Added
- scikit-learn decision tree models
- `ExtraTreeClassifier` model
- `ExtraTreeRegressor` model
- `DecisionTreeClassifier` model
- `DecisionTreeRegressor` model
- `Tree` Transporter
- Decision Tree chain
### Changed
- Tests config modified
- DecisionTree params initialized in `pymilo_param`
- Decision Tree support added to `pymilo_func.py`
## [0.2] - 2023-08-02
### Added
- scikit-learn neural network models 
- `MLP Regressor` model 
- `MLP Classifier` model
- `BernoulliRBN` model
- `SGDOptimizer` transporter
- `RandomState(MT19937)` transporter
- `Adamoptimizer` transporter
- Neural Network chain
- Neural Network exceptions 
- `ndarray_to_list` method in `GeneralDataStructureTransporter`
- `list_to_ndarray` method in `GeneralDataStructureTransporter` 
- `neural_network_chain.py` chain
### Changed
- `GeneralDataStructure` Transporter updated
- `LabelBinerizer` Transporter updated
- `linear model` chain updated
- GeneralDataStructure transporter enhanced
- LabelBinerizer transporter updated
- transporters' chain router added to `pymilo func`
- NeuralNetwork params initialized in `pymilo_param`
- `pymilo_test` updated to support multiple models
- `linear_model_chain` refactored
## [0.1] - 2023-06-29
### Added
- scikit-learn linear models support
- `Export` class
- `Import` class

[Unreleased]: https://github.com/openscilab/pymilo/compare/v1.1...dev
[1.1]: https://github.com/openscilab/pymilo/compare/v1.0...v1.1
[1.0]: https://github.com/openscilab/pymilo/compare/v0.9...v1.0
[0.9]: https://github.com/openscilab/pymilo/compare/v0.8...v0.9
[0.8]: https://github.com/openscilab/pymilo/compare/v0.7...v0.8
[0.7]: https://github.com/openscilab/pymilo/compare/v0.6...v0.7
[0.6]: https://github.com/openscilab/pymilo/compare/v0.5...v0.6
[0.5]: https://github.com/openscilab/pymilo/compare/v0.4...v0.5
[0.4]: https://github.com/openscilab/pymilo/compare/v0.3...v0.4
[0.3]: https://github.com/openscilab/pymilo/compare/v0.2...v0.3
[0.2]: https://github.com/openscilab/pymilo/compare/v0.1...v0.2
[0.1]: https://github.com/openscilab/pymilo/compare/e887108...v0.1

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/openscilab/pymilo",
    "name": "pymilo",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "python3 python machine_learning ML",
    "author": "PyMilo Development Team",
    "author_email": "pymilo@openscilab.com",
    "download_url": "https://files.pythonhosted.org/packages/e4/f1/af03ea9869d285809f05a0ff65ba07638b86710504a96921083e0732c04b/pymilo-1.1.tar.gz",
    "platform": null,
    "description": "\n<div align=\"center\">\n    <img src=\"https://github.com/openscilab/pymilo/raw/main/otherfiles/logo.png\" width=\"500\" height=\"300\">\n    <br/>\n    <br/>\n    <a href=\"https://codecov.io/gh/openscilab/pymilo\"><img src=\"https://codecov.io/gh/openscilab/pymilo/branch/main/graph/badge.svg\" alt=\"Codecov\"/></a>\n    <a href=\"https://badge.fury.io/py/pymilo\"><img src=\"https://badge.fury.io/py/pymilo.svg\" alt=\"PyPI version\" height=\"18\"></a>\n    <a href=\"https://anaconda.org/openscilab/pymilo\"><img src=\"https://anaconda.org/openscilab/pymilo/badges/version.svg\"></a>\n    <a href=\"https://www.python.org/\"><img src=\"https://img.shields.io/badge/built%20with-Python3-green.svg\" alt=\"built with Python3\"></a>\n    <a href=\"https://discord.gg/mtuMS8AjDS\"><img src=\"https://img.shields.io/discord/1064533716615049236.svg\" alt=\"Discord Channel\"></a>\n</div>\n\n----------\n\n## Overview\n<p align=\"justify\">\nPyMilo is an open source Python package that provides a simple, efficient, and safe way for users to export pre-trained machine learning models in a transparent way. By this, the exported model can be used in other environments, transferred across different platforms, and shared with others. PyMilo allows the users to export the models that are trained using popular Python libraries like scikit-learn, and then use them in deployment environments, or share them without exposing the underlying code or dependencies. The transparency of the exported models ensures reliability and safety for the end users, as it eliminates the risks of binary or pickle formats.\n</p>\n<table>\n    <tr>\n        <td align=\"center\">PyPI Counter</td>\n        <td align=\"center\">\n\t    <a href=\"https://pepy.tech/projects/pymilo\">\n\t        <img src=\"https://static.pepy.tech/badge/pymilo\" alt=\"PyPI Downloads\">\n\t    </a>\n        </td>\n    </tr>\n    <tr>\n        <td align=\"center\">Github Stars</td>\n        <td align=\"center\">\n            <a href=\"https://github.com/openscilab/pymilo\">\n                <img src=\"https://img.shields.io/github/stars/openscilab/pymilo.svg?style=social&label=Stars\">\n            </a>\n        </td>\n    </tr>\n</table>\n<table>\n    <tr> \n        <td align=\"center\">Branch</td>\n        <td align=\"center\">main</td>\n        <td align=\"center\">dev</td>\n    </tr>\n    <tr>\n        <td align=\"center\">CI</td>\n        <td align=\"center\">\n            <img src=\"https://github.com/openscilab/pymilo/actions/workflows/test.yml/badge.svg?branch=main\">\n        </td>\n        <td align=\"center\">\n            <img src=\"https://github.com/openscilab/pymilo/actions/workflows/test.yml/badge.svg?branch=dev\">\n            </td>\n    </tr>\n</table>\n\n<table>\n\t<tr> \n\t\t<td align=\"center\">Code Quality</td>\n\t\t<td align=\"center\"><a href=\"https://www.codefactor.io/repository/github/openscilab/pymilo\"><img src=\"https://www.codefactor.io/repository/github/openscilab/pymilo/badge\" alt=\"CodeFactor\" /></a></td>\n\t\t<td align=\"center\"><a href=\"https://app.codacy.com/gh/openscilab/pymilo/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade\"><img src=\"https://app.codacy.com/project/badge/Grade/9eeec99ed11f4d9b86af36dc90f5f753\"></a></td>\n\t\t<td align=\"center\"><a href=\"https://codebeat.co/projects/github-com-openscilab-pymilo-dev\"><img alt=\"codebeat badge\" src=\"https://codebeat.co/badges/1259254f-39fc-4491-8469-17d8a43b6697\" /></a></td>\n\t</tr>\n</table>\n\n\n## Installation\n\n### PyPI\n\n- Check [Python Packaging User Guide](https://packaging.python.org/installing/)\n- Run `pip install pymilo==1.1`\n### Source code\n- Download [Version 1.1](https://github.com/openscilab/pymilo/archive/v1.1.zip) or [Latest Source](https://github.com/openscilab/pymilo/archive/dev.zip)\n- Run `pip install .`\n\n### Conda\n\n- Check [Conda Managing Package](https://conda.io/)\n- Update Conda using `conda update conda`\n- Run `conda install -c openscilab pymilo`\n\n\n## Usage\n### Import/Export\nImagine you want to train a `LinearRegression` model representing this equation: $y = x_0 + 2x_1 + 3$. You will create data points (`X`, `y`) and train your model as follows.\n```python\nimport numpy as np\nfrom sklearn.linear_model import LinearRegression\nX = np.array([[1, 1], [1, 2], [2, 2], [2, 3]])\ny = np.dot(X, np.array([1, 2])) + 3\n# y = 1 * x_0 + 2 * x_1 + 3\nmodel = LinearRegression().fit(X, y)\npred = model.predict(np.array([[3, 5]]))\n# pred = [16.] (=1 * 3 + 2 * 5 + 3)\n```\n\nUsing PyMilo `Export` class you can easily serialize and export your trained model into a JSON file.\n```python\nfrom pymilo import Export\nExport(model).save(\"model.json\")\n```\n\nYou can check out your model as a JSON file now.\n```json\n{\n    \"data\": {\n        \"fit_intercept\": true,\n        \"copy_X\": true,\n        \"n_jobs\": null,\n        \"positive\": false,\n        \"n_features_in_\": 2,\n        \"coef_\": {\n            \"pymiloed-ndarray-list\": [\n                1.0000000000000002,\n                1.9999999999999991\n            ],\n            \"pymiloed-ndarray-dtype\": \"float64\",\n            \"pymiloed-ndarray-shape\": [\n                2\n            ],\n            \"pymiloed-data-structure\": \"numpy.ndarray\"\n        },\n        \"rank_\": 2,\n        \"singular_\": {\n            \"pymiloed-ndarray-list\": [\n                1.618033988749895,\n                0.6180339887498948\n            ],\n            \"pymiloed-ndarray-dtype\": \"float64\",\n            \"pymiloed-ndarray-shape\": [\n                2\n            ],\n            \"pymiloed-data-structure\": \"numpy.ndarray\"\n        },\n        \"intercept_\": {\n            \"value\": 3.0000000000000018,\n            \"np-type\": \"numpy.float64\"\n        }\n    },\n    \"sklearn_version\": \"1.4.2\",\n    \"pymilo_version\": \"0.8\",\n    \"model_type\": \"LinearRegression\"\n}\n```\nYou can see all the learned parameters of the model in this file and change them if you want. This JSON representation is a transparent version of your model.\n\nNow let's load it back. You can do it easily by using PyMilo `Import` class.\n```python\nfrom pymilo import Import\nmodel = Import(\"model.json\").to_model()\npred = model.predict(np.array([[3, 5]]))\n# pred = [16.] (=1 * 3 + 2 * 5 + 3)\n```\nThis loaded model is exactly the same as the original trained model.\n\n### ML streaming\nYou can easily serve your ML model from a remote server using `ML streaming` feature of PyMilo.\n\n\u26a0\ufe0f `ML streaming` feature exists in versions `>=1.0`\n\n\u26a0\ufe0f In order to use `ML streaming` feature, make sure you've installed the `streaming` mode of PyMilo\n\nYou can choose either `REST` or `WebSocket` as the communication medium protocol.\n\n#### Server\nLet's assume you are in the remote server and you want to import the exported JSON file and start serving your model through `REST` protocol!\n```python\nfrom pymilo import Import\nfrom pymilo.streaming import PymiloServer, CommunicationProtocol\nmy_model = Import(\"model.json\").to_model()\ncommunicator = PymiloServer(\n    model=my_model,\n    port=8000,\n    communication_protocol=CommunicationProtocol[\"REST\"],\n    ).communicator\ncommunicator.run()\n```\nNow `PymiloServer` runs on port `8000` and exposes REST API to `upload`, `download` and retrieve **attributes** either **data attributes** like `model._coef` or **method attributes** like `model.predict(x_test)`.\n\n#### Client\nBy using `PymiloClient` you can easily connect to the remote `PymiloServer` and execute any functionalities that the given ML model has, let's say you want to run `predict` function on your remote ML model and get the result:\n```python\nfrom pymilo.streaming import PymiloClient, CommunicationProtocol\npymilo_client = PymiloClient(\n    mode=PymiloClient.Mode.LOCAL,\n    server_url=\"SERVER_URL\",\n    communication_protocol=CommunicationProtocol[\"REST\"],\n    )\npymilo_client.toggle_mode(PymiloClient.Mode.DELEGATE)\nresult = pymilo_client.predict(x_test)\n```\n\n\u2139\ufe0f If you've deployed `PymiloServer` locally (on port `8000` for instance), then `SERVER_URL` would be `http://127.0.0.1:8000` or `ws://127.0.0.1:8000` based on the selected protocol for the communication medium.\n\nYou can also download the remote ML model into your local and execute functions locally on your model.\n\nCalling `download` function on `PymiloClient` will sync the local model that `PymiloClient` wraps upon with the remote ML model, and it doesn't save model directly to a file.\n\n```python\npymilo_client.download()\n```\nIf you want to save the ML model to a file in your local, you can use `Export` class.\n```python\nfrom pymilo import Export\nExport(pymilo_client.model).save(\"model.json\")\n```\nNow that you've synced the remote model with your local model, you can run functions.\n```python\npymilo_client.toggle_mode(mode=PymiloClient.Mode.LOCAL)\nresult = pymilo_client.predict(x_test)\n```\n`PymiloClient` wraps around the ML model, either to the local ML model or the remote ML model, and you can work with `PymiloClient` in the exact same way that you did with the ML model, you can run exact same functions with same signature.\n\n\u2139\ufe0f Through the usage of `toggle_mode` function you can specify whether `PymiloClient` applies requests on the local ML model `pymilo_client.toggle_mode(mode=Mode.LOCAL)` or delegates it to the remote server `pymilo_client.toggle_mode(mode=Mode.DELEGATE)`\n\n\n## Supported ML models\n| scikit-learn | PyTorch | \n| ---------------- | ---------------- | \n| Linear Models &#x2705; | - | \n| Neural Networks &#x2705; | -  | \n| Trees &#x2705; | -  | \n| Clustering &#x2705; | -  | \n| Na\u00efve Bayes &#x2705; | -  | \n| Support Vector Machines (SVMs) &#x2705; | -  | \n| Nearest Neighbors &#x2705; | -  |  \n| Ensemble Models &#x2705; | - | \n| Pipeline Model &#x2705; | - |\n| Preprocessing Models &#x2705; | - |\n| Cross Decomposition Models &#x2705; | - |\n\n\nDetails are available in [Supported Models](https://github.com/openscilab/pymilo/blob/main/SUPPORTED_MODELS.md).\n\n## Issues & bug reports\n\nJust fill an issue and describe it. We'll check it ASAP! or send an email to [pymilo@openscilab.com](mailto:pymilo@openscilab.com \"pymilo@openscilab.com\"). \n\n- Please complete the issue template\n \nYou can also join our discord server\n\n<a href=\"https://discord.gg/mtuMS8AjDS\">\n  <img src=\"https://img.shields.io/discord/1064533716615049236.svg?style=for-the-badge\" alt=\"Discord Channel\">\n</a>\n\n## Acknowledgments\n\n[Python Software Foundation (PSF)](https://www.python.org/psf/) grants PyMilo library partially for versions **1.0, 1.1**. [PSF](https://www.python.org/psf/) is the organization behind Python. Their mission is to promote, protect, and advance the Python programming language and to support and facilitate the growth of a diverse and international community of Python programmers.\n\n<a href=\"https://www.python.org/psf/\"><img src=\"https://github.com/openscilab/pymilo/raw/main/otherfiles/psf.png\" height=\"65px\" alt=\"Python Software Foundation\"></a>\n\n[Trelis Research](https://trelis.com/) grants PyMilo library partially for version **1.0**. [Trelis Research](https://trelis.com/) provides tools and tutorials for businesses and developers looking to fine-tune and deploy large language models.\n\n<a href=\"https://trelis.com/\"><img src=\"https://trelis.com/wp-content/uploads/2023/10/android-chrome-512x512-1.png\" height=\"75px\" alt=\"Trelis Research\"></a>\n\n\n## Show your support\n\n\n### Star this repo\n\nGive a \u2b50\ufe0f if this project helped you!\n\n### Donate to our project\nIf you do like our project and we hope that you do, can you please support us? Our project is not and is never going to be working for profit. We need the money just so we can continue doing what we do ;-) .\t\t\t\n\n<a href=\"https://openscilab.com/#donation\" target=\"_blank\"><img src=\"https://github.com/openscilab/pymilo/raw/main/otherfiles/donation.png\" height=\"90px\" width=\"270px\" alt=\"PyMilo Donation\"></a>\n\n# Changelog\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)\nand this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).\n\n## [1.1] - 2024-11-25\n### Added\n- `is_socket_closed` function in `streaming.communicator.py`\n- `validate_http_url` function in `streaming.util.py`\n- `validate_websocket_url` function in `streaming.util.py`\n- `ML Streaming` WebSocket testcases\n- `CommunicationProtocol` Enum in `streaming.communicator.py`\n- `WebSocketClientCommunicator` class in `streaming.communicator.py`\n- `WebSocketServerCommunicator` class in `streaming.communicator.py`\n- batch operation testcases\n- `batch_export` function in `pymilo/pymilo_obj.py` \n- `batch_import` function in `pymilo/pymilo_obj.py`\n- `CCA` model\n- `PLSCanonical` model\n- `PLSRegression` model\n- Cross decomposition models test runner\n- Cross decomposition chain\n- PyMilo exception types added in `pymilo/exceptions/__init__.py`\n- PyMilo exception types added in `pymilo/__init__.py`\n### Changed\n- `core` and `streaming` tests divided in `test.yml`\n- `communication_protocol` parameter added to `PyMiloClient` class\n- `communication_protocol` parameter added to `PyMiloServer` class\n- `ML Streaming` testcases updated to support protocol selection\n- `README.md` updated\n- Tests config modified\n- Cross decomposition params initialized in `pymilo_param`\n- Cross decomposition support added to `pymilo_func.py`\n- `SUPPORTED_MODELS.md` updated\n- `README.md` updated\n- GitHub actions are limited to the `dev` and `main` branches\n- `Python 3.13` added to `test.yml`\n## [1.0] - 2024-09-16\n### Added\n- Compression method test in `ML Streaming` RESTful testcases\n- `CLI` handler in `tests/test_ml_streaming/run_server.py`\n- `Compression` Enum in `streaming.compressor.py`\n- `GZIPCompressor` class in `streaming.compressor.py`\n- `ZLIBCompressor` class in `streaming.compressor.py`\n- `LZMACompressor` class in `streaming.compressor.py`\n- `BZ2Compressor` class in `streaming.compressor.py`\n- `encrypt_compress` function in `PymiloClient`\n- `parse` function in `RESTServerCommunicator`\n- `is_callable_attribute` function in `PymiloServer`\n- `streaming.param.py`\n- `attribute_type` function in `RESTServerCommunicator`\n- `AttributeTypePayload` class in `RESTServerCommunicator`\n- `attribute_type` function in `RESTClientCommunicator`\n- `Mode` Enum in `PymiloClient`\n- Import from url testcases\n- `download_model` function in `utils.util.py`\n- `PymiloServer` class in `streaming.pymilo_server.py`\n- `PymiloClient` class in `PymiloClient`\n- `Communicator` interface in `streaming.interfaces.py`\n- `RESTClientCommunicator` class in `streaming.communicator.py`\n- `RESTServerCommunicator` class in `streaming.communicator.py`\n- `Compressor` interface in `streaming.interfaces.py`\n- `DummyCompressor` class in `streaming.compressor.py`\n- `Encryptor` interface in `streaming.interfaces.py`\n- `DummyEncryptor` class in `streaming.encryptor.py`\n- `ML Streaming` RESTful testcases\n- `streaming-requirements.txt`\n### Changed\n- `README.md` updated\n- `ML Streaming` RESTful testcases\n- `attribute_call` function in `RESTServerCommunicator`\n- `AttributeCallPayload` class in `RESTServerCommunicator`\n- upload function in `RESTClientCommunicator`\n- download function in `RESTClientCommunicator`\n- `__init__` function in `RESTClientCommunicator`\n- `attribute_calls` function in `RESTClientCommunicator`\n- `requests` added to `requirements.txt`\n- `uvicorn`, `fastapi`, `requests` and `pydantic` added to `dev-requirements.txt`\n- `ML Streaming` RESTful testcases\n- `__init__` function in `PymiloServer`\n- `__getattr__` function in `PymiloClient`\n- `__init__` function in `PymiloClient`\n- `toggle_mode` function in `PymiloClient`\n- `upload` function in `PymiloClient`\n- `download` function in `PymiloClient`\n- `__init__` function in `PymiloServer`\n- `serialize_cfnode` function in `transporters.cfnode_transporter.py`\n- `__init__` function in `Import` class\n- `serialize` function in `transporters.tree_transporter.py`\n- `deserialize` function in `transporters.tree_transporter.py`\n- `serialize` function in `transporters.sgdoptimizer_transporter.py`\n- `deserialize` function in `transporters.sgdoptimizer_transporter.py`\n- `serialize` function in `transporters.randomstate_transporter.py`\n- `deserialize` function in `transporters.randomstate_transporter.py`\n- `serialize` function in `transporters.bunch_transporter.py`\n- `deserialize` function in `transporters.bunch_transporter.py`\n- `serialize` function in `transporters.adamoptimizer_transporter.py`\n- `deserialize` function in `transporters.adamoptimizer_transporter.py`\n- `serialize_linear_model` function in `chains.linear_model_chain.py`\n- `serialize_ensemble` function in `chains.ensemble_chain.py`\n- `serialize` function in `GeneralDataStructureTransporter` Transporter refactored\n- `get_deserialized_list` function in `GeneralDataStructureTransporter` Transporter refactored\n- `Export` class call by reference bug fixed\n## [0.9] - 2024-07-01\n### Added\n- Anaconda workflow\n- `prefix_list` function in `utils.util.py`\n- `KBinsDiscretizer` preprocessing model\n- `PowerTransformer` preprocessing model\n- `SplineTransformer` preprocessing model\n- `TargetEncoder` preprocessing model\n- `QuantileTransformer` preprocessing model\n- `RobustScaler` preprocessing model\n- `PolynomialFeatures` preprocessing model\n- `OrdinalEncoder` preprocessing model\n- `Normalizer` preprocessing model\n- `MaxAbsScaler` preprocessing model\n- `MultiLabelBinarizer` preprocessing model\n- `KernelCenterer` preprocessing model\n- `FunctionTransformer` preprocessing model\n- `Binarizer` preprocessing model\n- Preprocessing models test runner\n### Changed\n- `Command` enum class in `transporter.py`\n- `SerializationErrorTypes` enum class in `serialize_exception.py`\n- `DeserializationErrorTypes` enum class in `deserialize_exception.py`\n- `meta.yaml` modified\n- `NaN` type in `pymilo_param`\n- `NaN` type transportation in `GeneralDataStructureTransporter` Transporter\n- `BSpline` Transportation in `PreprocessingTransporter` Transporter\n- one layer deeper transportation in `PreprocessingTransporter` Transporter\n- dictating outer ndarray dtype in `GeneralDataStructureTransporter` Transporter \n- preprocessing params fulfilled in `pymilo_param`\n- `SUPPORTED_MODELS.md` updated\n- `README.md` updated\n- `serialize_possible_ml_model` in the Ensemble chain\n## [0.8] - 2024-05-06\n### Added\n- `StandardScaler` Transformer in `pymilo_param.py`\n- `PreprocessingTransporter` Transporter\n- ndarray shape config in `GeneralDataStructure` Transporter\n- `util.py` in chains\n- `BinMapperTransporter` Transporter\n- `BunchTransporter` Transporter\n- `GeneratorTransporter` Transporter\n- `TreePredictorTransporter` Transporter\n- `AdaboostClassifier` model\n- `AdaboostRegressor` model\n- `BaggingClassifier` model\n- `BaggingRegressor` model\n- `ExtraTreesClassifier` model\n- `ExtraTreesRegressor` model\n- `GradientBoosterClassifier` model\n- `GradientBoosterRegressor` model\n- `HistGradientBoosterClassifier` model\n- `HistGradientBoosterRegressor` model\n- `RandomForestClassifier` model\n- `RandomForestRegressor` model\n- `IsolationForest` model\n- `RandomTreesEmbedding` model\n- `StackingClassifier` model\n- `StackingRegressor` model\n- `VotingClassifier` model\n- `VotingRegressor` model\n- `Pipeline` model\n- Ensemble models test runner\n- Ensemble chain\n- `SECURITY.md`\n### Changed\n- `Pipeline` test updated\n- `LabelBinarizer`,`LabelEncoder` and `OneHotEncoder` got embedded in `PreprocessingTransporter`\n- Preprocessing support added to Ensemble chain\n- Preprocessing params initialized in `pymilo_param`\n- `util.py` in utils updated\n- `test_pymilo.py` updated\n- `pymilo_func.py` updated\n- `linear_model_chain.py` updated\n- `neural_network_chain.py` updated\n- `decision_tree_chain.py` updated\n- `clustering_chain.py` updated\n- `naive_bayes_chain.py` updated\n- `neighbours_chain.py` updated\n- `svm_chain.py` updated\n- `GeneralDataStructure` Transporter updated\n- `LossFunction` Transporter updated\n- `AbstractTransporter` updated\n- Tests config modified\n- Unequal sklearn version error added in `pymilo_param.py`\n- Ensemble params initialized in `pymilo_param`\n- Ensemble support added to `pymilo_func.py`\n- `SUPPORTED_MODELS.md` updated\n- `README.md` updated\n## [0.7] - 2024-04-03\n### Added\n- `pymilo_nearest_neighbor_test` function added to `test_pymilo.py`\n- `NeighborsTreeTransporter` Transporter\n- `LocalOutlierFactor` model\n- `RadiusNeighborsClassifier` model\n- `RadiusNeighborsRegressor` model\n- `NearestCentroid` model\n- `NearestNeighbors` model\n- `KNeighborsClassifier` model\n- `KNeighborsRegressor` model\n- Neighbors models test runner\n- Neighbors chain\n### Changed\n- Tests config modified\n- Neighbors params initialized in `pymilo_param`\n- Neighbors support added to `pymilo_func.py`\n- `SUPPORTED_MODELS.md` updated\n- `README.md` updated\n## [0.6] - 2024-03-27\n### Added\n- `deserialize_primitive_type` function in `GeneralDataStructureTransporter`\n- `is_deserialized_ndarray` function in `GeneralDataStructureTransporter`\n- `deep_deserialize_ndarray` function in `GeneralDataStructureTransporter`\n- `deep_serialize_ndarray`  function in `GeneralDataStructureTransporter`\n- `SVR` model\n- `SVC` model\n- `One Class SVM` model\n- `NuSVR` model\n- `NuSVC` model\n- `Linear SVR` model\n- `Linear SVC` model\n- SVM models test runner\n- SVM chain\n### Changed\n- `pymilo_param.py` updated\n- `pymilo_obj.py` updated to use predefined strings\n- `TreeTransporter` updated\n- `get_homogeneous_type` function in `util.py` updated\n- `GeneralDataStructureTransporter` updated to use deep ndarray serializer & deserializer\n- `check_str_in_iterable` updated\n- `Label Binarizer` Transporter updated\n- `Function` Transporter updated\n- `CFNode` Transporter updated\n- `Bisecting Tree` Transporter updated\n- Tests config modified\n- SVM params initialized in `pymilo_param`\n- SVM support added to `pymilo_func.py`\n- `SUPPORTED_MODELS.md` updated\n- `README.md` updated\n## [0.5] - 2024-01-31\n### Added\n- `reset` function in the `Transport` interface\n- `reset` function implementation in `AbstractTransporter`\n- `Gaussian Naive Bayes` declared as `GaussianNB` model \n- `Multinomial Naive Bayes` model declared as `MultinomialNB` model\n- `Complement Naive Bayes` model declared as `ComplementNB` model\n- `Bernoulli Naive Bayes` model declared as `BernoulliNB` model\n- `Categorical Naive Bayes` model declared as `CategoricalNB` model\n- Naive Bayes models test runner\n- Naive Bayes chain\n### Changed\n- `Transport` function of `AbstractTransporter` updated\n- fix the order of `CFNode` fields serialization in `CFNodeTransporter`\n- `GeneralDataStructureTransporter` support list of ndarray with different shapes\n- Tests config modified\n- Naive Bayes params initialized in `pymilo_param`\n- Naive Bayes support added to `pymilo_func.py`\n- `SUPPORTED_MODELS.md` updated\n- `README.md` updated\n## [0.4] - 2024-01-22\n### Added\n- `has_named_parameter` method in `util.py`\n- `CFSubcluster` Transporter(inside `CFNode` Transporter)\n- `CFNode` Transporter\n- `Birch` model\n- `SpectralBiclustering` model\n- `SpectralCoclustering` model\n- `MiniBatchKMeans` model\n- `feature_request.yml` template\n- `config.yml` for issue template\n- `BayesianGaussianMixture` model\n- `serialize_tuple` method in `GeneralDataStructureTransporter`\n- `import_function` method in `util.py`\n- `Function` Transporter\n- `FeatureAgglomeration` model\n- `HDBSCAN` model\n- `GaussianMixture` model\n- `OPTICS` model\n- `DBSCAN` model\n- `AgglomerativeClustering` model\n- `SpectralClustering` model\n- `MeanShift` model \n- `AffinityPropagation` model\n- `Kmeans` model\n- Clustering models test runner\n- Clustering chain \n### Changed\n- `LossFunctionTransporter` enhanced to handle scikit 1.4.0 `_loss_function_` field\n- Codacy Static Code Analyzer's suggestions applied\n- Spectral Clustering test folder refactored\n- Bug report template modified\n- `GeneralDataStructureTransporter` updated\n- Tests config modified\n- Clustering data set preparation added to `data_exporter.py`\n- Clustering params initialized in `pymilo_param`\n- Clustering support added to `pymilo_func.py`\n- `Python 3.12` added to `test.yml`\n- `dev-requirements.txt` updated\n- Code quality badges added to `README.md`\n- `SUPPORTED_MODELS.md` updated\n- `README.md` updated\n## [0.3] - 2023-09-27\n### Added\n- scikit-learn decision tree models\n- `ExtraTreeClassifier` model\n- `ExtraTreeRegressor` model\n- `DecisionTreeClassifier` model\n- `DecisionTreeRegressor` model\n- `Tree` Transporter\n- Decision Tree chain\n### Changed\n- Tests config modified\n- DecisionTree params initialized in `pymilo_param`\n- Decision Tree support added to `pymilo_func.py`\n## [0.2] - 2023-08-02\n### Added\n- scikit-learn neural network models \n- `MLP Regressor` model \n- `MLP Classifier` model\n- `BernoulliRBN` model\n- `SGDOptimizer` transporter\n- `RandomState(MT19937)` transporter\n- `Adamoptimizer` transporter\n- Neural Network chain\n- Neural Network exceptions \n- `ndarray_to_list` method in `GeneralDataStructureTransporter`\n- `list_to_ndarray` method in `GeneralDataStructureTransporter` \n- `neural_network_chain.py` chain\n### Changed\n- `GeneralDataStructure` Transporter updated\n- `LabelBinerizer` Transporter updated\n- `linear model` chain updated\n- GeneralDataStructure transporter enhanced\n- LabelBinerizer transporter updated\n- transporters' chain router added to `pymilo func`\n- NeuralNetwork params initialized in `pymilo_param`\n- `pymilo_test` updated to support multiple models\n- `linear_model_chain` refactored\n## [0.1] - 2023-06-29\n### Added\n- scikit-learn linear models support\n- `Export` class\n- `Import` class\n\n[Unreleased]: https://github.com/openscilab/pymilo/compare/v1.1...dev\n[1.1]: https://github.com/openscilab/pymilo/compare/v1.0...v1.1\n[1.0]: https://github.com/openscilab/pymilo/compare/v0.9...v1.0\n[0.9]: https://github.com/openscilab/pymilo/compare/v0.8...v0.9\n[0.8]: https://github.com/openscilab/pymilo/compare/v0.7...v0.8\n[0.7]: https://github.com/openscilab/pymilo/compare/v0.6...v0.7\n[0.6]: https://github.com/openscilab/pymilo/compare/v0.5...v0.6\n[0.5]: https://github.com/openscilab/pymilo/compare/v0.4...v0.5\n[0.4]: https://github.com/openscilab/pymilo/compare/v0.3...v0.4\n[0.3]: https://github.com/openscilab/pymilo/compare/v0.2...v0.3\n[0.2]: https://github.com/openscilab/pymilo/compare/v0.1...v0.2\n[0.1]: https://github.com/openscilab/pymilo/compare/e887108...v0.1\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Transportation of ML models",
    "version": "1.1",
    "project_urls": {
        "Download": "https://github.com/openscilab/pymilo/tarball/v1.1",
        "Homepage": "https://github.com/openscilab/pymilo",
        "Source": "https://github.com/openscilab/pymilo"
    },
    "split_keywords": [
        "python3",
        "python",
        "machine_learning",
        "ml"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "605c36838581a8ba1bab051124aead5b157e4cf57dae5b0daf03c664272b7506",
                "md5": "03568e22058c6e8943bc14ea20c5652c",
                "sha256": "dca545e57fb53e23e8658a9f7dd30378b4fc5998cd38b67ff540dd3e505e9a6a"
            },
            "downloads": -1,
            "filename": "pymilo-1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "03568e22058c6e8943bc14ea20c5652c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 79348,
            "upload_time": "2024-11-25T17:01:04",
            "upload_time_iso_8601": "2024-11-25T17:01:04.842343Z",
            "url": "https://files.pythonhosted.org/packages/60/5c/36838581a8ba1bab051124aead5b157e4cf57dae5b0daf03c664272b7506/pymilo-1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e4f1af03ea9869d285809f05a0ff65ba07638b86710504a96921083e0732c04b",
                "md5": "f5c679b4377a00a01f429459f04913a9",
                "sha256": "05383f2fb04f24d3ea5237444fa6b0cfeda55e3a2f369562017fc0e167ae5ffd"
            },
            "downloads": -1,
            "filename": "pymilo-1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "f5c679b4377a00a01f429459f04913a9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 57593,
            "upload_time": "2024-11-25T17:01:03",
            "upload_time_iso_8601": "2024-11-25T17:01:03.648575Z",
            "url": "https://files.pythonhosted.org/packages/e4/f1/af03ea9869d285809f05a0ff65ba07638b86710504a96921083e0732c04b/pymilo-1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-25 17:01:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "openscilab",
    "github_project": "pymilo",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "lcname": "pymilo"
}
        
Elapsed time: 0.36981s