Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -201,6 +201,8 @@ class MetricCollector:
|
|
| 201 |
print("⚠️ Metrics parsed but score is 0")
|
| 202 |
else:
|
| 203 |
print("⚠️ get_metrics returned None")
|
|
|
|
|
|
|
| 204 |
|
| 205 |
# Priority 2: Try common metric endpoint patterns
|
| 206 |
metric_keywords = ['metric', 'benchmark', 'performance', 'test', 'stats']
|
|
@@ -580,7 +582,7 @@ ERROR INFO:
|
|
| 580 |
|
| 581 |
CURRENT CODE:
|
| 582 |
```python
|
| 583 |
-
{self.shared_context['current_code']
|
| 584 |
```
|
| 585 |
|
| 586 |
Analyze:
|
|
@@ -607,7 +609,7 @@ ERROR INFO:
|
|
| 607 |
|
| 608 |
CURRENT CODE:
|
| 609 |
```python
|
| 610 |
-
{self.shared_context['current_code']
|
| 611 |
```
|
| 612 |
|
| 613 |
Fix the error and provide corrected code. Ensure:
|
|
@@ -808,7 +810,7 @@ REWRITE the COMPLETE code fixing this error. Do NOT use placeholders."""
|
|
| 808 |
|
| 809 |
CODE:
|
| 810 |
```python
|
| 811 |
-
{code
|
| 812 |
```
|
| 813 |
|
| 814 |
Generate:
|
|
@@ -844,7 +846,7 @@ METRICS (Source: {metrics_to_use.get('source', 'test_estimates') if isinstance(m
|
|
| 844 |
|
| 845 |
DEVELOPER'S CODE:
|
| 846 |
```python
|
| 847 |
-
{code
|
| 848 |
```
|
| 849 |
|
| 850 |
Validate:
|
|
@@ -892,7 +894,7 @@ Provide a performance score (0-100) and recommendations."""
|
|
| 892 |
|
| 893 |
CURRENT CODE:
|
| 894 |
```python
|
| 895 |
-
{code
|
| 896 |
```
|
| 897 |
|
| 898 |
Fix all identified issues while maintaining or improving performance.
|
|
@@ -955,7 +957,7 @@ REWRITE the COMPLETE code fixing this error. Do NOT use placeholders."""
|
|
| 955 |
|
| 956 |
CURRENT CODE:
|
| 957 |
```python
|
| 958 |
-
{self.shared_context['current_code']
|
| 959 |
```
|
| 960 |
|
| 961 |
PERFORMANCE HISTORY:
|
|
|
|
| 201 |
print("⚠️ Metrics parsed but score is 0")
|
| 202 |
else:
|
| 203 |
print("⚠️ get_metrics returned None")
|
| 204 |
+
else:
|
| 205 |
+
print("⚠️ 'get_metrics' endpoint NOT found in named_endpoints!")
|
| 206 |
|
| 207 |
# Priority 2: Try common metric endpoint patterns
|
| 208 |
metric_keywords = ['metric', 'benchmark', 'performance', 'test', 'stats']
|
|
|
|
| 582 |
|
| 583 |
CURRENT CODE:
|
| 584 |
```python
|
| 585 |
+
{self.shared_context['current_code']}
|
| 586 |
```
|
| 587 |
|
| 588 |
Analyze:
|
|
|
|
| 609 |
|
| 610 |
CURRENT CODE:
|
| 611 |
```python
|
| 612 |
+
{self.shared_context['current_code']}
|
| 613 |
```
|
| 614 |
|
| 615 |
Fix the error and provide corrected code. Ensure:
|
|
|
|
| 810 |
|
| 811 |
CODE:
|
| 812 |
```python
|
| 813 |
+
{code}
|
| 814 |
```
|
| 815 |
|
| 816 |
Generate:
|
|
|
|
| 846 |
|
| 847 |
DEVELOPER'S CODE:
|
| 848 |
```python
|
| 849 |
+
{code}
|
| 850 |
```
|
| 851 |
|
| 852 |
Validate:
|
|
|
|
| 894 |
|
| 895 |
CURRENT CODE:
|
| 896 |
```python
|
| 897 |
+
{code}
|
| 898 |
```
|
| 899 |
|
| 900 |
Fix all identified issues while maintaining or improving performance.
|
|
|
|
| 957 |
|
| 958 |
CURRENT CODE:
|
| 959 |
```python
|
| 960 |
+
{self.shared_context['current_code']}
|
| 961 |
```
|
| 962 |
|
| 963 |
PERFORMANCE HISTORY:
|