Skip to content

Commit

Permalink
PR feedback: using logger variable name instead of log
Browse files Browse the repository at this point in the history
  • Loading branch information
lopagela committed Oct 29, 2023
1 parent e9a139d commit b31b4d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions private_gpt/components/llm/custom/sagemaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
CompletionResponseGen,
)

log = logging.getLogger(__name__)
logger = logging.getLogger(__name__)


class LineIterator:
Expand Down Expand Up @@ -84,7 +84,7 @@ def __next__(self) -> Any:
continue
raise
if "PayloadPart" not in chunk:
log.warning("Unknown event type=%s", chunk)
logger.warning("Unknown event type=%s", chunk)
continue
self.buffer.seek(0, io.SEEK_END)
self.buffer.write(chunk["PayloadPart"]["Bytes"])
Expand Down
4 changes: 2 additions & 2 deletions private_gpt/settings/settings_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from private_gpt.constants import PROJECT_ROOT_PATH
from private_gpt.settings.yaml import load_yaml_with_envvars

log = logging.getLogger(__name__)
logger = logging.getLogger(__name__)

_settings_folder = os.environ.get("PGPT_SETTINGS_FOLDER", PROJECT_ROOT_PATH)

Expand Down Expand Up @@ -44,7 +44,7 @@ def load_profile(profile: str) -> dict[str, Any]:

def load_active_profiles() -> dict[str, Any]:
"""Load active profiles and merge them."""
log.info("Starting application with profiles=%s", active_profiles)
logger.info("Starting application with profiles=%s", active_profiles)
loaded_profiles = [load_profile(profile) for profile in active_profiles]
merged: dict[str, Any] = functools.reduce(deep_update, loaded_profiles, {})
return merged

0 comments on commit b31b4d3

Please sign in to comment.