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

Adding support for custom eval configs #1055

Merged

Conversation

yasser-sulaiman
Copy link
Contributor

@yasser-sulaiman yasser-sulaiman commented Jun 5, 2024

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

  • add a new feature
  • fix a bug
  • update tests and/or documentation
  • other (please add here)

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.)

  • run pre-commit hooks and linters (make sure you've first installed via pre-commit install)
  • add unit tests for any new functionality
  • update docstrings for any new or updated methods or classes
  • run unit tests via pytest tests
  • run recipe tests via pytest tests -m integration_test
  • manually run any new or modified recipes with sufficient proof of correctness
    • include relevant commands and any other artifacts in this summary (pastes of loss curves, eval results, etc.)

by adding include_path to EleutherAI specific eval args section in eleuther_evaluation.yaml file, custom lm-eval file can be used
Copy link

pytorch-bot bot commented Jun 5, 2024

🔗 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 Failures

As of commit 4b8a092 with merge base f9cb9e6 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 5, 2024
@ebsmothers
Copy link
Contributor

@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 include_path?

@yasser-sulaiman
Copy link
Contributor Author

@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 include_path?

Hello,
I am not sure I understood it, should I include an example demonstrating how it works or should I add a unit test for it?

@joecummings
Copy link
Contributor

@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 include_path?

Hello,

I am not sure I understood it, should I include an example demonstrating how it works or should I add a unit test for it?

A code example demonstrating it works as expected (in the form of a Gist) is good.

@yasser-sulaiman
Copy link
Contributor Author

@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 include_path?

Hello,
I am not sure I understood it, should I include an example demonstrating how it works or should I add a unit test for it?

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

Copy link
Contributor

@RdoubleA RdoubleA left a 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

@@ -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):
Copy link
Contributor

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)

Copy link
Contributor Author

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.
@RdoubleA RdoubleA merged commit dceaf05 into pytorch:main Jun 11, 2024
29 checks passed
maximegmd pushed a commit to maximegmd/torchtune that referenced this pull request Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants