-
Notifications
You must be signed in to change notification settings - Fork 430
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
Adding support for custom eval configs #1055
Adding support for custom eval configs #1055
Conversation
by adding include_path to EleutherAI specific eval args section in eleuther_evaluation.yaml file, custom lm-eval file can be used
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/torchtune/1055
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 4b8a092 with merge base f9cb9e6 (): This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@yasser-sulaiman thanks for the PR! Overall the changes look good to me. Can you update the test plan with a sanity check demonstrating that you're now able to load a custom task by passing |
Hello, |
A code example demonstrating it works as expected (in the form of a Gist) is good. |
thanks for the suggestion, here is the link to an example configuration that demonstrates it works as expected |
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.
Thanks for providing the code snippet! Left one minor comment
recipes/eleuther_eval.py
Outdated
@@ -241,7 +241,12 @@ def evaluate(self) -> None: | |||
except Exception: | |||
pass | |||
|
|||
task_dict = get_task_dict(self._tasks) | |||
if self._cfg.get("include_path", False): |
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.
can we do something like this?
task_manager = TaskManager(include_path=self._cfg.get("include_path", None))
task_dict = get_task_dict(self._tasks, task_manager)
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.
I applied the minor comment but did not know how to write a test case for it :(
…pe` class to improve the initialization of the task manager. Instead of using an if-else statement to check for the presence of the `include_path` configuration, the code now directly passes the value of `self._cfg.get("include_path", None)` to the `TaskManager` constructor.
by adding include_path to EleutherAI specific eval args section in eleuther_evaluation.yaml file, custom lm-eval file can be used
Context
What is the purpose of this PR? Is it to
Please link to any issues this PR addresses.
solves #1054
Changelog
What are the changes made in this PR?
Test plan
Please make sure to do each of the following if applicable to your PR. (If you're not sure about any one of these just ask and we will happily help.)
pre-commit install
)pytest tests
pytest tests -m integration_test