Skip to main content

Automated telemetry and monitoring for ML & LLM Frameworks

Project description

MLMonitor - Automatic Instrumentation for ML Frameworks

PyPI version GitHub version Release built

Roadmap

  • Prometheus Support for major ML & LLM frameworks
    • Langchain - Done
    • LLamaIndex - Coming Soon
    • SKLearn - Coming Soon
    • transformers - Coming Soon
    • pytorch - Coming Soon

Installation

  1. Install from PyPI
pip install xpuls-mlmonitor

Usage Example

from xpuls.mlmonitor.langchain.instrument import LangchainTelemetry

# Add default labels that will be added to all captured metrics
default_labels = {"service": "ml-project-service", "k8s_cluster": "app0", "namespace": "dev", "agent_name": "fallback_value"}

# Enable the auto-telemetry
LangchainTelemetry(default_labels=default_labels).auto_instrument()

## [Optional] Override labels for scope of decorator [Useful if you have multiple scopes where you need to override the default label values]
@TelemetryOverrideLabels(agent_name="chat_agent_alpha")
def get_response_using_agent_alpha(prompt, query):
    agent = initialize_agent(llm=chat_model,
                             verbose=True,
                             agent=CONVERSATIONAL_REACT_DESCRIPTION,
                             memory=memory)

    res = agent.run(f"{prompt}. \n Query: {query}")

Complete Usage Guides

License

This project is licensed under the Apache License 2.0. See the LICENSE file for more details.

Contributing

We welcome contributions to MLMonitor! If you're interested in contributing.

If you encounter any issues or have feature requests, please file an issue on our GitHub repository.

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

xpuls-mlmonitor-0.0.8.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

xpuls_mlmonitor-0.0.8-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file xpuls-mlmonitor-0.0.8.tar.gz.

File metadata

  • Download URL: xpuls-mlmonitor-0.0.8.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for xpuls-mlmonitor-0.0.8.tar.gz
Algorithm Hash digest
SHA256 5e8ba9a35bb2da1590b9e4cc024cd124e7e910dd5a70d1bd44bca1194926f5cb
MD5 be00b00f08d87f916bdb77b5225a2e99
BLAKE2b-256 05621c16fcc10c052e56f3a585f4288a9554e07e9b33f676444d8793c5e64915

See more details on using hashes here.

File details

Details for the file xpuls_mlmonitor-0.0.8-py3-none-any.whl.

File metadata

File hashes

Hashes for xpuls_mlmonitor-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 d932f672fd8e72ac90c82f32048dd852a702f1b5956be6d466b767c584eab3ab
MD5 9ee22eb85a41ba4668931644f965c31f
BLAKE2b-256 fe063cff699e8f6d5e3689b582eba2181f415f596bb88ba53507ee06a81946fa

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