(self, *args)
| 124 | return False |
| 125 | |
| 126 | def parse_command(self, *args) -> tuple: |
| 127 | cmd_str, codelines, datasetcode = args[0], args[1], args[2] |
| 128 | success = True |
| 129 | try: |
| 130 | text = extract_prompt(cmd_str, "EDIT").split("\n") |
| 131 | if len(text) == 0: return False, None |
| 132 | lines_to_edit = text[0].split(" ") |
| 133 | if len(lines_to_edit) != 2: return False, None |
| 134 | lines_to_edit = [int(_) for _ in lines_to_edit] |
| 135 | if len(text[1:]) == 0: return False, None |
| 136 | return success, (lines_to_edit[0], lines_to_edit[1], codelines, text[1:], datasetcode) |
| 137 | except Exception as e: |
| 138 | return False, (None, None, None, None, None) |
| 139 | |
| 140 | |
| 141 | def get_score(outlined_plan, code, code_return, REWARD_MODEL_LLM, attempts=3, openai_api_key=None): |
no test coverage detected