Python SDK for monitoring and validating Machine Learning models.
Project description
MLSentinel
MLSentinel is a Python SDK that enables Machine Learning developers to validate and submit model evaluation reports to the MLSentinel platform. The SDK performs local validation before securely sending reports to the backend using API key authentication.
๐ง Developer Preview
MLSentinel is currently under active development. This release provides the SDK foundation, including input validation, backend communication, API key authentication, and custom exceptions. AI-powered model analysis and dashboard features will be introduced in future releases.
๐ What's New in v0.1.3.dev2
- โ Added HTTP transport layer
- โ Connected SDK with MLSentinel backend
- โ
Added API Key authentication (
X-API-Key) - โ Added request timeout handling
- โ Added custom SDK exceptions
- โ Improved input validation
- โ Improved SDK architecture
- โ Various bug fixes and code improvements
Features
- ๐ Simple
MLDocclient - ๐ Submit machine learning model reports
- โ Automatic validation of projects, models, and metrics
- ๐ Secure API Key authentication
- ๐ HTTP transport layer
- โก Lightweight with minimal dependencies
- ๐ก๏ธ Custom SDK exceptions
- ๐ฆ Typed report models
- ๐ SDK version tracking
Installation
pip install mlsentinal
Quick Start
from mlsentinal import MLDoc
client = MLDoc("YOUR_API_KEY")
response = client.doc_report(
project="Spam Detector",
model="Random Forest",
metrics={
"accuracy": 0.95,
"precision": 0.94,
"recall": 0.93,
"f1_score": 0.935,
"val_loss": 0.18
}
)
print(response)
print("SDK Version:", client.version())
Validation Rules
Before submitting a report, MLSentinel validates all inputs locally.
| Field | Validation |
|---|---|
| Project Name | Required |
| Model Name | Required |
| Accuracy | Between 0.0 and 1.0 |
| Precision | Between 0.0 and 1.0 |
| Recall | Between 0.0 and 1.0 |
| F1 Score | Between 0.0 and 1.0 |
| Validation Loss | Greater than or equal to 0 |
If validation fails, an exception is raised before any request is sent to the backend.
SDK Architecture
Developer
โ
โผ
MLDoc Client
โ
โผ
Validation Engine
โ
โผ
Report Model
โ
โผ
HTTP Transport
โ
โผ
API Authentication
โ
โผ
MLSentinel Backend
Project Structure
src/
โโโ mlsentinal/
โโโ __init__.py
โโโ client.py
โโโ config.py
โโโ exceptions.py
โโโ models.py
โโโ transport.py
โโโ validators.py
โโโ version.py
Requirements
- Python 3.9+
- requests
Roadmap
โ Version 0.1.x (Current)
- SDK Foundation
- MLDoc Client
- Report Models
- Input Validation
- HTTP Transport Layer
- API Key Authentication
- Backend Integration
- Custom SDK Exceptions
๐ง Version 0.1.3
- Standardized SDK Error Codes
- Cleaner Developer Error Messages
- Enhanced Exception Handling
- Better Response Formatting
- Improved Documentation
๐ง Version 0.2.0
- AI Analysis Engine
- Model Health Reports
- Performance Recommendations
- Intelligent Diagnostics
- Report Analysis API
๐ Future Releases
- Web Dashboard
- Team Workspaces
- Project Management
- Model Monitoring
- Drift Detection
- Report History
- Model Comparison
- REST API Expansion
- CI/CD Integrations
Contributing
Contributions are welcome!
If you'd like to contribute:
- Fork the repository.
- Create a feature branch.
- Commit your changes.
- Push your branch.
- Open a Pull Request.
Vision
Machine Learning developers often know what their evaluation metrics are, but not why model performance changed or what should be improved.
MLSentinel aims to bridge that gap by providing intelligent analysis, actionable recommendations, and model health insights, helping developers build more reliable machine learning systems.
The current SDK is the foundation for that vision, focusing on secure report submission and validation.
Author
Adari Narasimha Dhoni
GitHub: https://github.com/Narasimha440
License
This project is licensed under the MIT License.
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 mlsentinel-0.1.3.dev2.tar.gz.
File metadata
- Download URL: mlsentinel-0.1.3.dev2.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6baafc9ad56659e5df8c3d966d6af91a7b0cb263eece806b5a3d7f0bf6bad272
|
|
| MD5 |
46b31c2d40c5251f2cab9067aaacd1bc
|
|
| BLAKE2b-256 |
699932e8f6f1b1e876d4896324de52b60da30b8fede18b7c6846409f7ac13083
|
File details
Details for the file mlsentinel-0.1.3.dev2-py3-none-any.whl.
File metadata
- Download URL: mlsentinel-0.1.3.dev2-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d55f5d7a095d6f743dd9635c184e39c65f9e538d05e7bf198295309947df868
|
|
| MD5 |
27df9e99ac10f3e2834fbbec5c26f674
|
|
| BLAKE2b-256 |
86bfd693e09ef5cc6296a32b01338b3f318f4e31046f2abb2d6d695d3e846d92
|