  import time
  import os
  import warnings
  
  from math import ceil, sqrt
  
  import numpy as np
  import tensorflow as tf
  from tensorflow.python import errors_impl as tf_errors  # pylint:disable=no-name-in-module
  from tensorflow.core.util import event_pb2
 
</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 import (TaskBar, CliOptions, CommandNotebook, ConsoleOut, Session, DisplayNotebook,
 </s> add from lib.gui import (TaskBar, CliOptions, CommandNotebook, ConsoleOut, DisplayNotebook, </s> remove from .stats import Calculations
 </s> add from .stats import Calculations, Session
from math import ceil
from threading import Event
  import time
  import os
  import warnings
  
from math import ceil
from threading import Event
  
  import numpy as np
  import tensorflow as tf
  from tensorflow.python import errors_impl as tf_errors  # pylint:disable=no-name-in-module
  from tensorflow.core.util import event_pb2
keep keep keep 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