Skip to main content

Client library for managing machine learning models on the Jaqpot platform

Project description

Build and test Publish to PyPI 📦

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.

Getting Started

Prerequisites

Installation

Install jaqpotpy using pip:

pip install jaqpotpy

Logging In

To use jaqpotpy, you need to log in to the Jaqpot platform. You can log in using the login() method

Login with Username and Password

from jaqpotpy import Jaqpot

jaqpot = Jaqpot()
jaqpot.login()

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

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

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()
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:

<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.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jaqpotpy-6.10.2.tar.gz (126.5 kB view details)

Uploaded Source

Built Distribution

jaqpotpy-6.10.2-py3-none-any.whl (249.7 kB view details)

Uploaded Python 3

File details

Details for the file jaqpotpy-6.10.2.tar.gz.

File metadata

  • Download URL: jaqpotpy-6.10.2.tar.gz
  • Upload date:
  • Size: 126.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for jaqpotpy-6.10.2.tar.gz
Algorithm Hash digest
SHA256 b6735c10dfaf6013b3d5ec89411e751129244fa951995d256a459af10e0e9678
MD5 af50fa156e7c2ef9f2e1f8a93fd076fa
BLAKE2b-256 c48e47dc35478d588bf487fc480b6a5738a970772875d9e4fc6f10fa752834af

See more details on using hashes here.

File details

Details for the file jaqpotpy-6.10.2-py3-none-any.whl.

File metadata

  • Download URL: jaqpotpy-6.10.2-py3-none-any.whl
  • Upload date:
  • Size: 249.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for jaqpotpy-6.10.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6e53fea21807785285c3543dec76a5d217923db3597c8afd75196abd1e97243e
MD5 0190c96ff89dd50cad81a55db611b500
BLAKE2b-256 d50af64a2f588d674dce9b0fe127f362d54344153171107e82dffee05fbbe03b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page