-
Notifications
You must be signed in to change notification settings - Fork 965
Implementation of execution_flow #137
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
Conversation
.gitignore
Outdated
| .vscode | ||
|
|
||
| # Ignore the logs | ||
| logs 3/* |
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.
logs 3?
instantiation/config/config_dev.yaml
Outdated
| FILTER_PROMPT: "instantiation/controller/prompts/{mode}/filter.yaml" # The prompt for the filter | ||
| PREFILL_EXAMPLE_PROMPT: "instantiation/controller/prompts/{mode}/prefill_example.yaml" # The prompt for the action prefill example | ||
| EXECUTE_PROMPT: "instantiation/controller/prompts/{mode}/execute.yaml" # The prompt for the action execute | ||
| EXECUTE_PROMPT: "instantiation/controller/prompts/{mode}/execute.yaml" # The prompt for the action execute |
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.
duplicated? is it needed
instantiation/config/config_dev.yaml
Outdated
| RECTANGLE_TIME: 1 | ||
| SHOW_VISUAL_OUTLINE_ON_SCREEN: False | ||
| INCLUDE_LAST_SCREENSHOT: False # Whether to include the last screenshot in the observation | ||
| CONCAT_SCREENSHOT: False # Whether to concat the screenshot for the control item |
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.
read default config from ufo
| self._status = None | ||
| self._process_name = process_name | ||
| self._app_root_name = app_root_name | ||
| self._memory = Memory() |
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.
memory needed?
| self.app_root_name, self.app_name | ||
| ) | ||
| self._control_inspector = ControlInspectorFacade(_BACKEND) | ||
| self._control_inspector = ControlInspectorFacade(_BACKEND) |
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.
dup?
| super().__init__(agent=ExecuteAgent, context=context) | ||
|
|
||
| self.execution_time = 0 | ||
| self._app_env = environment |
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.
call process to execute
| # self._response_json = self.app_agent.response_to_dict(self._response) | ||
|
|
||
| # except Exception: | ||
| # self.general_error_handler() |
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.
Please do not change UFO
| """ | ||
|
|
||
| control_selected = self._annotation_dict.get(self._control_label, None) | ||
| control_selected_2 = self._annotation_dict.get(self.control_text, None) |
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.
control_selected_2 ?
| "Results": self._results, | ||
| } | ||
| self._memory_data.set_values_from_dict(self._response_json) | ||
| self._memory_data.set_values_from_dict(self._response) |
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.
do not change memory
| Save the screenshot to the blackboard if the SaveScreenshot flag is set to True by the AppAgent. | ||
| """ | ||
| screenshot_saving = self._response_json.get("SaveScreenshot", {}) | ||
| screenshot_saving = self._response.get("SaveScreenshot", {}) |
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.
dup
| ```bash | ||
| python -m dataflow single execution /task_dir/task_file_name | ||
| ``` | ||
|
|
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.
Add args for other parameters
| python -m dataflow batch dataflow /path/to/task_dir/ | ||
| ``` | ||
| * Instantiation Task Batch: | ||
| ```bash |
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.
No need to specify folder and file
dataflow/config/config_dev.yaml
Outdated
| AOAI_DEPLOYMENT: "gpt-4-visual-preview" # Your AOAI deployment if apply | ||
| API_VERSION: "2024-02-15-preview" # "2024-02-15-preview" by default. | ||
| OPENAI_API_MODEL: "gpt-4-0125-preview" # The only OpenAI model by now that accepts visual input | ||
|
|
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.
double check, split the config to this module
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.
The config will not work for Openai and aoai
dataflow/data_flow_controller.py
Outdated
| } | ||
| return init_task_info | ||
|
|
||
| def _load_schema(self, task_type: str) -> dict: |
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.
from typing import Dict, List, Tuple
Dict[str, str]
dataflow/data_flow_controller.py
Outdated
| ) | ||
| return prefill_result["instantiated_plan"] | ||
|
|
||
| def execute_execution(self, request: str, plan: dict) -> None: |
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.
Dict
| # Dataflow | ||
|
|
||
| Dataflow uses UFO to implement `instantiation`, `execution`, and `dataflow` for a given task, with options for batch processing and single processing. | ||
|
|
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.
Output schema explanation
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.
please do not change readme
dataflow/config/config_dev.yaml
Outdated
| AOAI_DEPLOYMENT: "gpt-4-visual-preview" # Your AOAI deployment if apply | ||
| API_VERSION: "2024-02-15-preview" # "2024-02-15-preview" by default. | ||
| OPENAI_API_MODEL: "gpt-4-0125-preview" # The only OpenAI model by now that accepts visual input | ||
|
|
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.
The config will not work for Openai and aoai
ufo/agents/agent/app_agent.py
Outdated
| ) -> None: | ||
| """ | ||
| Initialize the AppAgent. | ||
| Initialize the AppAgent.TODO:simplify related init |
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.
Please do not change code in UFO, also do not add redundant comment.
| """ | ||
|
|
||
| control_selected = self._annotation_dict.get(self._control_label, None) | ||
| control_selected = self._annotation_dict.get(self._control_label, "") |
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.
Do not change. The logic is wrong.
No description provided.