Spaces:
Sleeping
Sleeping
Download tests/test_metrics.py from jaothan/GenAI_project: direct link, hf CLI and curl.
- Browser
- Download file 407 Bytes
-
https://huggingface.co/spaces/jaothan/GenAI_project/resolve/main/tests/test_metrics.py
- Command line
-
hf download hf://spaces/jaothan/GenAI_project/tests/test_metrics.py
-
curl -L -o test_metrics.py https://huggingface.co/spaces/jaothan/GenAI_project/resolve/main/tests/test_metrics.py
407 Bytes
| import unittest | |
| from evaluations.evaluate_models import evaluate_model | |
| class TestMetrics(unittest.TestCase): | |
| def test_evaluate_model(self): | |
| model = train_full_finetune_model(train_data, val_data) | |
| results = evaluate_model(model, val_data) | |
| self.assertIn('accuracy', results) | |
| self.assertIn('f1_score', results) | |
| if __name__ == '__main__': | |
| unittest.main() | |