Skip to main content

Python SDK for monitoring and validating Machine Learning models.

Project description

LOGO

MLSentinel

PyPI version Python License: MIT

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 MLDoc client
  • ๐Ÿ“Š 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:

  1. Fork the repository.
  2. Create a feature branch.
  3. Commit your changes.
  4. Push your branch.
  5. 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


Download files

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

Source Distribution

mlsentinel-0.1.3.dev2.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mlsentinel-0.1.3.dev2-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

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

Hashes for mlsentinel-0.1.3.dev2.tar.gz
Algorithm Hash digest
SHA256 6baafc9ad56659e5df8c3d966d6af91a7b0cb263eece806b5a3d7f0bf6bad272
MD5 46b31c2d40c5251f2cab9067aaacd1bc
BLAKE2b-256 699932e8f6f1b1e876d4896324de52b60da30b8fede18b7c6846409f7ac13083

See more details on using hashes here.

File details

Details for the file mlsentinel-0.1.3.dev2-py3-none-any.whl.

File metadata

File hashes

Hashes for mlsentinel-0.1.3.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 7d55f5d7a095d6f743dd9635c184e39c65f9e538d05e7bf198295309947df868
MD5 27df9e99ac10f3e2834fbbec5c26f674
BLAKE2b-256 86bfd693e09ef5cc6296a32b01338b3f318f4e31046f2abb2d6d695d3e846d92

See more details on using hashes here.

Supported by

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