feat: persist single evaluation history

This commit is contained in:
wuyang6
2026-07-23 19:46:15 +08:00
parent 5be9434ba3
commit 6116d10e8f
5 changed files with 398 additions and 13 deletions
+9
View File
@@ -333,6 +333,15 @@ class EvaluationRuntimeTests(unittest.TestCase):
self.assertEqual(result['model'], 'test-model')
self.assertEqual(runtime.list_datasets('alice'), [])
self.assertEqual(runtime.list_experiments('alice'), [])
history = runtime.list_single_analyses('alice')
self.assertEqual(len(history), 1)
self.assertEqual(history[0]['id'], result['id'])
self.assertEqual(history[0]['query'], '导航去公司')
self.assertEqual(history[0]['prediction'], '地图导航')
self.assertNotIn('raw_output', history[0])
detail = runtime.get_single_analysis(result['id'], 'alice')
self.assertEqual(detail['prediction'], '地图导航')
self.assertEqual(detail['canonical']['query'], '导航去公司')
finally:
runtime.shutdown()