berkeleyflow / flow

MIT License
14 stars 4 forks source link

First run is verbose #12

Open cathywu opened 6 years ago

cathywu commented 6 years ago

The first run of an experiment after installation is extremely verbose, which may be a poor first experience. How much of this can we remove? How much should we keep but with an optional verbosity parameter?

Here is an example of the output from Flow in just the first iteration of training:

$ python examples/rllib/stabilizing_the_ring.py
/Users/cathywu/anaconda/envs/flow-devel/lib/python3.6/site-packages/h5py/__init__.py:34: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
Process STDOUT and STDERR is being redirected to /tmp/raylogs/.
Waiting for redis server at 127.0.0.1:11533 to respond...
Waiting for redis server at 127.0.0.1:27301 to respond...
Starting local scheduler with the following resources: {'CPU': 3, 'GPU': 0}.

======================================================================
View the web UI at http://localhost:8909/notebooks/ray_ui57709.ipynb?token=a6c28d1a7b470ed432e0547ef833b046d1b6db64cdef6341
======================================================================

== Status ==
Using FIFO scheduling algorithm.
Result logdir: /Users/cathywu/ray_results/stabilizing_the_ring
PENDING trials:
 - PPO_WaveAttenuationPOEnv-v0_0:   PENDING
 - PPO_WaveAttenuationPOEnv-v0_1:   PENDING
 - PPO_WaveAttenuationPOEnv-v0_2:   PENDING

Created LogSyncer for /Users/cathywu/ray_results/stabilizing_the_ring/PPO_WaveAttenuationPOEnv-v0_0_2018-08-09_17-29-35e2x21w61 ->
== Status ==
Using FIFO scheduling algorithm.
Resources requested: 3/3 CPUs, 0/0 GPUs
Result logdir: /Users/cathywu/ray_results/stabilizing_the_ring
PENDING trials:
 - PPO_WaveAttenuationPOEnv-v0_1:   PENDING
 - PPO_WaveAttenuationPOEnv-v0_2:   PENDING
RUNNING trials:
 - PPO_WaveAttenuationPOEnv-v0_0:   RUNNING

/Users/cathywu/anaconda/envs/flow-devel/lib/python3.6/site-packages/h5py/__init__.py:34: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
Loading configuration... done.
Success.
Loading configuration... done.
Loading configuration... done.
Success.

-----------------------
ring length: 257
v_max: 4.997304682316517
-----------------------
Loading configuration... done.
/Users/cathywu/anaconda/envs/flow-devel/lib/python3.6/site-packages/numpy/core/fromnumeric.py:2920: RuntimeWarning: Mean of empty slice.
  out=out, **kwargs)
/Users/cathywu/anaconda/envs/flow-devel/lib/python3.6/site-packages/numpy/core/_methods.py:85: RuntimeWarning: invalid value encountered in double_scalars
  ret = ret.dtype.type(ret / rcount)
LocalMultiGPUOptimizer devices ['/cpu:0']
LocalMultiGPUOptimizer batch size 9000
/Users/cathywu/anaconda/envs/flow-devel/lib/python3.6/site-packages/h5py/__init__.py:34: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
/Users/cathywu/anaconda/envs/flow-devel/lib/python3.6/site-packages/h5py/__init__.py:34: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
Loading configuration... done.
Success.
Loading configuration... done.
Success.
Loading configuration... done.
Loading configuration... done.
Success.

-----------------------
ring length: 222
v_max: 3.3329270738617227
-----------------------
Loading configuration... done.
Loading configuration... done.
/Users/cathywu/anaconda/envs/flow-devel/lib/python3.6/site-packages/numpy/core/fromnumeric.py:2920: RuntimeWarning: Mean of empty slice.
  out=out, **kwargs)
/Users/cathywu/anaconda/envs/flow-devel/lib/python3.6/site-packages/numpy/core/_methods.py:85: RuntimeWarning: invalid value encountered in double_scalars
  ret = ret.dtype.type(ret / rcount)
Loading configuration... done.
Success.

-----------------------
ring length: 234
v_max: 3.903915223349057
-----------------------
Loading configuration... done.
/Users/cathywu/anaconda/envs/flow-devel/lib/python3.6/site-packages/numpy/core/fromnumeric.py:2920: RuntimeWarning: Mean of empty slice.
  out=out, **kwargs)
/Users/cathywu/anaconda/envs/flow-devel/lib/python3.6/site-packages/numpy/core/_methods.py:85: RuntimeWarning: invalid value encountered in double_scalars
  ret = ret.dtype.type(ret / rcount)
WARNING: Serializing objects of type <class 'ray.rllib.evaluation.sample_batch.SampleBatch'> by expanding them as dictionaries of their fields. This behavior may be incorrect in some cases.
WARNING:ray:WARNING: Serializing objects of type <class 'ray.rllib.evaluation.sample_batch.SampleBatch'> by expanding them as dictionaries of their fields. This behavior may be incorrect in some cases.
Loading configuration... done.
Success.

-----------------------
ring length: 250
v_max: 4.664717904914125
-----------------------
Loading configuration... done.
/Users/cathywu/anaconda/envs/flow-devel/lib/python3.6/site-packages/numpy/core/fromnumeric.py:2920: RuntimeWarning: Mean of empty slice.
  out=out, **kwargs)
/Users/cathywu/anaconda/envs/flow-devel/lib/python3.6/site-packages/numpy/core/_methods.py:85: RuntimeWarning: invalid value encountered in double_scalars
  ret = ret.dtype.type(ret / rcount)
