Spaces:
Paused
Paused
Download tests/test_workflow.py from dineshb/DataPilot-AI-Agent: direct link, hf CLI and curl.
- Browser
- Download file 894 Bytes
-
https://huggingface.co/spaces/dineshb/DataPilot-AI-Agent/resolve/main/tests/test_workflow.py
- Command line
-
hf download hf://spaces/dineshb/DataPilot-AI-Agent/tests/test_workflow.py
-
curl -L -o test_workflow.py https://huggingface.co/spaces/dineshb/DataPilot-AI-Agent/resolve/main/tests/test_workflow.py
894 Bytes
| from pathlib import Path | |
| from datapilot.config import Settings | |
| from datapilot.data import load_sample | |
| from datapilot.workflow import run_analysis | |
| def test_end_to_end_classification_workflow(tmp_path: Path): | |
| frame, target, name = load_sample("iris") | |
| settings = Settings( | |
| artifact_root=tmp_path / "artifacts", | |
| database_url=f"sqlite:///{(tmp_path / 'runs.db').as_posix()}", | |
| max_critic_retries=0, | |
| optuna_trials=0, | |
| ) | |
| result = run_analysis(frame, target, name, settings) | |
| assert result.status == "completed" | |
| assert result.best_model | |
| assert result.model_results[0].primary_score >= 0 | |
| assert result.critic.approved | |
| assert Path(result.artifacts["pipeline"]).exists() | |
| assert Path(result.artifacts["model_card"]).exists() | |
| assert any(item["agent"] == "Evaluation / Critic Agent" for item in result.trace) | |