Commit 606b98f7 authored by Stephen Hogg's avatar Stephen Hogg
Browse files

Change function signature so package root is always found from utils.py

parent 4d8dde31
......@@ -65,7 +65,7 @@ def simple_evaluate(model, model_args=None, tasks=[],
task_dict = lm_eval.tasks.get_task_dict(tasks)
if check_integrity:
run_task_tests(start_path=pathlib.Path(__file__), task_list=tasks)
run_task_tests(task_list=tasks)
results = evaluate(
lm=lm,
......
......@@ -177,11 +177,11 @@ def find_test_root(start_path: pathlib.Path) -> pathlib.Path:
f"of {start_path}")
@positional_deprecated
def run_task_tests(start_path: pathlib.Path, task_list: List[str]):
def run_task_tests(task_list: List[str]):
"""
Find the package root and run the tests for the given tasks
"""
package_root = find_test_root(start_path=start_path)
package_root = find_test_root(start_path=pathlib.Path(__file__))
task_string = ' or '.join(task_list)
args = [f'{package_root}/tests/test_version_stable.py', f'--rootdir={package_root}', '-k', f'{task_string}']
sys.path.append(str(package_root))
......
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