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

Benchmark_repos specified with a relative path #483

Merged
merged 2 commits into from
Jan 15, 2024

Conversation

jakethekoenig
Copy link
Member

The motivation for this PR is a fix for the benchmark github action. Now that the benchmarks are in a different package the aren't importing mentat code from where they did previously in the file system. This change should have no effect for people calling clone_repo from the mentat root dir.
I think in general it makes sense that the caller of setup_repo would expect the repo to be places in benchmark_repos of their cwd not relative to some script that they may not know about and may be in a strange unpredictable place depending on how mentat is installed.

Pull Request Checklist

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

The motivation for this PR is a fix for the benchmark runner. Now that
the benchmarks are in a different package the aren't importing mentat
code from where they did previously in the file system.
This change should have no effect for people calling clone_repo from the
mentat root dir.
I think in general it makes sense that the caller of setup_repo would
expect the repo to be places in benchmark_repos of their cwd not
relative to some script that they may not know about and may be in a
strange unpredictable place depending on how mentat is installed.
@@ -286,7 +286,6 @@ async def run_benchmarks(retries, benchmarks):
results.extend(await evaluate_sample(path))

summary = BenchmarkResultSummary(results)
os.chdir("../..")
Copy link
Member Author

Choose a reason for hiding this comment

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

This should have been removed when sample evaluation was added. cwd is set via argument not inferred from actual cwd. This originally changed the cwd back but now there's no need.

@jakethekoenig jakethekoenig merged commit 5501722 into main Jan 15, 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.

2 participants