Skip to content

Commit da3d333

Browse files
committed
Logging: Fix env var parsing, formatting
1 parent a3eabec commit da3d333

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

backends/exllamav3/model.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,9 @@ async def generate_gen(
927927
params.frequency_penalty,
928928
params.presence_penalty,
929929
penalty_range,
930-
max(repetition_decay, 1), # TODO: Allow decay = 0 when exl3 kernel fix is pushed (v0.0.27)
930+
max(
931+
repetition_decay, 1
932+
), # TODO: Allow decay = 0 when exl3 kernel fix is pushed (v0.0.27)
931933
)
932934

933935
# Apply temperature first to builder

common/logger.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from common.utils import unwrap
2121

2222
_w = os.getenv("TABBY_LOG_CONSOLE_WIDTH")
23-
_default_console_width = int(_w) if _w.isnumeric() else None
23+
_default_console_width = int(_w) if _w is not None and _w.isnumeric() else None
2424
RICH_CONSOLE = Console(width=_default_console_width)
2525
LOG_LEVEL = os.getenv("TABBY_LOG_LEVEL", "INFO")
2626

0 commit comments

Comments
 (0)