xpuls-ml-sdk

Automated telemetry and monitoring for ML & LLM Frameworks


Keywords
langchain, llmops, ml-monitoring, mlops, prometheus, xpuls, xpulsai
License
Apache-2.0
Install
pip install xpuls-ml-sdk==0.3.0

Documentation

Welcome to xpuls.ai ๐Ÿ‘‹

MLMonitor - Automatic Instrumentation for ML Frameworks

Twitter Follow Discord

PyPI version GitHub version

Roadmap ๐Ÿš€

Framework Status
Langchain โœ…
LLamaIndex Planned
PyTorch Planned
SKLearn Planned
Transformers Planned
Stable Diffusion Next

๐Ÿ’ก If support of any framework/feature is useful for you, please feel free to reach out to us via Discord or Github Discussions

๐Ÿ”— 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.

๐Ÿ’ฌ Get in touch

๐Ÿ‘‰ Join our Discord community!

๐Ÿฆ Follow the latest from xpuls.ai team on Twitter @xpulsai