refactor: Improve data handling and representation in eval tests and prompts (#740)

This commit is contained in:
you-n-g
2025-04-03 13:53:25 +08:00
committed by GitHub
parent 6cc1e5da3c
commit d82442f2ed
5 changed files with 41 additions and 23 deletions
@@ -33,11 +33,11 @@ X, y, X_test, test_ids = debug_info_print(load_data)()
def get_length(data):
return len(data) if isinstance(data, list) else data.shape[0]
return data.shape[0] if hasattr(data, 'shape') else len(data)
def get_width(data):
return 1 if isinstance(data, list) else data.shape[1:]
return data.shape[1:] if hasattr(data, 'shape') else 1
def get_column_list(data):
@@ -410,9 +410,7 @@ data_loader_eval:
The data loader is part of the whole workflow. The user has executed the entire pipeline and provided additional stdout.
**Workflow Code:**
```python
{{ workflow_code }}
```
You should evaluate both the data loader test results and the overall workflow execution. **Approve the code only if both tests pass.**
{% endif %}