Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glianorex_en task does not work #2329

Closed
casper-hansen opened this issue Sep 23, 2024 · 1 comment · Fixed by #2332
Closed

glianorex_en task does not work #2329

casper-hansen opened this issue Sep 23, 2024 · 1 comment · Fixed by #2332
Labels
bug Something isn't working.

Comments

@casper-hansen
Copy link

This is with lm_eval==0.4.4 and transformers==4.44.2.

CLI:

lm_eval --model hf \
    --model_args pretrained=meta-llama/Meta-Llama-3.1-8B \
    --tasks glianorex_en \
    --device cpu \   
    --batch_size 1

Error:

2024-09-23:13:02:51,389 WARNING  [task.py:337] [Task: glianorex_en] has_training_docs and has_validation_docs are False, using test_docs as fewshot_docs but this is not recommended.
Traceback (most recent call last):
  File "/Users/cxrh/miniconda3/bin/lm_eval", line 8, in <module>
    sys.exit(cli_evaluate())
             ^^^^^^^^^^^^^^
  File "/Users/cxrh/miniconda3/lib/python3.11/site-packages/lm_eval/__main__.py", line 382, in cli_evaluate
    results = evaluator.simple_evaluate(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/cxrh/miniconda3/lib/python3.11/site-packages/lm_eval/utils.py", line 397, in _wrapper
    return fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^
  File "/Users/cxrh/miniconda3/lib/python3.11/site-packages/lm_eval/evaluator.py", line 232, in simple_evaluate
    task_dict = get_task_dict(tasks, task_manager)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/cxrh/miniconda3/lib/python3.11/site-packages/lm_eval/tasks/__init__.py", line 618, in get_task_dict
    task_name_from_string_dict = task_manager.load_task_or_group(
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/cxrh/miniconda3/lib/python3.11/site-packages/lm_eval/tasks/__init__.py", line 410, in load_task_or_group
    collections.ChainMap(*map(self._load_individual_task_or_group, task_list))
  File "/Users/cxrh/miniconda3/lib/python3.11/site-packages/lm_eval/tasks/__init__.py", line 310, in _load_individual_task_or_group
    return _load_task(task_config, task=name_or_config)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/cxrh/miniconda3/lib/python3.11/site-packages/lm_eval/tasks/__init__.py", line 276, in _load_task
    task_object = ConfigurableTask(config=config)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/cxrh/miniconda3/lib/python3.11/site-packages/lm_eval/api/task.py", line 850, in __init__
    if self.fewshot_docs() is not None:
       ^^^^^^^^^^^^^^^^^^^
  File "/Users/cxrh/miniconda3/lib/python3.11/site-packages/lm_eval/api/task.py", line 999, in fewshot_docs
    return super().fewshot_docs()
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/cxrh/miniconda3/lib/python3.11/site-packages/lm_eval/api/task.py", line 341, in fewshot_docs
    return self.test_docs()
           ^^^^^^^^^^^^^^^^
  File "/Users/cxrh/miniconda3/lib/python3.11/site-packages/lm_eval/api/task.py", line 972, in test_docs
    return self.config.process_docs(self.dataset[self.config.test_split])
                                    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/cxrh/miniconda3/lib/python3.11/site-packages/datasets/dataset_dict.py", line 74, in __getitem__
    return super().__getitem__(k)
           ^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'train'
@baberabb
Copy link
Contributor

Hi! #2332 should fix this.

@baberabb baberabb added the bug Something isn't working. label Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants