Skip to content

Commit

Permalink
feat(config): support specifying log directory name
Browse files Browse the repository at this point in the history
- support specifying log directory name using AUTOGGUF_LOG_DIR_NAME environment variable
- update dependencies, except transformers due to a small regression
  • Loading branch information
leafspark committed Oct 13, 2024
1 parent 4011bbd commit 7575c97
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
7 changes: 5 additions & 2 deletions src/AutoGGUF.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import json
import os
import shutil
import urllib.error
import urllib.request
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 7575c97

Please sign in to comment.