Unverified Commit 6843c5d7 authored by Lintang Sutawika's avatar Lintang Sutawika Committed by GitHub
Browse files

Merge pull request #1004 from EleutherAI/py3.8

Adds Python 3.8 Compatibility
parents 008fc2a2 c5fc2b19
...@@ -229,7 +229,11 @@ def create_task_from_path(json_path): ...@@ -229,7 +229,11 @@ def create_task_from_path(json_path):
def create_all_tasks(): def create_all_tasks():
resources_dir = importlib.resources.files("lm_eval.datasets") / "bigbench_resources" try:
resources_dir = importlib.resources.files("lm_eval.datasets") / "bigbench_resources"
except:
import importlib_resources
resources_dir = importlib_resources.files("lm_eval.datasets") / "bigbench_resources"
supported_tasks = [os.path.splitext(x)[0] for x in os.listdir(resources_dir)] supported_tasks = [os.path.splitext(x)[0] for x in os.listdir(resources_dir)]
res = {} res = {}
for task_name in supported_tasks: for task_name in supported_tasks:
......
...@@ -21,10 +21,11 @@ setuptools.setup( ...@@ -21,10 +21,11 @@ setuptools.setup(
"License :: OSI Approved :: MIT License", "License :: OSI Approved :: MIT License",
"Operating System :: OS Independent", "Operating System :: OS Independent",
], ],
python_requires=">=3.9", python_requires=">=3.8",
install_requires=[ install_requires=[
"datasets>=2.0.0", "datasets>=2.0.0",
"einops", "einops",
"importlib-resources",
"jsonlines", "jsonlines",
"numexpr", "numexpr",
"openai>=0.6.4", "openai>=0.6.4",
......
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