leggedrobotics / raisimGym

Other
140 stars 45 forks source link

TypeError: savez() argument after ** must be a mapping, not list #19

Closed yonchien closed 5 years ago

yonchien commented 5 years ago

I tried the example anymal and laikago but only runner a while . then error TypeError: savez() argument after ** must be a mapping, not list .
2019-10-23 14-36-50屏幕截图 I am using Ubuntu 16.04, g++ 8, gcc8, with python3.5 ,

jhwangbo commented 5 years ago

please copy-paste it so it is searchable

yonchien commented 5 years ago

Using /usr/local/lib/python3.5/dist-packages Finished processing dependencies for raisim-gym==0.5.0 /usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint8 = np.dtype([("qint8", np.int8, 1)]) /usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint8 = np.dtype([("quint8", np.uint8, 1)]) /usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint16 = np.dtype([("qint16", np.int16, 1)]) /usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint16 = np.dtype([("quint16", np.uint16, 1)]) /usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint32 = np.dtype([("qint32", np.int32, 1)]) /usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. np_resource = np.dtype([("resource", np.ubyte, 1)]) /usr/local/lib/python3.5/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint8 = np.dtype([("qint8", np.int8, 1)]) /usr/local/lib/python3.5/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint8 = np.dtype([("quint8", np.uint8, 1)]) /usr/local/lib/python3.5/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint16 = np.dtype([("qint16", np.int16, 1)]) /usr/local/lib/python3.5/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint16 = np.dtype([("quint16", np.uint16, 1)]) /usr/local/lib/python3.5/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint32 = np.dtype([("qint32", np.int32, 1)]) /usr/local/lib/python3.5/dist-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. np_resource = np.dtype([("resource", np.ubyte, 1)]) [2019:10:23:14:47:20 OgreVis.hpp:303] Loading RaisimOgre Resource from: /raisim_build/share/raisimOgre/cmake/../rsc [2019:10:23:14:47:20 OgreVis.hpp:304] Loading Ogre Configuration from: /raisim_build/share/raisimOgre/cmake/../ogre/ WARNING:tensorflow:From /usr/local/lib/python3.5/dist-packages/stable_baselines-2.8.0-py3.5.egg/stable_baselines/common/tf_util.py:57: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.

WARNING:tensorflow:From /usr/local/lib/python3.5/dist-packages/stable_baselines-2.8.0-py3.5.egg/stable_baselines/common/tf_util.py:66: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.

WARNING:tensorflow:From /usr/local/lib/python3.5/dist-packages/raisim_gym-0.5.0-py3.5-linux-x86_64.egg/raisim_gym/archi/policies.py:112: The name tf.variable_scope is deprecated. Please use tf.compat.v1.variable_scope instead.

WARNING:tensorflow:From /usr/local/lib/python3.5/dist-packages/stable_baselines-2.8.0-py3.5.egg/stable_baselines/common/input.py:25: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.

WARNING:tensorflow:From /usr/local/lib/python3.5/dist-packages/raisim_gym-0.5.0-py3.5-linux-x86_64.egg/raisim_gym/archi/policies.py:436: flatten (from tensorflow.python.layers.core) is deprecated and will be removed in a future version. Instructions for updating: Use keras.layers.flatten instead. WARNING:tensorflow:From /usr/local/lib/python3.5/dist-packages/stable_baselines-2.8.0-py3.5.egg/stable_baselines/a2c/utils.py:156: The name tf.get_variable is deprecated. Please use tf.compat.v1.get_variable instead.

WARNING:tensorflow:From /usr/local/lib/python3.5/dist-packages/raisim_gym-0.5.0-py3.5-linux-x86_64.egg/raisim_gym/algo/ppo2/ppo2.py:161: The name tf.summary.scalar is deprecated. Please use tf.compat.v1.summary.scalar instead.

