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
import os

# Enable this for advance tracking with our xpuls-ml platform
os.environ["XPULSAI_TRACING_ENABLED"] = "true"

# 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,
  xpuls_host_url="http://app.xpuls.ai" # Optional param, required when XPULSAI_TRACING is enabled
).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.1.0.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

xpuls_mlmonitor-0.1.0-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for xpuls-mlmonitor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bc234bd4dab74a1240845f7def407a6b4ac51d6c2cd2b3b076c9b48715d13d96
MD5 caf18d5d31b5697aab36cd7c0e987139
BLAKE2b-256 66ba3bf37818c455fba97f65d6b5c558349514f35b66b849077c3767e6d25816

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xpuls_mlmonitor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b0f2c4fad611d498f97cbc89353e8774f5da8a1b748aac96d6c894a24ceda00c
MD5 393ccf756eb03db6b3d2382cccd4948b
BLAKE2b-256 85875d23176c6689a498bb6f7faa47def199a2e7ed648a5a8174ba778decb070

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