See the Quick Start Guide on how to install and configure the profiler.
To profile Hugging Face training use a callback. Only some of the training steps will be profiled; the profiler decides which steps to profile for optimal statistics and low overhead.
Profile PyTorch training:
from graphsignal.profilers.huggingface import GraphsignalPTCallback trainer = Trainer(..., callbacks=[GraphsignalPTCallback()])
trainer.add_callback method can be used:
Profile TensorFlow training:
from graphsignal.profilers.huggingface import GraphsignalTFCallback trainer = Trainer(..., callbacks=[GraphsignalTFCallback()])
The Hugging Face BERT example illustrates how to add the profiler callback.
Graphsignal provides built-in support for distributed training and inference. It is only necessary to provide the same run ID to all workers. Refer to Distributed Workloads section for more information.