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

Replay mode #9

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Replay mode #9

wants to merge 6 commits into from

Conversation

franktip
Copy link
Collaborator

@franktip franktip commented May 2, 2024

Adding a replay mode to LLMorpheus to make it possible to replay executions. Documentation has been updated and a test has been added.

Copy link
Collaborator

@max-schaefer max-schaefer left a comment

Choose a reason for hiding this comment

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

I don't know the code very well, but at a high level this looks fine.

I do wonder about all the stuff in test/input, though. For example, do we really want to check in a copy of the source code of zip-a-folder? Wouldn't it be better to check it out from its own repo on demand?

README.md Outdated Show resolved Hide resolved
@@ -7,6 +7,7 @@ import { Prompt } from "../prompt/Prompt";
import { PromptSpec } from "../prompt/PromptSpec";
import { SourceLocation } from "../util/SourceLocation";
import { charAtPosition, nextPosition, prevPosition } from "../util/code-utils";
import { Completion } from "../prompt/Completion";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we need this import?

src/model/ReplayModel.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@jon-bell jon-bell left a comment

Choose a reason for hiding this comment

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

I don't know the code very well, but at a high level this looks fine.

I do wonder about all the stuff in test/input, though. For example, do we really want to check in a copy of the source code of zip-a-folder? Wouldn't it be better to check it out from its own repo on demand?

This is probably better from a flakiness perspective (you don't want your tests to start to fail when the repo goes away or the commit you used is deleted, which does sometimes happen....). Agreed that including the project in the repo is a bit weird, though - the only better solution that I would suggest is creating a small testing project with a few tests just for this purpose, and including that in the repo.

franktip and others added 2 commits May 3, 2024 08:04
Co-authored-by: Max Schaefer <54907921+max-schaefer@users.noreply.github.com>
Co-authored-by: Max Schaefer <54907921+max-schaefer@users.noreply.github.com>
@franktip
Copy link
Collaborator Author

franktip commented May 3, 2024

I agree with your comments about not including zip-a-folder's source and that it's better to avoid the potential flakiness associated with downloading it as the tests run. I will work on replacing zip-a-folder with a small test project. Thanks!

@franktip
Copy link
Collaborator Author

I rewrote the test to use a simple example project and removed the dependence on zip-a-folder. I also rewrote several other tests to avoid a dependency on other projects. Please let me know if you have any further comments.

@jon-bell
Copy link
Collaborator

LGTM

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