Python baselines.logger.warn() Examples
The following are 27
code examples of baselines.logger.warn().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
baselines.logger
, or try the search function
.
Example #1
Source File: tf_util.py From ICML2019-TREX with MIT License | 5 votes |
def load_state(fname, sess=None): from 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)
Example #2
Source File: shmem_vec_env.py From carla-rl with MIT License | 5 votes |
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])
Example #3
Source File: __init__.py From rl-generalization with MIT License | 5 votes |
def render(self): logger.warn('Render not defined for %s'%self)
Example #4
Source File: shmem_vec_env.py From baselines with MIT License | 5 votes |
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])
Example #5
Source File: tf_util.py From baselines with MIT License | 5 votes |
def save_state(fname, sess=None): from 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) # The methods above and below are clearly doing the same thing, and in a rather similar way # TODO: ensure there is no subtle differences and remove one
Example #6
Source File: tf_util.py From baselines with MIT License | 5 votes |
def load_state(fname, sess=None): from 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)
Example #7
Source File: __init__.py From self-imitation-learning with MIT License | 5 votes |
def render(self): logger.warn('Render not defined for %s'%self)
Example #8
Source File: __init__.py From sonic_contest with MIT License | 5 votes |
def render(self): logger.warn('Render not defined for %s'%self)
Example #9
Source File: __init__.py From MOREL with MIT License | 5 votes |
def render(self): logger.warn('Render not defined for %s'%self)
Example #10
Source File: tf_util.py From ICML2019-TREX with MIT License | 5 votes |
def save_state(fname, sess=None): from 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) # The methods above and below are clearly doing the same thing, and in a rather similar way # TODO: ensure there is no subtle differences and remove one
Example #11
Source File: tf_util.py From ICML2019-TREX with MIT License | 5 votes |
def load_state(fname, sess=None): from 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)
Example #12
Source File: shmem_vec_env.py From ICML2019-TREX with MIT License | 5 votes |
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])
Example #13
Source File: tf_util.py From ICML2019-TREX with MIT License | 5 votes |
def save_state(fname, sess=None): from 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) # The methods above and below are clearly doing the same thing, and in a rather similar way # TODO: ensure there is no subtle differences and remove one
Example #14
Source File: __init__.py From lirpg with MIT License | 5 votes |
def render(self): logger.warn('Render not defined for %s'%self)
Example #15
Source File: __init__.py From DRL_DeliveryDuel with MIT License | 5 votes |
def render(self): logger.warn('Render not defined for %s'%self)
Example #16
Source File: __init__.py From rl_graph_generation with BSD 3-Clause "New" or "Revised" License | 5 votes |
def render(self): logger.warn('Render not defined for %s'%self)
Example #17
Source File: shmem_vec_env.py From Reinforcement_Learning_for_Traffic_Light_Control with Apache License 2.0 | 5 votes |
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])
Example #18
Source File: tf_util.py From Reinforcement_Learning_for_Traffic_Light_Control with Apache License 2.0 | 5 votes |
def save_state(fname, sess=None): from 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) # The methods above and below are clearly doing the same thing, and in a rather similar way # TODO: ensure there is no subtle differences and remove one
Example #19
Source File: tf_util.py From Reinforcement_Learning_for_Traffic_Light_Control with Apache License 2.0 | 5 votes |
def load_state(fname, sess=None): from 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)
Example #20
Source File: tf_util.py From Reinforcement_Learning_for_Traffic_Light_Control with Apache License 2.0 | 5 votes |
def save_state(fname, sess=None): from 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) # The methods above and below are clearly doing the same thing, and in a rather similar way # TODO: ensure there is no subtle differences and remove one
Example #21
Source File: tf_util.py From Reinforcement_Learning_for_Traffic_Light_Control with Apache License 2.0 | 5 votes |
def load_state(fname, sess=None): from 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)
Example #22
Source File: shmem_vec_env.py From Reinforcement_Learning_for_Traffic_Light_Control with Apache License 2.0 | 5 votes |
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])
Example #23
Source File: tf_util.py From Reinforcement_Learning_for_Traffic_Light_Control with Apache License 2.0 | 5 votes |
def save_state(fname, sess=None): from 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) # The methods above and below are clearly doing the same thing, and in a rather similar way # TODO: ensure there is no subtle differences and remove one
Example #24
Source File: tf_util.py From Reinforcement_Learning_for_Traffic_Light_Control with Apache License 2.0 | 5 votes |
def load_state(fname, sess=None): from 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)
Example #25
Source File: shmem_vec_env.py From HardRLWithYoutube with MIT License | 5 votes |
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])
Example #26
Source File: __init__.py From HardRLWithYoutube with MIT License | 5 votes |
def render(self, mode='human'): logger.warn('Render not defined for %s' % self)
Example #27
Source File: config.py From baselines with MIT License | 4 votes |
def prepare_params(kwargs): # DDPG params ddpg_params = dict() env_name = kwargs['env_name'] def make_env(subrank=None): env = gym.make(env_name) if subrank is not None and logger.get_dir() is not None: try: from mpi4py import MPI mpi_rank = MPI.COMM_WORLD.Get_rank() except ImportError: MPI = None mpi_rank = 0 logger.warn('Running with a single MPI process. This should work, but the results may differ from the ones publshed in Plappert et al.') max_episode_steps = env._max_episode_steps env = Monitor(env, os.path.join(logger.get_dir(), str(mpi_rank) + '.' + str(subrank)), allow_early_resets=True) # hack to re-expose _max_episode_steps (ideally should replace reliance on it downstream) env = gym.wrappers.TimeLimit(env, max_episode_steps=max_episode_steps) return env kwargs['make_env'] = make_env tmp_env = cached_make_env(kwargs['make_env']) assert hasattr(tmp_env, '_max_episode_steps') kwargs['T'] = tmp_env._max_episode_steps kwargs['max_u'] = np.array(kwargs['max_u']) if isinstance(kwargs['max_u'], list) else kwargs['max_u'] kwargs['gamma'] = 1. - 1. / kwargs['T'] if 'lr' in kwargs: kwargs['pi_lr'] = kwargs['lr'] kwargs['Q_lr'] = kwargs['lr'] del kwargs['lr'] for name in ['buffer_size', 'hidden', 'layers', 'network_class', 'polyak', 'batch_size', 'Q_lr', 'pi_lr', 'norm_eps', 'norm_clip', 'max_u', 'action_l2', 'clip_obs', 'scope', 'relative_goals']: ddpg_params[name] = kwargs[name] kwargs['_' + name] = kwargs[name] del kwargs[name] kwargs['ddpg_params'] = ddpg_params return kwargs