Skip to main content

Automated telemetry and monitoring for ML & LLM Frameworks

Project description

MLMonitor - Automatic Instrumentation for ML Frameworks

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.4.tar.gz (12.4 kB view hashes)

Uploaded Source

Built Distribution

xpuls_mlmonitor-0.0.4-py3-none-any.whl (14.1 kB view hashes)

Uploaded Python 3

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