Skip to main content

Graphsignal Profiler

Project description

Graphsignal Profiler

License Version SaaS Status

Graphsignal is a machine learning profiler. It helps data scientists and ML engineers make model training and inference faster and more efficient.

  • Optimize machine learning by analyzing performance summaries, resource usage and operation level statistics.
  • Start profiling notebooks, scripts and model serving automatically by adding a few lines of code.
  • Use the profiler in local, remote or cloud environment without installing any additional software or opening inbound ports.
  • Keep data private; no code or data is sent to Graphsignal cloud, only run statistics and metadata.

Data Analysis

Learn more at graphsignal.com.

Documentation

See full documentation at graphsignal.com/docs.

Getting Started

1. Installation

Install the profiler by running:

pip install graphsignal

Or clone and install the GitHub repository:

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

Import the module in your application:

import graphsignal

For GPU profiling, make sure the NVIDIA® CUDA® Profiling Tools Interface (CUPTI) is installed by running:

/sbin/ldconfig -p | grep libcupti

2. Configuration

Configure the profiler by specifying your API key.

graphsignal.configure(api_key='my_api_key', workload_name='job1')

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.

workload_name identifies the job, application or service that is being profiled.

3. Profiling

Use the the following minimal examples to integrate Graphsignal into your machine learning script. See profiling API reference for full reference.

To ensure optimal statistics and low overhead, the profiler automatically profiles only certain training batches and/or predictions.

TensorFlow

from graphsignal.profilers.tensorflow import profile_span

with profile_span() as span:
    # training step, prediction call, etc.

Keras

from graphsignal.profilers.keras import GraphsignalCallback

model.fit(..., callbacks=[GraphsignalCallback()])
# or model.predict(..., callbacks=[GraphsignalCallback()])

PyTorch

from graphsignal.profilers.pytorch import profile_span

with profile_span() as span:
    # training step, prediction call, etc.

PyTorch Lightning

from graphsignal.profilers.pytorch_lightning import GraphsignalCallback

trainer = Trainer(..., callbacks=[GraphsignalCallback()])

Hugging Face

from graphsignal.profilers.huggingface import GraphsignalPTCallback
# or GraphsignalTFCallback for TensorFlow

trainer = Trainer(..., callbacks=[GraphsignalPTCallback()])
# or trainer.add_callback(GraphsignalPTCallback())

4. Dashboards

After profiling is setup, sign in to Graphsignal to analyze recorded profiles.

Example

# 1. Import Graphsignal modules
import graphsignal
from graphsignal.profilers.keras import GraphsignalCallback

# 2. Configure
graphsignal.configure(api_key='my_key', workload_name='training_example')

....

# 3. Add profiler callback or use profiler API
model.fit(..., callbacks=[GraphsignalCallback()])

Overhead

Although profiling may add some overhead to applications, Graphsignal Profiler only profiles certain spans, e.g. training batches or prediction calls, automatically limiting the overhead.

Security and Privacy

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

No code or data is sent to Graphsignal cloud, only run statistics and metadata.

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://profile-api.graphsignal.com are allowed.

Project details


Release history Release notifications | RSS feed

This version

0.6.3

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

graphsignal-0.6.3.tar.gz (44.7 kB view details)

Uploaded Source

File details

Details for the file graphsignal-0.6.3.tar.gz.

File metadata

  • Download URL: graphsignal-0.6.3.tar.gz
  • Upload date:
  • Size: 44.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

File hashes

Hashes for graphsignal-0.6.3.tar.gz
Algorithm Hash digest
SHA256 c54c014a981365a2f2041673d118b6b72d9e768463c0e015228af303dd8910e5
MD5 1f1c80d9a4d781652d7874165ba91ade
BLAKE2b-256 05c572dfda5ee9a6718ca60782dd1e72f7f4f4bf0f52bb5469951300c887926b

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