A Python SDK for tracking Model requests and responses.
Project description
Handit.AI Python SDK Documentation
AI model deployment and management often fall short of delivering the expected business outcomes, with up to 80% of AI projects never scaling beyond pilot stages. To address this challenge, Handit.AI provides a comprehensive AI Lifecycle Management Platform that ensures AI models are continuously aligned with business goals and KPIs.
The Handit.AI Python SDK is designed to streamline the process of monitoring, tracking, and optimizing AI models in production. With features for automated and manual data capture, seamless integration, and real-time performance insights, this SDK empowers businesses to maintain the effectiveness and reliability of their AI models.
What Handit.AI Python SDK Offers
-
Continuous Monitoring of AI Models
Detect performance degradation and data drift in real-time, ensuring your models remain accurate and reliable. -
Automated Data Capture
Automatically track model inputs and outputs for HTTP requests using tools likerequests, streamlining the tracking process without requiring manual intervention. -
Business KPI Alignment
Capture and monitor AI model inputs and outputs to align model performance with your business’s strategic objectives. -
Seamless Integration
Easily integrate into your existing Python-based AI workflows, including popular frameworks like PyTorch, TensorFlow, and Scikit-learn. -
Custom AI Model Tracking
Manually track specific model events to ensure critical data is never missed, providing a holistic view of AI model performance.
Why Use Handit.AI Python SDK?
Handit.AI Python SDK addresses the critical issues AI projects face, such as the disconnect between model performance and business goals, performance degradation, and lack of continuous optimization. By integrating our tracking tools, your AI models become transparent, measurable, and continuously optimized, helping you achieve long-term success.
Key Benefits:
-
Improved AI ROI
Directly connect model performance to business outcomes, ensuring that your AI initiatives deliver the value they promise. -
Proactive Issue Prevention
Identify performance issues and data drift early, allowing for rapid optimization. -
Reduced Time to Market
Automate much of the manual work required to monitor and optimize AI models, accelerating the deployment process.
Installation
Install the SDK from PyPI:
pip install handit-sdk
Getting Started
1. Configure the SDK
Set up the SDK with your API key and tracking server URL (optional):
from handit_tracker import HanditTracker
tracker = HanditTracker()
tracker.config(api_key="your-api-key", tracking_url="https://your-custom-tracking-url.com")
2. Automatically Intercept HTTP Requests
Wrap your requests library calls to automatically capture data:
import requests
from handit_tracker import HanditTracker
tracker = HanditTracker()
tracker.config(api_key="your-api-key")
# Intercept requests
@tracker.intercept_requests
def make_request(url, **kwargs):
return requests.get(url, **kwargs)
response = make_request("https://example.com/api/data")
3. Manually Capture Model Data
Manually capture model input and output data for specific events:
tracker.capture_model(
model_id="model-slug",
request_body={"input_key": "input_value"},
response_body={"output_key": "output_value"}
)
Advanced Features
-
Update Tracked URLs Dynamically
The SDK automatically fetches the list of URLs to track from the configured tracking server. -
Customizable Model ID Extraction
Adjust the logic for extractingmodel_idfrom the URL based on your API's structure. -
Error Handling and Reporting
Automatically report errors and failed API responses for improved visibility into issues.
Contributing
We welcome contributions! Please visit the GitHub repository to report issues or submit pull requests.
License
This project is licensed under the MIT License. See the LICENSE file for details.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file handit_sdk-1.16.0.tar.gz.
File metadata
- Download URL: handit_sdk-1.16.0.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e71142588d3eee351a919aa644fe6bf51deecd7f6445f91cc00e568abdbd8106
|
|
| MD5 |
a93ce029c9790eba4e43b8884f1800db
|
|
| BLAKE2b-256 |
99d035ce4cba537bd8de03c0b84fdc3115fb5c1c71b00e7a879f325cfb8e28fd
|
File details
Details for the file handit_sdk-1.16.0-py3-none-any.whl.
File metadata
- Download URL: handit_sdk-1.16.0-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d96473cdd2a6269cf8c3f7d34052fbff9acd65093ca6849b568ec126d17aca9
|
|
| MD5 |
c467b4a94ddbd041685742570609c4b8
|
|
| BLAKE2b-256 |
1bbfb65e53665285f6475be1802f9d94faa690631992f549b8a33fe4f323f93e
|