neulab/explainaboard_web

test_benchmark.TestBenchmark is failing

Opened this issue · 0 comments

test_benchmark.TestBenchmark is failing because the test is out-of-date.

Reproducing steps

npm run gen-api-code
docker run -v $PWD:/workdir -w /workdir -it python:3.9-bullseye /bin/bash 
pip install -r backend/requirements.txt -r backend/src/gen/requirements.txt
PYTHONPATH=backend/src/gen python -m unittest discover -v backend/src/tests

Output

[nltk_data] Downloading package punkt to /root/nltk_data...
[nltk_data]   Unzipping tokenizers/punkt.zip.
test_dataframe_to_table (test_benchmark.TestBenchmark) ... ERROR
test_masakhaner_aggregate (test_benchmark.TestBenchmark) ... ERROR
test_find_by_name (test_dataset_db.TestDatasetInfo) ... INFO:explainaboard:Caching https://raw.githubusercontent.com/ExpressAI/DataLab/main/utils/dataset_info.jsonl to /root/.cache/explainaboard/info/dataset_info.jsonl
ok
test_find_by_page (test_dataset_db.TestDatasetInfo) ... ok
test_find_by_task (test_dataset_db.TestDatasetInfo) ... ok
test_load_info (test_dataset_db.TestDatasetInfo) ... ok
test_get_task_categories (test_get_tasks.TestTasks) ... INFO:explainaboard:Caching http://phontron.com/download/explainaboard/pre_computed/kg/entity_type_level_map.json to /root/.cache/explainaboard/pre_computed/kg/entity_type_level_map.json
INFO:explainaboard:Caching http://phontron.com/download/explainaboard/pre_computed/kg/entity2wikidata.json to /root/.cache/explainaboard/pre_computed/kg/entity2wikidata.json
ok

======================================================================
ERROR: test_dataframe_to_table (test_benchmark.TestBenchmark)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/workdir/backend/src/tests/test_benchmark.py", line 141, in test_dataframe_to_table
    table = BenchmarkUtils.dataframe_to_table("my_view", orig_df)
TypeError: dataframe_to_table() missing 2 required positional arguments: 'plot_dict' and 'col_name'

======================================================================
ERROR: test_masakhaner_aggregate (test_benchmark.TestBenchmark)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/workdir/backend/src/tests/test_benchmark.py", line 65, in test_masakhaner_aggregate
    config = BenchmarkUtils.config_from_json_file(json_file)
AttributeError: type object 'BenchmarkUtils' has no attribute 'config_from_json_file'

----------------------------------------------------------------------
Ran 7 tests in 3.324s

FAILED (errors=2)