🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
update path exist judgement
better629eb190f73bba4
diff --git a/examples/android_assistant/actions/manual_record.py b/examples/android_assistant/actions/manual_record.pyindex 003b207b0..4a95adcac 100644--- a/examples/android_assistant/actions/manual_record.py+++ b/examples/android_assistant/actions/manual_record.py@@ -47,10 +47,8 @@ class ManualRecord(Action):self.screenshot_before_path = Path(task_dir) / "raw_screenshots"self.screenshot_after_path = Path(task_dir) / "labeled_screenshots"self.xml_path = Path(task_dir) / "xml"-for path in [self.screenshot_before_path, self.screenshot_after_path, self.xml_path]:- if not path.exists():- path.mkdir(parents=True, exist_ok=True)+ path.mkdir(parents=True, exist_ok=True)self.record_path.write_text("")record_file = open(self.record_path, "w")diff --git a/examples/android_assistant/actions/parse_record.py b/examples/android_assistant/actions/parse_record.pyindex f9c6054bb..4887f34bd 100644--- a/examples/android_assistant/actions/parse_record.py+++ b/examples/android_assistant/actions/parse_record.py@@ -36,12 +36,13 @@ class ParseRecord(Action):screenshot_after_path: Path = ""async def run(self, app_name: str, task_dir: Path, docs_dir: Path):- docs_dir.mkdir(parents=True, exist_ok=True)doc_count = 0self.record_path = Path(task_dir) / "record.txt"self.task_desc_path = Path(task_dir) / "task_desc.txt"self.screenshot_before_path = Path(task_dir) / "raw_screenshots"self.screenshot_after_path = Path(task_dir) / "labeled_screenshots"+ for path in [self.screenshot_before_path, self.screenshot_after_path]:+ path.mkdir(parents=True, exist_ok=True)task_desc = self.task_desc_path.read_text()diff --git a/examples/android_assistant/actions/screenshot_parse.py b/examples/android_assistant/actions/screenshot_parse.pyindex 3bb65d5ef..f1e31f3df 100644--- a/examples/android_assistant/actions/screenshot_parse.py+++ b/examples/android_assistant/actions/screenshot_parse.py@@ -100,8 +100,7 @@ class ScreenshotParse(Action):env: AndroidEnv,):for path in [task_dir, docs_dir]:- if not path.exists():- path.mkdir(parents=True, exist_ok=True)+ path.mkdir(parents=True, exist_ok=True)screenshot_path: Path = env.observe(EnvObsParams(obs_type=EnvObsType.GET_SCREENSHOT, ss_name=f"{round_count}_before", local_save_dir=task_dir))diff --git a/examples/android_assistant/storage/android.view.ViewGroup_1067_236_android.widget.TextView_183_204_Apps_2.txt b/examples/android_assistant/storage/android.view.ViewGroup_1067_236_android.widget.TextView_183_204_Apps_2.txtdeleted file mode 100644index 19b670ea7..000000000--- a/examples/android_assistant/storage/android.view.ViewGroup_1067_236_android.widget.TextView_183_204_Apps_2.txt+++ /dev/null@@ -1 +0,0 @@-{'tap': '[CONTENT]\n{\n "Observation": "The first image shows a mobile device\'s home screen with various app icons and a Google search bar at the top. The second image displays an app drawer with a grid of apps and a search bar at the top, indicating that the UI element has been tapped.",\n "Thought": "Tapping the UI element opens the app drawer, which is a common function in mobile operating systems to access a list of all installed apps.",\n "Description": "Tapping this area will open the app drawer, displaying a list of all installed applications."\n}\n[/CONTENT]', 'text': '', 'v_swipe': '', 'h_swipe': '', 'long_press': ''}\ No newline at end of file