-
Notifications
You must be signed in to change notification settings - Fork 668
Update EleutherAI Eval Harness to v0.4.5 #1800
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/torchtune/1800
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 13a65f0 with merge base 5de5001 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
from lm_eval.evaluator import evaluate, get_task_list | ||
from lm_eval.models.hf_vlms import HFMultimodalLM | ||
from lm_eval.models.huggingface import HFLM | ||
from lm_eval.tasks import get_task_dict, TaskManager | ||
from lm_eval.utils import make_table |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we still need to gate here? lm_eval is still not in our pyproject.toml. Or is the idea that we just directly raise the usual ModuleNotFoundError
since we are now on the latest version of lm_eval
? (Still seems like it might be good to explicitly say "install lm_eval==0.4.5" or whatever)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I was going to default to just let the ModuleNotFoundError roll through since it seems explicit enough.
@@ -469,6 +440,16 @@ class EleutherEvalRecipe(EvalRecipeInterface): | |||
""" | |||
|
|||
def __init__(self, cfg: DictConfig) -> None: | |||
# Double check we have the right Eval Harness version | |||
from importlib.metadata import version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do they not have __version__
defined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(joe-torchtune) [jrcummings@devvm050.nha0 ~/projects/joe-torchtune (update-eluther-pin)]$ python
Python 3.11.10 (main, Oct 3 2024, 07:29:13) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import lm_eval
>>> lm_eval.__version__
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'lm_eval' has no attribute '__version__'
Context:
In v0.4.5, EleutherAI officially added multimodal support to their Eval Harness. We had some hacky code to make sure the user was doing this on their main Github code before this release was public. Now that it is, we should just force people to upgrade their Harness version so that our multimodal code works.
In addition, I changed the way we gate external packages in our recipes. If they don't have lm-eval installed AT ALL, it will throw the usual
ModuleNotFound
error. This should be sufficient for them to understand that they need this to run the recipe. In addition, b/c we actually want them to use the latest version, we now have another check in the setup part of the workflow to make sure that they are installing v0.4.5 specifically. This happens before any heavy lifting starts.Changelog:
lm-eval==0.4.5
Testing:
Recipe tests:
python -m pytest tests/recipes/test_eleuther_eval.py --with-integration
Output from text run:
Output from multimodal run: