Skip to content

Commit

Permalink
Merge pull request #65 from bghira/main
Browse files Browse the repository at this point in the history
Logging reduction and S3 connection pool size fix
  • Loading branch information
bghira authored Aug 28, 2023
2 parents 36fe422 + cb9d62f commit 7d04f3f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions helpers/data_backend/aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from torch import Tensor
from pathlib import PosixPath
import concurrent.futures
from botocore.config import Config
from helpers.data_backend.base import BaseDataBackend

loggers_to_silence = [
Expand Down Expand Up @@ -49,10 +50,12 @@ def __init__(
extra_args = {
"endpoint_url": endpoint_url,
}
s3_config = Config(max_pool_connections=100)
self.client = boto3.client(
"s3",
aws_access_key_id=aws_access_key_id,
aws_secret_access_key=aws_secret_access_key,
config=s3_config,
**extra_args,
)

Expand Down
3 changes: 3 additions & 0 deletions helpers/log_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,8 @@ def format(self, record):
if not logger.handlers:
logger.addHandler(new_handler)

forward_logger = logging.getLogger('diffusers.models.unet_2d_condition')
forward_logger.setLevel(logging.WARNING)

pil_logger = logging.getLogger("PIL")
pil_logger.setLevel(logging.INFO)

0 comments on commit 7d04f3f

Please sign in to comment.