Skip to content

Commit

Permalink
logging moved to the troubleshooting guide
Browse files Browse the repository at this point in the history
  • Loading branch information
MKhalusova committed Nov 7, 2023
1 parent 4355e37 commit 0bfc28b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
20 changes: 2 additions & 18 deletions docs/source/package_reference/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,7 @@ rendered properly in your Markdown viewer.

# 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`:
```diff
- import logging
+ from accelerate.logging import get_logger
- logger = logging.getLogger(__name__)
+ logger = get_logger(__name__)
```

## Setting the log level

The log level can be set with the `ACCELERATE_LOG_LEVEL` environment variable or by passing
`log_level` to `get_logger`:
```python
from accelerate.logging import get_logger

logger = get_logger(__name__, log_level="INFO")
```
Refer to the [Troubleshooting guide](../usage_guides/troubleshooting#logging) or to the example below to learn
how to use 🤗 Accelerate's logger.

[[autodoc]] logging.get_logger
4 changes: 2 additions & 2 deletions docs/source/usage_guides/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ rendered properly in your Markdown viewer.

# Troubleshooting guide

This guide aims to provide you with the tools and knowledge required to navigate some common issues. However,
as 🤗 Accelerate continuously evolves and the use cases are diverse, you might encounter an issue not covered in this
This guide aims to provide you the tools and knowledge required to navigate some common issues. However,
as 🤗 Accelerate continuously evolves and the use cases and setups are diverse, you might encounter an issue not covered in this
guide. If the suggestions listed in this guide do not cover your such situation, please refer to the final section of
the guide, [Asking for Help](#ask-for-help), to learn where to find help with your specific issue.

Expand Down

0 comments on commit 0bfc28b

Please sign in to comment.