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 parse reward event index error #77

Merged
merged 7 commits into from
Nov 20, 2023
Merged

Conversation

isabella618033
Copy link
Collaborator

File "/home/bts/text-prompting/prompting/validators/reward/reward.py", line 33, in parse_reward_events
field_names = [field.name for field in fields(reward_events[0])]
IndexError: list index out of range

Copy link
Contributor

@p-ferreira p-ferreira left a comment

Choose a reason for hiding this comment

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

It would be nice to have some unit tests around this function, two would be enough:

  • one test to validate that the function behaves as expected when given reward events
  • one test to validate that the function behaves as expected when given no reward events

@p-ferreira p-ferreira marked this pull request as ready for review November 20, 2023 17:47
@p-ferreira p-ferreira self-requested a review November 20, 2023 17:55
@p-ferreira p-ferreira merged commit 0ac6dec into staging Nov 20, 2023
4 of 6 checks passed
@p-ferreira p-ferreira mentioned this pull request Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants