Commit
·
68afe75
1
Parent(s):
f748a3e
Add early stopping for debugging on passed tests. Propagate minor changes to default human_message keys.
Browse files- CF_CodeCollab.yaml +2 -1
- CF_CodeDebug.py +6 -0
- CF_CodeDebug.yaml +3 -1
- CF_PlanCollab.yaml +2 -1
CF_CodeCollab.yaml
CHANGED
@@ -46,7 +46,8 @@ subflows_config:
|
|
46 |
partial_variables:
|
47 |
code_placeholder: "{{python_code}}"
|
48 |
template_format: jinja2
|
49 |
-
|
|
|
50 |
output_data_transformations:
|
51 |
- _target_: flows.data_transformations.RegexFirstOccurrenceExtractor
|
52 |
regex: '(?<=```python)([\s\S]*?)(?=```)'
|
|
|
46 |
partial_variables:
|
47 |
code_placeholder: "{{python_code}}"
|
48 |
template_format: jinja2
|
49 |
+
default_human_input_keys:
|
50 |
+
- "code_feedback"
|
51 |
output_data_transformations:
|
52 |
- _target_: flows.data_transformations.RegexFirstOccurrenceExtractor
|
53 |
regex: '(?<=```python)([\s\S]*?)(?=```)'
|
CF_CodeDebug.py
CHANGED
@@ -4,3 +4,9 @@ from flows.base_flows import GeneratorCriticFlow
|
|
4 |
class CF_CodeDebug(GeneratorCriticFlow):
|
5 |
def __init__(self, **kwargs):
|
6 |
super().__init__(**kwargs)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
class CF_CodeDebug(GeneratorCriticFlow):
|
5 |
def __init__(self, **kwargs):
|
6 |
super().__init__(**kwargs)
|
7 |
+
|
8 |
+
def _early_exit(self):
|
9 |
+
if self.flow_state.get("all_tests_passed", False):
|
10 |
+
return True
|
11 |
+
|
12 |
+
return super()._early_exit()
|
CF_CodeDebug.yaml
CHANGED
@@ -42,7 +42,9 @@ subflows_config:
|
|
42 |
- testing_results_summary
|
43 |
partial_variables:
|
44 |
code_placeholder: "{{python_code}}"
|
45 |
-
|
|
|
|
|
46 |
output_data_transformations:
|
47 |
- _target_: flows.data_transformations.RegexFirstOccurrenceExtractor
|
48 |
regex: '(?<=```python)([\s\S]*?)(?=```)'
|
|
|
42 |
- testing_results_summary
|
43 |
partial_variables:
|
44 |
code_placeholder: "{{python_code}}"
|
45 |
+
default_human_input_keys:
|
46 |
+
- "testing_results_summary"
|
47 |
+
- "all_tests_passed"
|
48 |
output_data_transformations:
|
49 |
- _target_: flows.data_transformations.RegexFirstOccurrenceExtractor
|
50 |
regex: '(?<=```python)([\s\S]*?)(?=```)'
|
CF_PlanCollab.yaml
CHANGED
@@ -44,7 +44,8 @@ subflows_config:
|
|
44 |
partial_variables:
|
45 |
plan_placeholder: "{{conceptual_solution}}"
|
46 |
template_format: jinja2
|
47 |
-
|
|
|
48 |
output_data_transformations:
|
49 |
- _target_: flows.data_transformations.RegexFirstOccurrenceExtractor
|
50 |
regex: '(?<=Conceptual solution)([\s\S]*?)(?=\n\n# [A-Z]|\Z)'
|
|
|
44 |
partial_variables:
|
45 |
plan_placeholder: "{{conceptual_solution}}"
|
46 |
template_format: jinja2
|
47 |
+
default_human_input_keys:
|
48 |
+
- "plan_feedback"
|
49 |
output_data_transformations:
|
50 |
- _target_: flows.data_transformations.RegexFirstOccurrenceExtractor
|
51 |
regex: '(?<=Conceptual solution)([\s\S]*?)(?=\n\n# [A-Z]|\Z)'
|