jaqpotpy


Namejaqpotpy JSON
Version 6.19.2 PyPI version JSON
download
home_pageNone
SummaryClient library for managing machine learning models on the Jaqpot platform
upload_time2024-12-17 09:11:29
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseNone
keywords
VCS
bugtrack_url
requirements pandas pyjwt simplejson pydotplus requests pydantic rdkit mordredcommunity scikit-learn tqdm kennard-stone mendeleev pymatgen skl2onnx onnx onnxruntime httpx attrs python-keycloak ruff polling2 python-dotenv torch torch-geometric onnxmltools xgboost pre-commit
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![Build and test](https://github.com/ntua-unit-of-control-and-informatics/jaqpotpy/actions/workflows/build.yml/badge.svg)](https://github.com/ntua-unit-of-control-and-informatics/jaqpotpy/actions/workflows/build.yml) [![Publish to PyPI 📦](https://github.com/ntua-unit-of-control-and-informatics/jaqpotpy/actions/workflows/pipy_release.yml/badge.svg)](https://github.com/ntua-unit-of-control-and-informatics/jaqpotpy/actions/workflows/pipy_release.yml)

# Jaqpotpy

The jaqpotpy library enables you to upload and deploy machine learning models to the Jaqpot platform. Once uploaded, you can manage, document, and share your models via the Jaqpot user interface at **https://app.jaqpot.org**. You can also make predictions online or programmatically using the [Jaqpot API](https://api.jaqpot.org).

## Getting Started

### Prerequisites

- Python 3.10
- An account on **https://app.jaqpot.org**

### Installation

Install jaqpotpy using pip:

```bash
pip install jaqpotpy
```

### Model Training and Deployment

Follow these steps to train and deploy your model on Jaqpot:

	1. Train your model using pandas DataFrame as input.
	2. Deploy the trained model using the deploy_on_jaqpot function.

#### Example Code

```python
import pandas as pd
import numpy as np
from sklearn.ensemble import RandomForestRegressor
from jaqpotpy import Jaqpot
from jaqpotpy.datasets import JaqpotpyDataset
from jaqpotpy.models import SklearnModel

# Creating a Simulated Dataset for Model Training
np.random.seed(42)
X1 = np.random.rand(100)
X2 = np.random.rand(100)
ACTIVITY = 2 * X1 + 3 * X2 + np.random.randn(100) * 0.1
df = pd.DataFrame({"X1": X1, "X2": X2, "ACTIVITY": ACTIVITY})
y_cols = ["ACTIVITY"]
x_cols = ["X1", "X2"]

# Step 1: Create a Jaqpotpy dataset
dataset = JaqpotpyDataset(df=df, y_cols=y_cols, x_cols=x_cols, task="regression")

# Step 2: Build a model
rf = RandomForestRegressor(random_state=42)
myModel = SklearnModel(dataset=dataset, model=rf)
myModel.fit()

# Step 3: Upload the model on Jaqpot
jaqpot = Jaqpot() 
jaqpot.login() #log in to Jaqppt
myModel.deploy_on_jaqpot(
    jaqpot=jaqpot,
    name="Demo: Regression",
    description="This is a description",
    visibility="PRIVATE"
)

```

Once your model is successfully deployed on the Jaqpot platform, the function will provide you with the model ID that you can use to manage your model through the user interface and API.

Console Output:
```text
<DATE> - INFO - Model has been successfully uploaded. The url of the model is https://app.jaqpot.org/dashboard/models/<ModelID>
```

#### Managing Your Models

You can further manage your models through the Jaqpot user interface at https://app.jaqpot.org. This platform allows you to view detailed documentation, share models with your contacts, and make predictions.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "jaqpotpy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "Unit of Process Control and Informatics | National Technical University of Athens <upci.ntua@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/bc/25/c52afda8a0d51050e4e8a47127298fb018109f4af4176d38448a0232fe26/jaqpotpy-6.19.2.tar.gz",
    "platform": null,
    "description": "[![Build and test](https://github.com/ntua-unit-of-control-and-informatics/jaqpotpy/actions/workflows/build.yml/badge.svg)](https://github.com/ntua-unit-of-control-and-informatics/jaqpotpy/actions/workflows/build.yml) [![Publish to PyPI \ud83d\udce6](https://github.com/ntua-unit-of-control-and-informatics/jaqpotpy/actions/workflows/pipy_release.yml/badge.svg)](https://github.com/ntua-unit-of-control-and-informatics/jaqpotpy/actions/workflows/pipy_release.yml)\n\n# Jaqpotpy\n\nThe jaqpotpy library enables you to upload and deploy machine learning models to the Jaqpot platform. Once uploaded, you can manage, document, and share your models via the Jaqpot user interface at **https://app.jaqpot.org**. You can also make predictions online or programmatically using the [Jaqpot API](https://api.jaqpot.org).\n\n## Getting Started\n\n### Prerequisites\n\n- Python 3.10\n- An account on **https://app.jaqpot.org**\n\n### Installation\n\nInstall jaqpotpy using pip:\n\n```bash\npip install jaqpotpy\n```\n\n### Model Training and Deployment\n\nFollow these steps to train and deploy your model on Jaqpot:\n\n\t1. Train your model using pandas DataFrame as input.\n\t2. Deploy the trained model using the deploy_on_jaqpot function.\n\n#### Example Code\n\n```python\nimport pandas as pd\nimport numpy as np\nfrom sklearn.ensemble import RandomForestRegressor\nfrom jaqpotpy import Jaqpot\nfrom jaqpotpy.datasets import JaqpotpyDataset\nfrom jaqpotpy.models import SklearnModel\n\n# Creating a Simulated Dataset for Model Training\nnp.random.seed(42)\nX1 = np.random.rand(100)\nX2 = np.random.rand(100)\nACTIVITY = 2 * X1 + 3 * X2 + np.random.randn(100) * 0.1\ndf = pd.DataFrame({\"X1\": X1, \"X2\": X2, \"ACTIVITY\": ACTIVITY})\ny_cols = [\"ACTIVITY\"]\nx_cols = [\"X1\", \"X2\"]\n\n# Step 1: Create a Jaqpotpy dataset\ndataset = JaqpotpyDataset(df=df, y_cols=y_cols, x_cols=x_cols, task=\"regression\")\n\n# Step 2: Build a model\nrf = RandomForestRegressor(random_state=42)\nmyModel = SklearnModel(dataset=dataset, model=rf)\nmyModel.fit()\n\n# Step 3: Upload the model on Jaqpot\njaqpot = Jaqpot() \njaqpot.login() #log in to Jaqppt\nmyModel.deploy_on_jaqpot(\n    jaqpot=jaqpot,\n    name=\"Demo: Regression\",\n    description=\"This is a description\",\n    visibility=\"PRIVATE\"\n)\n\n```\n\nOnce your model is successfully deployed on the Jaqpot platform, the function will provide you with the model ID that you can use to manage your model through the user interface and API.\n\nConsole Output:\n```text\n<DATE> - INFO - Model has been successfully uploaded. The url of the model is https://app.jaqpot.org/dashboard/models/<ModelID>\n```\n\n#### Managing Your Models\n\nYou can further manage your models through the Jaqpot user interface at https://app.jaqpot.org. This platform allows you to view detailed documentation, share models with your contacts, and make predictions.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Client library for managing machine learning models on the Jaqpot platform",
    "version": "6.19.2",
    "project_urls": {
        "Homepage": "https://github.com/ntua-unit-of-control-and-informatics/jaqpotpy"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "77ffe04a0a8bf0bf3e5a36c3e4786d8643cf81a2cb89bab8e9cf700fa50c8f70",
                "md5": "2d2f8d7185dbde2b9b95912f7a2714e1",
                "sha256": "eb69e5f7c06896243eccd16b8a7b10945cec811f1be841200ac6f17f9232f288"
            },
            "downloads": -1,
            "filename": "jaqpotpy-6.19.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2d2f8d7185dbde2b9b95912f7a2714e1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 255264,
            "upload_time": "2024-12-17T09:11:27",
            "upload_time_iso_8601": "2024-12-17T09:11:27.134735Z",
            "url": "https://files.pythonhosted.org/packages/77/ff/e04a0a8bf0bf3e5a36c3e4786d8643cf81a2cb89bab8e9cf700fa50c8f70/jaqpotpy-6.19.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bc25c52afda8a0d51050e4e8a47127298fb018109f4af4176d38448a0232fe26",
                "md5": "af6a354fbbec9e8d7aad2e7f018c45b8",
                "sha256": "690266683685d6d23d6e8c7ba158e631ed759e452260d74e27e15f164255ea2c"
            },
            "downloads": -1,
            "filename": "jaqpotpy-6.19.2.tar.gz",
            "has_sig": false,
            "md5_digest": "af6a354fbbec9e8d7aad2e7f018c45b8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 124885,
            "upload_time": "2024-12-17T09:11:29",
            "upload_time_iso_8601": "2024-12-17T09:11:29.799672Z",
            "url": "https://files.pythonhosted.org/packages/bc/25/c52afda8a0d51050e4e8a47127298fb018109f4af4176d38448a0232fe26/jaqpotpy-6.19.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-17 09:11:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ntua-unit-of-control-and-informatics",
    "github_project": "jaqpotpy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "pandas",
            "specs": [
                [
                    "==",
                    "2.2.2"
                ]
            ]
        },
        {
            "name": "pyjwt",
            "specs": [
                [
                    "==",
                    "2.8.0"
                ]
            ]
        },
        {
            "name": "simplejson",
            "specs": [
                [
                    "==",
                    "3.19.2"
                ]
            ]
        },
        {
            "name": "pydotplus",
            "specs": [
                [
                    "==",
                    "2.0.2"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.32.2"
                ]
            ]
        },
        {
            "name": "pydantic",
            "specs": [
                [
                    "==",
                    "2.7.1"
                ]
            ]
        },
        {
            "name": "rdkit",
            "specs": [
                [
                    "==",
                    "2023.9.6"
                ]
            ]
        },
        {
            "name": "mordredcommunity",
            "specs": [
                [
                    "==",
                    "2.0.5"
                ]
            ]
        },
        {
            "name": "scikit-learn",
            "specs": [
                [
                    "==",
                    "1.5.0"
                ]
            ]
        },
        {
            "name": "tqdm",
            "specs": [
                [
                    "==",
                    "4.66.4"
                ]
            ]
        },
        {
            "name": "kennard-stone",
            "specs": [
                [
                    "==",
                    "2.2.1"
                ]
            ]
        },
        {
            "name": "mendeleev",
            "specs": [
                [
                    "==",
                    "0.16.2"
                ]
            ]
        },
        {
            "name": "pymatgen",
            "specs": [
                [
                    "==",
                    "2024.5.1"
                ]
            ]
        },
        {
            "name": "skl2onnx",
            "specs": [
                [
                    "==",
                    "1.17.0"
                ]
            ]
        },
        {
            "name": "onnx",
            "specs": [
                [
                    "==",
                    "1.17.0"
                ]
            ]
        },
        {
            "name": "onnxruntime",
            "specs": [
                [
                    "==",
                    "1.19.2"
                ]
            ]
        },
        {
            "name": "httpx",
            "specs": [
                [
                    "==",
                    "0.27.0"
                ]
            ]
        },
        {
            "name": "attrs",
            "specs": [
                [
                    "==",
                    "23.2.0"
                ]
            ]
        },
        {
            "name": "python-keycloak",
            "specs": [
                [
                    "==",
                    "4.3.0"
                ]
            ]
        },
        {
            "name": "ruff",
            "specs": [
                [
                    "==",
                    "0.6.3"
                ]
            ]
        },
        {
            "name": "polling2",
            "specs": [
                [
                    "==",
                    "0.5.0"
                ]
            ]
        },
        {
            "name": "python-dotenv",
            "specs": [
                [
                    "==",
                    "1.0.1"
                ]
            ]
        },
        {
            "name": "torch",
            "specs": [
                [
                    "==",
                    "2.3.0"
                ]
            ]
        },
        {
            "name": "torch-geometric",
            "specs": [
                [
                    "==",
                    "2.5.0"
                ]
            ]
        },
        {
            "name": "onnxmltools",
            "specs": [
                [
                    "==",
                    "1.12.0"
                ]
            ]
        },
        {
            "name": "xgboost",
            "specs": [
                [
                    "==",
                    "2.1.1"
                ]
            ]
        },
        {
            "name": "pre-commit",
            "specs": [
                [
                    "==",
                    "4.0.1"
                ]
            ]
        }
    ],
    "lcname": "jaqpotpy"
}
        
Elapsed time: 0.42010s