From f0a23c9ed7490de035454806b4af9a48e240cc65 Mon Sep 17 00:00:00 2001 From: Hammouda Elbez <hammouda.elbez@univ-lille.fr> Date: Mon, 12 Jun 2023 10:28:49 +0200 Subject: [PATCH] Adding Epoch field in Info schema --- src/Modules/General/spark.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Modules/General/spark.py b/src/Modules/General/spark.py index f57c6a3..273237a 100755 --- a/src/Modules/General/spark.py +++ b/src/Modules/General/spark.py @@ -36,6 +36,12 @@ class spark(sparkOp): LN = data["L:N"] LN = loads(dumps(LN)) self.g.Layer_Neuron = LN + + try: + self.g.InputPerEpoch = data["E"] + except Exception: + self.g.InputPerEpoch = pymongo.collection.Collection(self.g.db, 'labels').count_documents({}) + pass for l in LN: if(l == "Input"): self.g.Input = LN[l] @@ -68,7 +74,6 @@ class spark(sparkOp): self.g.labelsExistance = True M = max(M, pymongo.collection.Collection( self.g.db, 'labels').find_one(sort=[("T", -1)])["T"]) - self.g.InputPerEpoch = pymongo.collection.Collection(self.g.db, 'labels').count_documents({}) else: print("No labels") -- GitLab