Commit c7fd34c2 authored by Jonathan Tow's avatar Jonathan Tow
Browse files

Replace `wget` downloading with `best_download`

parent ebcb28f2
...@@ -17,7 +17,7 @@ import numpy as np ...@@ -17,7 +17,7 @@ import numpy as np
from pathlib import Path from pathlib import Path
from lm_eval.base import Task, rf from lm_eval.base import Task, rf
from lm_eval.metrics import mean from lm_eval.metrics import mean
from lm_eval.utils import sh from best_download import download_file
class MuTualBase(Task): class MuTualBase(Task):
...@@ -34,7 +34,10 @@ class MuTualBase(Task): ...@@ -34,7 +34,10 @@ class MuTualBase(Task):
return return
Path.mkdir(self.BASE_PATH, parents=True) Path.mkdir(self.BASE_PATH, parents=True)
master_zip = Path("data/master.zip") master_zip = Path("data/master.zip")
sh(f"wget https://github.com/Nealcly/MuTual/archive/master.zip -O {master_zip}") download_file(
"https://github.com/Nealcly/MuTual/archive/master.zip",
str(master_zip),
"bb325cf6c672f0f02699993a37138b0fa0af6fcfc77ec81dfbe46add4d7b29f9")
with zipfile.ZipFile(master_zip, 'r') as zip: with zipfile.ZipFile(master_zip, 'r') as zip:
zip.extractall("data") zip.extractall("data")
Path("data/MuTual-master/data").rename(str(self.BASE_PATH)) Path("data/MuTual-master/data").rename(str(self.BASE_PATH))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment