-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[Testing Github workflow] Updating workflows and makefile #214
Conversation
PTAL @lewtun |
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 adding the CI! LGTM with some small changes
Makefile
Outdated
@@ -14,6 +14,8 @@ quality: | |||
isort --check-only $(check_dirs) setup.py | |||
flake8 --max-line-length 119 $(check_dirs) setup.py | |||
|
|||
test: | |||
pytest tests/ |
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.
nit for debugging failed runs:
pytest tests/ | |
pytest -sv tests/ |
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.
good point
.github/workflows/quality.yml
Outdated
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.
Could we rename this action to tests.yml
please?
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.
Sure
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.
Sorry, do you mean rename the filename or creating another for tests?
… easier debugging
re-pinging @lewtun |
src/open_r1/rewards.py
Outdated
@@ -59,10 +59,10 @@ def format_reward(completions, **kwargs): | |||
def reasoning_steps_reward(completions, **kwargs): | |||
"""Reward function that checks for clear step-by-step reasoning. |
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.
maybe this instead?
"""Reward function that checks for clear step-by-step reasoning. | |
r"""Reward function that checks for clear step-by-step reasoning. |
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.
Yes, that's cleaner, thanks
tests/test_rewards.py
Outdated
self.assertEqual(reward_fn, 0) | ||
completions = [[{"content": "test test test"}]] | ||
rewards = reward_fn(completions) | ||
self.assertEqual(rewards, [0.0]) |
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.
This test was failing, because it was comparing int to function. I guess this was the intention
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.
you can remove this test
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, please just remove the test mentioned and we're good to merge
Done |
Adding automated testing for CI pipeline