From 9df98a25ee8dd0d522acbd2207ec049b535159d7 Mon Sep 17 00:00:00 2001 From: ThibaultFy <50656860+ThibaultFy@users.noreply.github.com> Date: Thu, 11 May 2023 10:27:36 +0200 Subject: [PATCH] chore: remove metric from performance (#358) Signed-off-by: ThibaultFy <50656860+ThibaultFy@users.noreply.github.com> --- CHANGELOG.md | 4 ++++ substra/sdk/backends/local/dal.py | 1 - substra/sdk/backends/remote/backend.py | 1 - substra/sdk/models.py | 1 - tests/datastore.py | 12 ------------ 5 files changed, 4 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf80d669..9a300ce2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - BREAKING: default backend type for Client is now "subprocess" ([#353](https://github.com/Substra/substra/pull/353)) - Add identifier to performance view when calling `client.get_performances` ([#357](https://github.com/Substra/substra/pull/357)) +### Removed + +- Function name from the Performance model ([#358](https://github.com/Substra/substra/pull/358)) + ## [0.43.0](https://github.com/Substra/substra/releases/tag/0.43.0) - 2023-03-31 ### Added diff --git a/substra/sdk/backends/local/dal.py b/substra/sdk/backends/local/dal.py index 25f4e929..11fd7aad 100644 --- a/substra/sdk/backends/local/dal.py +++ b/substra/sdk/backends/local/dal.py @@ -134,7 +134,6 @@ def get_performances(self, key): performances.worker.append(task.worker) performances.task_key.append(task.key) - performances.function_name.append(function.name) performances.task_rank.append(task.rank) performances.round_idx.append(task.metadata.get("round_idx")) performances.identifier.append(perf_identifier) diff --git a/substra/sdk/backends/remote/backend.py b/substra/sdk/backends/remote/backend.py index 144c041b..e084f4ca 100644 --- a/substra/sdk/backends/remote/backend.py +++ b/substra/sdk/backends/remote/backend.py @@ -65,7 +65,6 @@ def get_performances(self, key): performances.worker.append(test_task["compute_task"]["worker"]) performances.task_key.append(test_task["compute_task"]["key"]) - performances.function_name.append(test_task["metric"]["name"]) performances.task_rank.append(test_task["compute_task"]["rank"]) performances.round_idx.append(test_task["compute_task"]["round_idx"]) performances.identifier.append(test_task["identifier"]) diff --git a/substra/sdk/models.py b/substra/sdk/models.py index effb6734..cc82cf9d 100644 --- a/substra/sdk/models.py +++ b/substra/sdk/models.py @@ -351,7 +351,6 @@ class Performances(_Model): compute_plan_metadata: List[dict] = [] worker: List[str] = [] task_key: List[str] = [] - function_name: List[str] = [] task_rank: List[int] = [] round_idx: List[int] = [] identifier: List[str] = [] diff --git a/tests/datastore.py b/tests/datastore.py index 40f48383..5550d03f 100644 --- a/tests/datastore.py +++ b/tests/datastore.py @@ -578,10 +578,6 @@ ], "worker": "MyOrg1MSP", }, - "metric": { - "key": "e526243f-f51a-4737-9fea-a5d55f4205fe", - "name": "accuracy", - }, "identifier": "performance", "perf": 0.673, }, @@ -599,10 +595,6 @@ ], "worker": "MyOrg1MSP", }, - "metric": { - "key": "e526243f-f51a-4737-9fea-a5d55f4205fe", - "name": "accuracy", - }, "identifier": "performance", "perf": 0.834, }, @@ -620,10 +612,6 @@ ], "worker": "MyOrg1MSP", }, - "metric": { - "key": "e526243f-f51a-4737-9fea-a5d55f4205fe", - "name": "accuracy", - }, "identifier": "performance", "perf": 0.956, },