WARNING: Serializing objects of type <class 'ray.rllib.evaluation.sample_batch.SampleBatch'> by expanding them as dictionaries of their fields. This behavior may be incorrect in some cases.
WARNING:ray:WARNING: Serializing objects of type <class 'ray.rllib.evaluation.sample_batch.SampleBatch'> by expanding them as dictionaries of their fields. This behavior may be incorrect in some cases.
Loading configuration... done.
Success.

-----------------------
ring length: 220
v_max: 3.2377399006821497
-----------------------
Loading configuration... done.
/Users/cathywu/anaconda/envs/flow-devel/lib/python3.6/site-packages/numpy/core/fromnumeric.py:2920: RuntimeWarning: Mean of empty slice.
  out=out, **kwargs)
/Users/cathywu/anaconda/envs/flow-devel/lib/python3.6/site-packages/numpy/core/_methods.py:85: RuntimeWarning: invalid value encountered in double_scalars
  ret = ret.dtype.type(ret / rcount)
Loading configuration... done.
Success.

-----------------------
ring length: 231
v_max: 3.761192925277308
-----------------------
Loading configuration... done.
/Users/cathywu/anaconda/envs/flow-devel/lib/python3.6/site-packages/numpy/core/fromnumeric.py:2920: RuntimeWarning: Mean of empty slice.
  out=out, **kwargs)
/Users/cathywu/anaconda/envs/flow-devel/lib/python3.6/site-packages/numpy/core/_methods.py:85: RuntimeWarning: invalid value encountered in double_scalars
  ret = ret.dtype.type(ret / rcount)
WARNING: Serializing objects of type <class 'ray.rllib.utils.filter.MeanStdFilter'> by expanding them as dictionaries of their fields. This behavior may be incorrect in some cases.
WARNING:ray:WARNING: Serializing objects of type <class 'ray.rllib.utils.filter.MeanStdFilter'> by expanding them as dictionaries of their fields. This behavior may be incorrect in some cases.
WARNING: Serializing objects of type <class 'ray.rllib.utils.filter.RunningStat'> by expanding them as dictionaries of their fields. This behavior may be incorrect in some cases.
WARNING:ray:WARNING: Serializing objects of type <class 'ray.rllib.utils.filter.RunningStat'> by expanding them as dictionaries of their fields. This behavior may be incorrect in some cases.
WARNING: Serializing objects of type <class 'ray.rllib.evaluation.sampler.RolloutMetrics'> by expanding them as dictionaries of their fields. This behavior may be incorrect in some cases.
WARNING:ray:WARNING: Serializing objects of type <class 'ray.rllib.evaluation.sampler.RolloutMetrics'> by expanding them as dictionaries of their fields. This behavior may be incorrect in some cases.
WARNING: Serializing objects of type <class 'ray.rllib.evaluation.sampler.RolloutMetrics'> by expanding them as dictionaries of their fields. This behavior may be incorrect in some cases.
WARNING:ray:WARNING: Serializing objects of type <class 'ray.rllib.evaluation.sampler.RolloutMetrics'> by expanding them as dictionaries of their fields. This behavior may be incorrect in some cases.
WARNING: Serializing objects of type <class 'ray.tune.result.TrainingResult'> by expanding them as dictionaries of their fields. This behavior may be incorrect in some cases.
WARNING:ray:WARNING: Serializing objects of type <class 'ray.tune.result.TrainingResult'> by expanding them as dictionaries of their fields. This behavior may be incorrect in some cases.
TrainingResult for PPO_WaveAttenuationPOEnv-v0_0:
  date: 2018-08-09_17-33-17
  episode_len_mean: 3000.0
  episode_reward_max: -17911.699635278375
  episode_reward_mean: -18316.872243366433
  episode_reward_min: -18690.50102762517
  episodes_total: 5
  experiment_id: cebb2735c6f24fd48befcfff4731db00
  hostname: airbears2-10-142-35-94.airbears2.1918.berkeley.edu
  info:
    entropy: 1.4165645837783813
    kl_coefficient: 0.1
    kl_divergence: 7.073849246808095e-06
    policy_loss: -0.00039884651778265834
    total_loss: 762.1253662109375
    vf_loss: 38106.296875
  node_ip: 10.142.35.94
  pid: 53454
  policy_reward_mean:
    default: -18316.872243366433
  time_this_iter_s: 170.19698882102966
  time_total_s: 170.19698882102966
  timestamp: 1533861197
  timesteps_this_iter: 15000
  timesteps_total: 15000
  training_iteration: 1

== Status ==
Using FIFO scheduling algorithm.
Resources requested: 3/3 CPUs, 0/0 GPUs
Result logdir: /Users/cathywu/ray_results/stabilizing_the_ring
PENDING trials:
 - PPO_WaveAttenuationPOEnv-v0_1:   PENDING
 - PPO_WaveAttenuationPOEnv-v0_2:   PENDING
RUNNING trials:
 - PPO_WaveAttenuationPOEnv-v0_0:   RUNNING [pid=53454], 170 s, 15000 ts, -1.83e+04 rew
Loading configuration... done.
Loading configuration... done.
Success.

-----------------------
ring length: 247
v_max: 4.522125250095652
-----------------------
Success.
eugenevinitsky commented 6 years ago

Rllib team is working on this

cathywu commented 6 years ago

I updated the above message to reflect a running version of Flow using ray==0.5.0 (without the error messages).

eugenevinitsky commented 6 years ago

This looks better but I suppose it could still be less verbose? Worth figuring out on whose end the MeanOfEmptySlice thing is happening