Skip to content

Commit

Permalink
fix: Remove subprocess unzip
Browse files Browse the repository at this point in the history
  • Loading branch information
Kohulan authored Feb 28, 2023
1 parent 220a93c commit e7a5eca
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions STOUT/repack/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import numpy as np
import pystow
import subprocess
import zipfile
from jpype import startJVM, getDefaultJVMPath
from jpype import JClass, JVMNotFoundException, isJVMStarted

Expand Down Expand Up @@ -195,11 +196,5 @@ def download_trained_weights(model_url: str, model_path: str, verbose=1):
print(model_path)
if verbose > 0:
print("... done downloading trained model!")
subprocess.run(
[
"unzip",
model_path.as_posix(),
"-d",
model_path.parent.as_posix(),
]
)
with zipfile.ZipFile(model_path.as_posix(), "r") as zip_ref:
zip_ref.extractall(model_path.parent.as_posix())

0 comments on commit e7a5eca

Please sign in to comment.