From 7f592df32ed45a534af3d256c0c84fa623ec8152 Mon Sep 17 00:00:00 2001
From: Hammouda Elbez <hammouda.elbez@univ-lille.fr>
Date: Sun, 19 Jun 2022 17:44:43 +0200
Subject: [PATCH] Layout updated

---
 src/Global_Var.py                | 8 ++++++--
 src/Modules/General/callbacks.py | 4 ++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/Global_Var.py b/src/Global_Var.py
index 69e6dcf..1bb1375 100755
--- a/src/Global_Var.py
+++ b/src/Global_Var.py
@@ -136,8 +136,10 @@ class Global_Var():
         if ('synapseWeight' in self.db.list_collection_names()):
             col = pymongo.collection.Collection(self.db, 'synapseWeight')
             col.create_index([("T", 1)])
+            col.create_index([("C", 1)])
             col.create_index([("L", 1)])
             col.create_index([("To", 1)])
+            col.create_index([("index", 1)])
             print("Synapses index done")
 
     def getLabelTime(self, step, value):
@@ -268,13 +270,15 @@ class Global_Var():
 
             conf.setAppName(self.name)
             conf.set("spark.executor.instances", "8")
-            conf.set("spark.executor.memory", "8g")
+            conf.set("spark.executor.memory", "16g")
             conf.set("spark.sql.execution.arrow.pyspark.enabled", "true")
 
             self.sparkSession = SparkSession.builder.config(conf=conf) \
                 .config('spark.jars.packages', 'org.mongodb.spark:mongo-spark-connector_2.12:2.4.4') \
                 .getOrCreate()
-
+            
+            if not self.config.DEBUG:
+                self.sparkSession.sparkContext.setLogLevel("Error")
             return self.sparkSession.version
         except Exception as e:
             print("createSparkSession:" + str(e))
diff --git a/src/Modules/General/callbacks.py b/src/Modules/General/callbacks.py
index d7a98d4..aec930b 100755
--- a/src/Modules/General/callbacks.py
+++ b/src/Modules/General/callbacks.py
@@ -116,7 +116,7 @@ class callbacks(callbacksOp):
                                             mode='lines+markers',
                                             text=list(super.xAxisLabel),
                                             customdata=list(super.SynapseGraphY[layer]),
-                                            hovertemplate="<span style='color:white;''>%{text} <br> <b>%{customdata}</b> <br> <b>Max</b> "+str(super.MaxSynapse[layer])+"<\span>"))
+                                            hovertemplate="<span style='color:white;'>%{text} <br> <b>%{customdata}</b> <br> <b>Max</b> "+str(super.MaxSynapse[layer])))
                                 if(f == "Potentials"):
                                     if(layer not in super.PotentialGraphY):
                                         super.PotentialGraphY[layer] = deque(maxlen=100)
@@ -233,7 +233,7 @@ class callbacks(callbacksOp):
                                 go.Treemap(
                                     labels=list(super.Label.keys()
                                                 ) if super.Label != [] else [],
-                                    textfont_size=18,
+                                    textfont_size=20,
                                     textposition="middle center",
                                     parents=["" for i in range(
                                         len(super.Label))],
-- 
GitLab