Skip to content

Commit

Permalink
fix: update regex for progress tracking
Browse files Browse the repository at this point in the history
- update regex for progress tracking
- add .env.example file
- update .gitignore
  • Loading branch information
leafspark committed Aug 21, 2024
1 parent 3b96deb commit 32f29b9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
AUTOGGUF_RESOLUTION=1650x1100
AUTOGGUF_THEME=
AUTOGGUF_CHECK_BACKEND=enabled
AUTOGGUF_CHECK_UPDATE=enabled
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ __pycache__/

# Allow these files
!.pre-commit-config.yaml
!.env.example
!setup.py

# Allow src folder and its .py files
!src/
Expand Down Expand Up @@ -41,6 +43,3 @@ assets/*

# Don't ignore .gitignore
!.gitignore

# Allow PyPI setup script
!setup.py
2 changes: 1 addition & 1 deletion src/AutoGGUF.py
Original file line number Diff line number Diff line change
Expand Up @@ -1400,7 +1400,7 @@ def quantize_model(self):

def parse_progress(self, line, task_item):
# Parses the output line for progress information and updates the task item.
match = re.search(r"\[(\d+)/(\d+)\]", line)
match = re.search(r"\[\s*(\d+)\s*/\s*(\d+)\s*\].*", line)
if match:
current = int(match.group(1))
total = int(match.group(2))
Expand Down

0 comments on commit 32f29b9

Please sign in to comment.