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

Fix lm_eval.tasks' has no attribute 'initialize_tasks' error #488

Merged
merged 1 commit into from
May 6, 2024

Conversation

KeitaW
Copy link
Contributor

@KeitaW KeitaW commented May 6, 2024

What does this PR do?

Fixes #422

lm-evaluation-harness has introduced breaking changes causing lm_eval.tasks' has no attribute 'initialize_tasks' error in the current recipes/evaluation/eval.py. This PR is aiming to resolve the issue by adopting new TaskManager API.
cf. https://github.com/EleutherAI/lm-evaluation-harness/releases

Feature/Issue validation/testing

Please describe the tests that you ran to verify your changes and relevant result summary. Provide instructions so it can be reproduced.
Please also list any relevant details for your test configuration.

python/eval.py \
     --model hf --model_args pretrained=meta-llama/Meta-Llama-3-8B --tasks hellaswag --device cuda:0   --batch_size 8"

yields

Map: 100%|██████████| 10042/10042 [00:01<00:00, 8628.17 examples/s]
0: 2024-05-06:12:44:13,769 INFO     [task.py:395] Building contexts for hellaswag on rank 0...
 62%|██████▏   | 6276/10042 [00:01<00:01, 2603.76it/s]
100%|██████████| 10042/10042 [00:02<00:00, 3578.18it/s]
0: 2024-05-06:12:44:17,334 INFO     [evaluator.py:393] Running loglikelihood requests
...
0: 2024-05-06:12:47:36,076 INFO     [eval.py:39] {
0:   "results": {
0:     "hellaswag": {
0:       "acc,none": 0.6015733917546305,
0:       "acc_stderr,none": 0.004885735963346892,
0:       "acc_norm,none": 0.7905795658235412,
0:       "acc_norm_stderr,none": 0.004060633907027273,
0:       "alias": "hellaswag"
0:     }
0:   },
...

Before submitting

  • [] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

Thanks for contributing 🎉!

@KeitaW KeitaW marked this pull request as ready for review May 6, 2024 12:46
Copy link
Contributor

@HamidShojanazeri HamidShojanazeri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @KeitaW for the PR.

@HamidShojanazeri HamidShojanazeri merged commit c3b2628 into meta-llama:main May 6, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

evaluation
3 participants