Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/01_download_wiki.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def _fetch_expected_md5(lang: str, filename: str) -> str | None:
for line in resp.read().decode().splitlines():
parts = line.split()
if len(parts) == 2 and parts[1] == filename:
return parts[0]
return str(parts[0])
except Exception as exc:
log.warning("Could not fetch checksums from %s: %s", url, exc)
return None
Expand Down
5 changes: 3 additions & 2 deletions scripts/smoke_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"""

import sys
from typing import NoReturn

import torch
from peft import LoraConfig, TaskType, get_peft_model
Expand All @@ -25,11 +26,11 @@
STEPS = 5


def check(label):
def check(label: str) -> None:
print(f" [OK] {label}")


def fail(label, exc):
def fail(label: str, exc: Exception) -> NoReturn:
print(f" [FAIL] {label}: {exc}", file=sys.stderr)
sys.exit(1)

Expand Down