From 7575c97f6a31fdb8d0251800769d2ce1643991d9 Mon Sep 17 00:00:00 2001 From: BuildTools Date: Sun, 13 Oct 2024 09:59:50 -0700 Subject: [PATCH] feat(config): support specifying log directory name - support specifying log directory name using AUTOGGUF_LOG_DIR_NAME environment variable - update dependencies, except transformers due to a small regression --- requirements.txt | 8 ++++---- src/AutoGGUF.py | 7 +++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/requirements.txt b/requirements.txt index 15522c8..c9adff9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,13 +1,13 @@ PyYAML~=6.0.2 psutil~=6.0.0 pynvml~=11.5.3 -PySide6~=6.7.3 +PySide6~=6.8.0 safetensors~=0.4.5 numpy<2.0.0 torch~=2.4.1 sentencepiece~=0.2.0 setuptools~=75.1.0 -huggingface-hub~=0.25.0 +huggingface-hub~=0.25.2 transformers~=4.45.1 -fastapi~=0.115.0 -uvicorn~=0.31.0 +fastapi~=0.115.2 +uvicorn~=0.31.1 diff --git a/src/AutoGGUF.py b/src/AutoGGUF.py index 0041f22..64d6e35 100644 --- a/src/AutoGGUF.py +++ b/src/AutoGGUF.py @@ -1,4 +1,5 @@ import json +import os import shutil import urllib.error import urllib.request @@ -70,8 +71,10 @@ def __init__(self, args: List[str]) -> None: self.parse_resolution = ui_update.parse_resolution.__get__(self) + self.log_dir_name = os.environ.get("AUTOGGUF_LOG_DIR_NAME", "logs") + width, height = self.parse_resolution() - self.logger = Logger("AutoGGUF", "logs") + self.logger = Logger("AutoGGUF", self.log_dir_name) self.logger.info(INITIALIZING_AUTOGGUF) self.setWindowTitle(WINDOW_TITLE) @@ -565,7 +568,7 @@ def __init__(self, args: List[str]) -> None: # Logs path logs_layout = QHBoxLayout() - self.logs_input = QLineEdit(os.path.abspath("logs")) + self.logs_input = QLineEdit(os.path.abspath(self.log_dir_name)) logs_button = QPushButton(BROWSE) logs_button.clicked.connect(self.browse_logs) logs_layout.addWidget(QLabel(LOGS_PATH))