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.7.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

xpuls_mlmonitor-0.0.7-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xpuls-mlmonitor-0.0.7.tar.gz
  • Upload date:
  • Size: 12.6 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.7.tar.gz
Algorithm Hash digest
SHA256 fb181bd6f847749d323e6832366c9946dd10d13616312d2bcd6ad2c9c65f5c35
MD5 3186a7f23e3d79725b9449237c63bfe1
BLAKE2b-256 34cc010dbf780cb6e9d35fcea698cfaca1669a2ab9ad1944928288f22c28316f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for xpuls_mlmonitor-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 50c90e5d327334a69f876ad169486ae518dc9885309e427996012dfa99b722ba
MD5 67846bf6d5d0eaa16d689746372b7569
BLAKE2b-256 828befaaad3eb2abcac0c6fef9b9dd9fa07ce8e1c0c2f7ac2a0c4b9bf7af695a

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