Accelerate documentation
Logging with Accelerate
Getting started
Tutorials
OverviewMigrating to 🤗 AccelerateLaunching distributed codeLaunching distributed training from Jupyter Notebooks
How-To Guides
Performing gradient accumulationFully Sharded Data ParallelismSaving and loading training statesHow to use DeepSpeedUsing experiment trackersHow to use large models with small resourcesHow to avoid CUDA Out-of-MemoryUsing 🤗 Accelerate on SageMakerHow to use Apple Silicon M1 GPUs🤗 Accelerate Example Zoo
Concepts and fundamentals
Comparing performance across distributed setupsGradient synchronizationExecuting and deferring jobsTPU best practices
Reference
You are viewing v0.13.2 version. A newer version v1.13.0 is available.
Logging with Accelerate
Accelerate has its own logging utility to handle logging while in a distributed system.
To utilize this replace cases of logging with accelerate.logging:
- import logging
+ from accelerate.logging import get_logger
- logger = logging.getLogger(__name__)
+ logger = get_logger(__name__)accelerate.logging.get_logger
< source >( name: str )
Returns a logging.Logger for name that can handle multiprocessing.
If a log should be called on all processes, pass main_process_only=False