Skip to content

Commit

Permalink
Add PyTorch version to data/deps.json
Browse files Browse the repository at this point in the history
  • Loading branch information
xxyzz committed Dec 20, 2022
1 parent 1b2762e commit 6f8bc90
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from calibre.customize import InterfaceActionBase

VERSION = (3, 28, 0)
VERSION = (3, 28, 1)


class WordDumbDumb(InterfaceActionBase):
Expand Down
3 changes: 2 additions & 1 deletion data/deps.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"lxml": "4.9.2",
"pyahocorasick": "1.4.4",
"thinc-apple-ops": "0.1.3",
"torch": "1.13.1",
"rapidfuzz": "2.13.6"
}
}
4 changes: 2 additions & 2 deletions deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def install_deps(pkg: str, notif: Any) -> None:
if iswindows or prefs["cuda"] == "cu116":
pip_install(
"torch",
"",
dep_versions["torch"],
extra_index=f"https://download.pytorch.org/whl/{prefs['cuda']}",
notif=notif,
)
Expand Down Expand Up @@ -125,7 +125,7 @@ def pip_install(
) -> None:
pattern = f"{pkg.replace('-', '_')}-{pkg_version}*"
if pkg == "torch" and extra_index:
pattern = f"torch-*+{extra_index.split('/')[-1]}*"
pattern = f"torch-{pkg_version}+{extra_index.split('/')[-1]}*"
if not any(LIBS_PATH.glob(pattern)):
if notif:
notif.put((0, f"Installing {pkg}"))
Expand Down

0 comments on commit 6f8bc90

Please sign in to comment.