https://github.com/graphsignal/graphsignal Skip to content Sign up * Product + Features + Mobile + Actions + Codespaces + Copilot + Packages + Security + Code review + Issues + Integrations + GitHub Sponsors + Customer stories * Team * Enterprise * Explore + Explore GitHub + Learn and contribute + Topics + Collections + Trending + Skills + GitHub Sponsors + Open source guides + Connect with others + The ReadME Project + Events + Community forum + GitHub Education + GitHub Stars program * Marketplace * Pricing + Plans + Compare plans + Contact Sales + Education [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} graphsignal / graphsignal Public * Notifications * Fork 7 * Star 129 Graphsignal Profiler graphsignal.com License Apache-2.0 license 129 stars 7 forks Star Notifications * Code * Issues 0 * Pull requests 0 * Actions * Projects 0 * Wiki * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Wiki * Security * Insights graphsignal/graphsignal This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 1 branch 60 tags Code Latest commit Git stats * 44 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time graphsignal Ensure first step profiling Jul 3, 2022 tools Add end_run method Jul 3, 2022 .gitignore Add Chrome trace support Jun 5, 2022 LICENSE Add profiler Feb 22, 2022 MANIFEST.in Add profiler Feb 22, 2022 NOTICE Add XGBoost support Jun 20, 2022 README.md Add end_run method Jul 3, 2022 setup.cfg Add profiler Feb 22, 2022 setup.py Add XGBoost support Jun 20, 2022 View code [ ] Graphsignal Profiler Documentation Getting Started 1. Installation 2. Configuration 3. Profiling TensorFlow Keras PyTorch PyTorch Lightning Hugging Face XGBoost JAX Other frameworks Distributed workloads 4. Dashboards Example Overhead Security and Privacy Troubleshooting README.md Graphsignal Profiler License Version Status Graphsignal is a machine learning profiler. It helps data scientists and ML engineers make model training and inference faster and more efficient. It is built for real-world use cases and allows ML practitioners to: * Optimize training and inference by benchmarking speed, analyzing execution trace, operation-level statistics and compute utilization. * Start profiling scripts and notebooks 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. Dashboards 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 2. Configuration Configure the profiler by specifying your API key and workload name directly or via environment variables. import graphsignal 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. One workload can be run multiple times, e.g. to benchmark different parameters. To tag each run, use graphsignal.add_tag('mytag'). In case of multiple subsequent runs/experiments executed within a single script or notebook, call graphsignal.end_run() to end current run and start a new one. 3. Profiling Use the following minimal examples to integrate Graphsignal into your machine learning script. See integration documentation and profiling API reference for full reference. To ensure optimal statistics and low overhead, the profiler automatically profiles only certain training steps and/or predictions. TensorFlow from graphsignal.profilers.tensorflow import profile_step with profile_step(): # training batch, prediction, etc. Keras from graphsignal.profilers.keras import GraphsignalCallback model.fit(..., callbacks=[GraphsignalCallback()]) # or model.predict(..., callbacks=[GraphsignalCallback()]) PyTorch from graphsignal.profilers.pytorch import profile_step with profile_step(): # training batch, prediction, 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()) XGBoost from graphsignal.profilers.xgboost import GraphsignalCallback bst = xgb.train(..., callbacks=[GraphsignalCallback()]) JAX from graphsignal.profilers.jax import profile_step with profile_step(): # training batch, prediction, etc. Other frameworks from graphsignal.profilers.generic import profile_step with profile_step(): # training batch, prediction, etc. Distributed workloads Graphsignal has a built-in support for distributed training and inference, e.g. multi-node and multi-GPU training. See Distributed Workloads section for more information. 4. Dashboards After profiling is setup, open 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()]) More integration examples are available in examples repo. Overhead Although profiling may add some overhead to applications, Graphsignal Profiler only profiles certain steps, e.g. training batches or predictions, 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. For GPU profiling, if libcupti library is failing to load, make sure the NVIDIA(r) CUDA(r) Profiling Tools Interface (CUPTI) is installed by running: /sbin/ldconfig -p | grep libcupti About Graphsignal Profiler graphsignal.com Topics data-science machine-learning profiler ml-ops Resources Readme License Apache-2.0 license Stars 129 stars Watchers 2 watching Forks 7 forks Releases 60 tags Packages 0 No packages published Used by 1 * @graphsignal @graphsignal / examples Languages * Python 98.7% * Shell 1.3% Footer (c) 2022 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.