-
-
Notifications
You must be signed in to change notification settings - Fork 260
Fix : Local development failing due to changed function definition #776
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
Closed
shashank40
wants to merge
3
commits into
OpenAdaptAI:main
from
shashank40:fix/local_development_record_replay_failing
Closed
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,20 +35,20 @@ class VanillaReplayStrategy(strategies.base.BaseReplayStrategy): | |
| def __init__( | ||
| self, | ||
| recording: models.Recording, | ||
| replay_instructions: str = "", | ||
| instructions: str = "", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @shashank40 if you remove the rest of this PR and only include the changes to this file I will be happy to merge it 👍 |
||
| process_events: bool = PROCESS_EVENTS, | ||
| ) -> None: | ||
| """Initialize the VanillaReplayStrategy. | ||
|
|
||
| Args: | ||
| recording (models.Recording): The recording object. | ||
| replay_instructions (str): Natural language instructions | ||
| instructions (str): Natural language instructions | ||
| for how recording should be replayed. | ||
| process_events (bool): Flag indicating whether to process the events. | ||
| Defaults to True. | ||
| """ | ||
| super().__init__(recording) | ||
| self.replay_instructions = replay_instructions | ||
| self.instructions = instructions | ||
| self.process_events = process_events | ||
| self.action_history = [] | ||
| self.action_event_idx = 0 | ||
|
|
@@ -89,7 +89,7 @@ def get_next_action_event( | |
| window_event, | ||
| action_events, | ||
| self.action_history, | ||
| self.replay_instructions, | ||
| self.instructions, | ||
| ) | ||
| if not action_event: | ||
| raise StopIteration() | ||
|
|
@@ -161,7 +161,7 @@ def generate_action_event( | |
| current_window_event: models.WindowEvent, | ||
| recorded_actions: list[models.ActionEvent], | ||
| replayed_actions: list[models.ActionEvent], | ||
| replay_instructions: str, | ||
| instructions: str, | ||
| ) -> models.ActionEvent: | ||
| """Modify the given ActionEvents according to the given replay instructions. | ||
|
|
||
|
|
@@ -176,7 +176,7 @@ def generate_action_event( | |
| recording | ||
| replayed_actions (list[models.ActionEvent]): list of actions produced during | ||
| current replay | ||
| replay_instructions (str): proposed modifications in natural language | ||
| instructions (str): proposed modifications in natural language | ||
| instructions | ||
|
|
||
| Returns: | ||
|
|
@@ -195,7 +195,7 @@ def generate_action_event( | |
| current_window=current_window_dict, | ||
| recorded_actions=recorded_action_dicts, | ||
| replayed_actions=replayed_action_dicts, | ||
| replay_instructions=replay_instructions, | ||
| replay_instructions=instructions, | ||
| ) | ||
| prompt_adapter = adapters.get_default_prompt_adapter() | ||
| content = prompt_adapter.prompt( | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
@shashank40 thank you for putting this together!
@KIRA009 do you know whether we are using this file
openadapt/start.pyanywhere? Git blame shows last update was about a year go@shashank40 I think this file is deprecated. Can you please clarify what caused you to attempt to run it? If it's documented somewhere we should clarify that it is deprecated.
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.
We are not. This script looks like it updates the state of your local repo, but I don't think this is needed any more now that we have apps
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.
@abrichr @KIRA009 as my app was not working after download, i used this script to spin up the app.
python -m openadapter.startruns a client for us and that is what i used this forThere 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.
@shashank40 please feel free to move this file to
openadapt/deprecated, and remove any mention of it in any documentation that you encountered 🙏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.
#777
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.
@shashank40 Sorry for being confused, but when you say the app wasn't working in the first instance, did you mean the compiled version (the link you find on https://openadapt.ai/) or did you set it up manually from the git repo?
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.
@KIRA009
I meant the compiled app as i commented here.
#771 (comment)