  #!/usr/bin python3
  """ Stats functions for the GUI """
  
  import logging
  import time
  import os
  import warnings
 
</s> remove from math import ceil, sqrt
 </s> add from math import ceil
from threading import Event </s> remove from .control_helper import ControlBuilder, ControlPanelOption
from .display_graph import SessionGraph
from .display_page import DisplayPage
from .stats import Calculations, Session
 </s> add  </s> remove from lib.gui.stats import Session
 </s> add  </s> remove from .stats import Calculations
 </s> add from .stats import Calculations, Session
""" Stats functions for the GUI.

Holds the globally loaded training session. This will either be a user selected session (loaded in
the analysis tab) or the currently training session.

"""
  #!/usr/bin python3
""" Stats functions for the GUI.

Holds the globally loaded training session. This will either be a user selected session (loaded in
the analysis tab) or the currently training session.

"""
  
  import logging
  import time
  import os
  import warnings
keep replace keep keep keep keep keep
 GUI - Stats optimization (#1067)

* Faster stat loading + caching

* Compress data in cache

* Optimize some calculations

* Vectorize smoothing

* stats.Calculations optimized

* Load latest training data from live iterator

* Add options to training graph 
lib/gui/stats.py