All Projects → graphsignal → graphsignal

graphsignal / graphsignal

Licence: Apache-2.0 license
Graphsignal Python agent

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to graphsignal

chef-transformer
Chef Transformer 🍲 .
Stars: ✭ 29 (-81.65%)
Mutual labels:  jax, huggingface
onnxruntime-rs
Rust wrapper for Microsoft's ONNX Runtime (version 1.8)
Stars: ✭ 149 (-5.7%)
Mutual labels:  inference, onnxruntime
fastT5
⚡ boost inference speed of T5 models by 5x & reduce the model size by 3x.
Stars: ✭ 421 (+166.46%)
Mutual labels:  inference, onnxruntime
optimum
🏎️ Accelerate training and inference of 🤗 Transformers with easy to use hardware optimization tools
Stars: ✭ 567 (+258.86%)
Mutual labels:  inference, onnxruntime
studio-lab-examples
Example notebooks for working with SageMaker Studio Lab. Sign up for an account at the link below!
Stars: ✭ 319 (+101.9%)
Mutual labels:  inference, huggingface
aws-lambda-docker-serverless-inference
Serve scikit-learn, XGBoost, TensorFlow, and PyTorch models with AWS Lambda container images support.
Stars: ✭ 56 (-64.56%)
Mutual labels:  inference, huggingface
Icecream
🍦 Never use print() to debug again.
Stars: ✭ 5,601 (+3444.94%)
Mutual labels:  debugging
Objectexporter
Object Exporter lets you export out an object while debugging in Visual Studio, the object can be serialized in either C#, JSON or XML.
Stars: ✭ 240 (+51.9%)
Mutual labels:  debugging
Elinux
嵌入式 Linux 知识库 (elinux.org) 中文翻译计划;本项目发起人发布了《360° 剖析 Linux ELF》视频课程,欢迎订阅:https://www.cctalk.com/m/group/88089283
Stars: ✭ 193 (+22.15%)
Mutual labels:  debugging
Opencl Intercept Layer
Intercept Layer for Debugging and Analyzing OpenCL Applications
Stars: ✭ 189 (+19.62%)
Mutual labels:  debugging
slowbug
Slowbug is a VS Code extension for debugging your code in slow-mo!
Stars: ✭ 52 (-67.09%)
Mutual labels:  debugging
Httpie
As easy as /aitch-tee-tee-pie/ 🥧 Modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more. https://twitter.com/httpie
Stars: ✭ 53,052 (+33477.22%)
Mutual labels:  debugging
Pyrasite
Inject code into running Python processes
Stars: ✭ 2,586 (+1536.71%)
Mutual labels:  debugging
Bugsnag Ruby
Bugsnag error monitoring & reporting software for rails, sinatra, rack and ruby
Stars: ✭ 211 (+33.54%)
Mutual labels:  debugging
Utern
Multi group and stream log tailing for AWS CloudWatch Logs.
Stars: ✭ 241 (+52.53%)
Mutual labels:  debugging
Debug Recipes
My notes collected while debugging various .NET and Windows problems.
Stars: ✭ 204 (+29.11%)
Mutual labels:  debugging
debugging
Improve your Print Debugging
Stars: ✭ 41 (-74.05%)
Mutual labels:  debugging
Hrdevhelper
Context-sensitive HexRays decompiler plugin that visualizes the ctree of decompiled functions.
Stars: ✭ 193 (+22.15%)
Mutual labels:  debugging
Darkon
Toolkit to Hack Your Deep Learning Models
Stars: ✭ 231 (+46.2%)
Mutual labels:  debugging
Best Of Python Dev
🏆 A ranked list of awesome python developer tools and libraries. Updated weekly.
Stars: ✭ 243 (+53.8%)
Mutual labels:  debugging

Graphsignal: AI Application Monitoring

License Version Status

Graphsignal is an observability platform for AI applications that use LLMs or other models. It helps engineers make AI applications faster, reliable and more efficient by monitoring and analyzing performance, resources, data, errors and costs.

  • Monitor and analyze inference latency, throughput and resource utilization.
  • Track GPU utilization in the context of inference.
  • Get notified about errors and anomalies with full machine learning context.
  • Monitor data to detect data issues and silent failures.
  • Analyze model API costs for deployments, models and any custom tags.

Dashboards

Learn more at graphsignal.com.

Install

Install Graphsignal agent by running:

pip install graphsignal

Or clone and install the GitHub repository:

git clone https://github.com/graphsignal/graphsignal-python.git
python setup.py install

Configure

Configure Graphsignal agent by specifying your API key directly or via GRAPHSIGNAL_API_KEY environment variable.

import graphsignal

graphsignal.configure(api_key='my-api-key', deployment='my-model-prod-v1') 

To get an API key, sign up for a free account at graphsignal.com. The key can then be found in your account's Settings / API Keys page.

To track deployments, versions and environments separately, specify a deployment parameter or environment variable GRAPHSIGNAL_DEPLOYMENT.

Integrate

Use the following examples to integrate Graphsignal agent into your machine learning application. See integration documentation and API reference for full reference. More integration examples are available in examples repo.

Monitoring and tracing

Graphsignal auto-instruments and traces libraries and frameworks, such as OpenAI, LangChain, and many others.

To measure and monitor any other executions, e.g. model inference or inference API calls, wrap the code with start_trace method or use trace_function decorator.

with graphsignal.start_trace(endpoint='predict'):
    pred = model(x)
@graphsignal.trace_function
def predict(x):
    return model(x)

Enable profiling to additionally record code-level statistics. Profiling is disabled by default due to potential overhead. To enable, provide TraceOptions object.

with graphsignal.start_trace(
        endpoint='predict', 
        options=graphsignal.TraceOptions(enable_profiling=True)):
    pred = model(x)

The agent will automatically choose a profiler depending on available modules. Currently, CProfile, PyTorch Kineto and Yappi are supported. The Kineto profiler is used if torch module is detected and Yappi profiler is used if yappi module is detected. Otherwise, CProfile is used. To properly profile asyncio coroutines, just pip install yappi.

Exception tracking

For auto-instrumented libraries, or when using trace_function decorator, start_trace method with with context manager or callbacks, exceptions are automatically recorded. For other cases, use Trace.set_exception method.

Data monitoring

Data is automatically monitored for auto-instrumented libraries. To track data metrics and record data profiles for other cases, Trace.set_data method can be used.

with graphsignal.start_trace(endpoint='predict') as trace:
    trace.set_data('input', input_data)

The following data types are currently supported: list, dict, set, tuple, str, bytes, numpy.ndarray, tensorflow.Tensor, torch.Tensor.

Raw data samples, such as prompts or completions, are recorded by default. To disable, set record_data_samples=False in graphsignal.configure. Note, that data statistics, such as size, shape or number of missing values will still be recorded.

Observe

After everything is setup, log in to Graphsignal to monitor and analyze execution performance and monitor for issues.

Overhead

Graphsignal agent is very lightweight. While all traces are monitored, Graphsignal agent only samples and records certain traces, automatically limiting the overhead. The overhead per trace is measured to be less than 100 microseconds.

Security and Privacy

Graphsignal agent can only open outbound connections to agent-api.graphsignal.com and send data, no inbound connections or commands are possible.

Raw data samples, e.g. prompts, are recorded by default. This feature can be disabled at agent initialization time, if necessary.

Troubleshooting

To enable debug logging, add debug_mode=True to configure(). If the debug log doesn't give you any hints on how to fix a problem, please report it to our support team via your account.

In case of connection issues, please make sure outgoing connections to https://agent-api.graphsignal.com are allowed.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].