Fix model_metrics parameter name in get_multi_task_metrics schema

This commit is contained in:
allegroai 2024-01-10 15:12:56 +02:00
parent 811ab2bf4f
commit 8a99eb6812
3 changed files with 12 additions and 3 deletions

View File

@ -876,10 +876,10 @@ class PrePopulate:
"30795571a4704717a80de8705897ytuyg",
]
auth_user = cls.auth_user_cls.from_json(json.dumps(user))
auth_user = cls.auth_user_cls.from_json(json.dumps(user), created=True)
auth_user.company = company_id
auth_user.save()
be_user = cls.user_cls.from_json(json.dumps(be_users[uid]))
be_user = cls.user_cls.from_json(json.dumps(be_users[uid]), created=True)
be_user.company = company_id
be_user.save()

View File

@ -767,7 +767,7 @@ get_multi_task_metrics {
type: array
items {type: string}
}
model_metrics {
model_events {
description: If not set or set to false then passed ids are task ids otherwise model ids
type: boolean
default: false

View File

@ -285,6 +285,15 @@ class TestTaskEvents(TestService):
self._assert_log_events(task=task, expected_total=1)
metrics = self.api.events.get_multi_task_metrics(
tasks=[model],
event_type="training_stats_scalar",
model_events=True,
).metrics
self.assertEqual([m.metric for m in metrics], [f"Metric{i}" for i in range(5)])
variants = [f"Variant{i}" for i in range(5)]
self.assertTrue(all(m.variants == variants for m in metrics))
def test_error_events(self):
task = self._temp_task()
events = [