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

Benchmarks moved out of test dir #472

Merged
merged 2 commits into from
Jan 11, 2024
Merged

Benchmarks moved out of test dir #472

merged 2 commits into from
Jan 11, 2024

Conversation

jakethekoenig
Copy link
Member

@jakethekoenig jakethekoenig commented Jan 11, 2024

They no longer run with pytest. They are just python scripts. This is in preparation to make tests for the benchmark runners themselves that mock out just the OpenAi api.

This change also has a number of small benefits:

  • The cli interface is simpler no longer requiring "pytest --benchmark -s test/"
  • We don't have to worry about pytest capturing or suppressing errors or standard out.
  • Some prompts wanted to be used in the scripts dir requiring tests to be a module. Not tests does not have to be one but benchmarks is.

I made sure benchmark_runner and the exercism benchmarks still work (you can test them with the commands in the readme) but some other benchmarks such as the context_benchmark seem a little broken at the moment. Which I guess shows the importance of testing.

Pull Request Checklist

  • Documentation has been updated, or this change doesn't require that

They no longer run with pytest. They are just python scripts. This is in
preparation to make tests for the benchmark runners themselves that mock
out just the OpenAi api.

This change also has a number of small benefits:
* The cli interface is simpler no longer requiring "pytest --benchmark
  -s test/"
* We don't have to worry about pytest capturing or suppressing errors or
  standard out.
* Some prompts wanted to be used in the scripts dir requiring tests to
  be a module. Not tests does not have to be one but benchmarks is.
Copy link
Member

@PCSwingle PCSwingle 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 doing this! This makes it a lot cleaner

@jakethekoenig jakethekoenig merged commit ab40760 into main Jan 11, 2024
16 checks passed
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

2 participants