WARNING:tensorflow:From /usr/local/lib/python3.5/dist-packages/tensorflow/python/ops/math_grad.py:1250: add_dispatch_support..wrapper (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version. Instructions for updating: Use tf.where in 2.0, which has the same broadcast rule as np.where WARNING:tensorflow:From /usr/local/lib/python3.5/dist-packages/raisim_gym-0.5.0-py3.5-linux-x86_64.egg/raisim_gym/algo/ppo2/ppo2.py:177: The name tf.train.AdamOptimizer is deprecated. Please use tf.compat.v1.train.AdamOptimizer instead.

WARNING:tensorflow:From /usr/local/lib/python3.5/dist-packages/raisim_gym-0.5.0-py3.5-linux-x86_64.egg/raisim_gym/algo/ppo2/ppo2.py:210: The name tf.summary.merge_all is deprecated. Please use tf.compat.v1.summary.merge_all instead.

[RAISIM_GYM] Tensorboard session created: WARNING:tensorflow:From /usr/local/lib/python3.5/dist-packages/stable_baselines-2.8.0-py3.5.egg/stable_baselines/common/base_class.py:1035: The name tf.summary.FileWriter is deprecated. Please use tf.compat.v1.summary.FileWriter instead.

Running Firefox as root in a regular user's session is not supported. ($HOME is /home/unitree which is owned by unitree.) [RAISIM_GYM] Visualizing in RaiSimOgre Running Firefox as root in a regular user's session is not supported. ($HOME is /home/unitree which is owned by unitree.) Running Firefox as root in a regular user's session is not supported. ($HOME is /home/unitree which is owned by unitree.) /usr/bin/xdg-open: 778: /usr/bin/xdg-open: iceweasel: not found /usr/bin/xdg-open: 778: /usr/bin/xdg-open: seamonkey: not found /usr/bin/xdg-open: 778: /usr/bin/xdg-open: mozilla: not found /usr/bin/xdg-open: 778: /usr/bin/xdg-open: epiphany: not found /usr/bin/xdg-open: 778: /usr/bin/xdg-open: konqueror: not found /usr/bin/xdg-open: 778: /usr/bin/xdg-open: chromium-browser: not found /usr/bin/xdg-open: 778: /usr/bin/xdg-open: google-chrome: not found /usr/bin/xdg-open: 778: /usr/bin/xdg-open: www-browser: not found /usr/bin/xdg-open: 778: /usr/bin/xdg-open: links2: not found /usr/bin/xdg-open: 778: /usr/bin/xdg-open: elinks: not found /usr/bin/xdg-open: 778: /usr/bin/xdg-open: links: not found /usr/bin/xdg-open: 778: /usr/bin/xdg-open: lynx: not found /usr/bin/xdg-open: 778: /usr/bin/xdg-open: w3m: not found xdg-open: no method available for opening ffmpeg version 4.1.3-0york1~16.04 Copyright (c) 2000-2019 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.11) 20160609 configuration: --prefix=/usr --extra-version='0york1~16.04' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-nonfree --enable-libfdk-aac --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared libavutil 56. 22.100 / 56. 22.100 libavcodec 58. 35.100 / 58. 35.100 libavformat 58. 20.100 / 58. 20.100 libavdevice 58. 5.100 / 58. 5.100 libavfilter 7. 40.101 / 7. 40.101 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 3.100 / 5. 3.100 libswresample 3. 3.100 / 3. 3.100 libpostproc 55. 3.100 / 55. 3.100 Input #0, rawvideo, from 'pipe:': Duration: N/A, start: 0.000000, bitrate: 2220480 kb/s Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 1800x1028, 2220480 kb/s, 50 tbr, 50 tbn, 50 tbc Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264)) [swscaler @ 0x559017ef6500] Warning: data is not aligned! This can lead to a speed loss [libx264 @ 0x559017ea6cc0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 [libx264 @ 0x559017ea6cc0] profile High 4:4:4 Predictive, level 4.2, 4:4:4 8-bit [libx264 @ 0x559017ea6cc0] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=2 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=6 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=4 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=30 rc=crf mbtree=1 crf=21.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 Output #0, mp4, to '/raisim_workspace/raisimGym/scripts/..//data/Laikago_blind_locomotion/2019-10-23-14-47-20/0.mp4': Metadata: encoder : Lavf58.20.100 Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv444p, 1800x1028, q=-1--1, 50 fps, 12800 tbn, 50 tbc Metadata: encoder : Lavc58.35.100 libx264 Side data: cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1 Average rewards in this test episode -38.09459656756371.76 bitrate= 760.0kbits/s speed=0.676x
Traceback (most recent call last): File "scripts/laikago_blind_locomotion.py", line 52, in model.learn(total_timesteps=400000000, eval_every_n=50, log_dir=saver.data_dir, record_video=cfg['record_video']) File "/usr/local/lib/python3.5/dist-packages/raisim_gym-0.5.0-py3.5-linux-x86_64.egg/raisim_gym/algo/ppo2/ppo2.py", line 302, in learn self.save(model_name) File "/usr/local/lib/python3.5/dist-packages/raisim_gym-0.5.0-py3.5-linux-x86_64.egg/raisim_gym/algo/ppo2/ppo2.py", line 414, in save self._save_to_file(save_path, data=data, params=params) File "/usr/local/lib/python3.5/dist-packages/stable_baselines-2.8.0-py3.5.egg/stable_baselines/common/base_class.py", line 532, in _save_to_file BaseRLModel._save_to_file_zip(save_path, data, params) File "/usr/local/lib/python3.5/dist-packages/stable_baselines-2.8.0-py3.5.egg/stable_baselines/common/base_class.py", line 492, in _save_to_file_zip serialized_params = params_to_bytes(params) File "/usr/local/lib/python3.5/dist-packages/stable_baselines-2.8.0-py3.5.egg/stable_baselines/common/save_util.py", line 150, in params_to_bytes np.savez(byte_file, params) TypeError: savez() argument after must be a mapping, not list frame= 199 fps= 45 q=-1.0 Lsize= 651kB time=00:00:03.92 bitrate=1360.4kbits/s speed=0.893x
video:648kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.483567% [libx264 @ 0x559017ea6cc0] frame I:2 Avg QP:13.36 size: 11995 [libx264 @ 0x559017ea6cc0] frame P:52 Avg QP:12.71 size: 5372 [libx264 @ 0x559017ea6cc0] frame B:145 Avg QP:23.57 size: 2478 [libx264 @ 0x559017ea6cc0] consecutive B-frames: 2.0% 2.0% 1.5% 94.5% [libx264 @ 0x559017ea6cc0] mb I I16..4: 94.5% 0.0% 5.5% [libx264 @ 0x559017ea6cc0] mb P I16..4: 8.8% 0.0% 1.2% P16..4: 5.6% 1.7% 0.6% 0.0% 0.0% skip:82.1% [libx264 @ 0x559017ea6cc0] mb B I16..4: 1.7% 0.0% 0.2% B16..8: 8.2% 1.6% 0.2% direct: 0.2% skip:87.9% L0:50.8% L1:46.4% BI: 2.8% [libx264 @ 0x559017ea6cc0] coded y,u,v intra: 6.0% 1.4% 3.1% inter: 0.7% 0.1% 0.2% [libx264 @ 0x559017ea6cc0] i16 v,h,dc,p: 44% 54% 2% 0% [libx264 @ 0x559017ea6cc0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 28% 26% 4% 4% 4% 4% 3% 3% [libx264 @ 0x559017ea6cc0] Weighted P-Frames: Y:0.0% UV:0.0% [libx264 @ 0x559017ea6cc0] ref P L0: 60.0% 40.0% [libx264 @ 0x559017ea6cc0] ref B L0: 80.5% 19.5% [libx264 @ 0x559017ea6cc0] ref B L1: 91.2% 8.8% [libx264 @ 0x559017ea6cc0] kb/s:1332.09

jhwangbo commented 5 years ago

is this on CPU docker?

yonchien commented 5 years ago

no,it is not a docker , I use GPU RTX2060 + CUDA 10.1, raisim is open but runner a while

jhwangbo commented 5 years ago

which file did you run?

yonchien commented 5 years ago

I RUN python3 setup.py install --CMAKE_PREFIX_PATH /raisim_build --env anymal && python3 scripts/anymal_blind_locomotion.py AND firefox is not open, what the firefox used for

jhwangbo commented 5 years ago

did you modify the code? currently, there is no saving in the examples but you have this line

py3.5.egg/stable_baselines/common/save_util.py", line 150, in params_to_bytes np.savez(byte_file, **params)

yonchien commented 5 years ago

I did not modify the code . but I use python3.5, stable-baselines[mpi]==2.8.0

jhwangbo commented 5 years ago

Thank you for reporting. I figured out it does not run with the latest stable-baselines. I'll update asap

jhwangbo commented 5 years ago

changes have been pushed

yonchien commented 5 years ago

what stable-bashlines do you use

jhwangbo commented 5 years ago

2.7 before. Now I made it only work with 2.8 or above