diff --git a/substra/sdk/backends/local/dal.py b/substra/sdk/backends/local/dal.py index a3e1333d..f804a3c4 100644 --- a/substra/sdk/backends/local/dal.py +++ b/substra/sdk/backends/local/dal.py @@ -142,7 +142,11 @@ def get_performances(self, key: str) -> models.Performances: performances.worker.append(task.worker) performances.task_key.append(task.key) performances.task_rank.append(task.rank) - performances.round_idx.append(int(task.metadata.get("round_idx"))) + try: + round_idx = int(task.metadata.get("round_idx")) + except TypeError: + round_idx = None + performances.round_idx.append(round_idx) performances.identifier.append(output.identifier) performances.performance.append(output.asset) diff --git a/substra/sdk/backends/remote/backend.py b/substra/sdk/backends/remote/backend.py index c5976360..2d115985 100644 --- a/substra/sdk/backends/remote/backend.py +++ b/substra/sdk/backends/remote/backend.py @@ -97,7 +97,11 @@ def get_performances(self, key: str) -> models.Performances: performances.worker.append(test_task["compute_task"]["worker"]) performances.task_key.append(test_task["compute_task"]["key"]) performances.task_rank.append(test_task["compute_task"]["rank"]) - performances.round_idx.append(int(test_task["compute_task"]["round_idx"])) + try: + round_idx = int(test_task["compute_task"]["round_idx"]) + except TypeError: + round_idx = None + performances.round_idx.append(round_idx) performances.identifier.append(test_task["identifier"]) performances.performance.append(test_task["perf"])