Skip to content

Commit

Permalink
ci: add pre commit config and report template
Browse files Browse the repository at this point in the history
  • Loading branch information
leafspark committed Aug 5, 2024
1 parent e09f54d commit 868b15b
Show file tree
Hide file tree
Showing 7 changed files with 127 additions and 122 deletions.
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve AutoGGUF
title: '[BUG] '
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Environment (please complete the following information):**
- OS: [e.g. Windows, macOS, Linux]
- AutoGGUF Version: [e.g. v1.4.2]
- Python Version (if running from source): [e.g. 3.9]
- llama.cpp backend version: [e.g. 3601]

**Additional context**
Add any other context about the problem here. Include any relevant log outputs or error messages.

**Checklist:**
- [ ] I have checked the existing issues to make sure this is not a duplicate
- [ ] I have included all relevant information to reproduce the issue
- [ ] I am running the latest version of AutoGGUF
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,14 @@ __pycache__/
!*.sh
!LICENSE

# Allow these files
!.pre-commit-config.yaml

# Allow assets folder
!assets/
!assets/**
!.github/
!.github/**

# Don't ignore .gitignore
!.gitignore
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
repos:
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
language_version: python3
1 change: 0 additions & 1 deletion src/gguf-py/gguf/lazy.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@


class LazyMeta(ABCMeta):

def __new__(
cls, name: str, bases: tuple[type, ...], namespace: dict[str, Any], **kwargs
):
Expand Down
6 changes: 3 additions & 3 deletions src/gguf-py/gguf/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,9 +441,9 @@ def apply_metadata_heuristic(
org_component is not None
and model_full_name_component is not None
):
base_model["repo_url"] = (
f"https://huggingface.co/{org_component}/{model_full_name_component}"
)
base_model[
"repo_url"
] = f"https://huggingface.co/{org_component}/{model_full_name_component}"
metadata.base_models.append(base_model)

if "license" in model_card and metadata.license is None:
Expand Down
7 changes: 5 additions & 2 deletions src/gguf-py/gguf/vocab.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,11 @@ class Vocab(BaseVocab, Protocol):
added_tokens_list: list[str]
fname_tokenizer: Path

def __init__(self, base_path: Path): ...
def all_tokens(self) -> Iterable[tuple[bytes, float, gguf.TokenType]]: ...
def __init__(self, base_path: Path):
...

def all_tokens(self) -> Iterable[tuple[bytes, float, gguf.TokenType]]:
...


class NoVocab(BaseVocab):
Expand Down
186 changes: 70 additions & 116 deletions src/localizations.py

Large diffs are not rendered by default.

0 comments on commit 868b15b

Please sign in to comment.