import tensorflow as tf

        by default variables is None, all variables in the graph will be saved.
        It is probably a good idea since the whole session must be later be restored by the ChiefSession
        """
        os.makedirs(self._checkpoint_dir, exist_ok=True)
        #variables = tf.trainable_variables()
        self._saver = tf.train.Saver(variables, max_to_keep=max_to_keep, save_relative_paths=True)

    def _save_graph(self):
        writer = tf.summary.FileWriter(logdir=self._checkpoint_dir,
                                       # graph=self.sess.graph,
