def reset(self): if self.waiting_step: logger.warn('Called reset() while waiting for the step to complete') self.step_wait() for pipe in self.parent_pipes: pipe.send(('reset', None)) return self._decode_obses([pipe.recv() for pipe in self.parent_pipes])
def load_state(fname, sess=None): from openai_baselines import logger logger.warn( 'load_state method is deprecated, please use load_variables instead') sess = sess or get_session() saver = tf.train.Saver() saver.restore(tf.get_default_session(), fname)
def save_state(fname, sess=None): from openai_baselines import logger logger.warn( 'save_state method is deprecated, please use save_variables instead') sess = sess or get_session() dirname = os.path.dirname(fname) if any(dirname): os.makedirs(dirname, exist_ok=True) saver = tf.train.Saver() saver.save(tf.get_default_session(), fname)
def render(self, mode='human'): logger.warn('Render not defined for %s' % self)