rail-berkeley / rlkit

Collection of reinforcement learning algorithms
MIT License
2.45k stars 550 forks source link

'ConvVAE' object has no attribute '__name__' #83

Closed hieubkset closed 4 years ago

hieubkset commented 4 years ago

I am trying to run examples/skewfit/sawyer_push.py but it's fatal with the following error.

Traceback (most recent call last):
  File "/home/hsbk/sawyer_code/rlkit/examples/skewfit/sawyer_push.py", line 158, in <module>
    num_gpu=1,
  File "/home/hsbk/sawyer_code/rlkit/rlkit/launchers/launcher_util.py", line 585, in run_experiment
    **run_experiment_kwargs
  File "/home/hsbk/sawyer_code/rlkit/rlkit/launchers/launcher_util.py", line 141, in run_experiment_here
    **setup_logger_kwargs
  File "/home/hsbk/sawyer_code/rlkit/rlkit/launchers/launcher_util.py", line 260, in setup_logger
    logger.log_variant(variant_log_path, variant)
  File "/home/hsbk/sawyer_code/rlkit/rlkit/core/logging.py", line 232, in log_variant
    json.dump(variant_data, f, indent=2, sort_keys=True, cls=MyEncoder)
  File "/home/hsbk/miniconda3/envs/rlkit/lib/python3.6/json/__init__.py", line 179, in dump
    for chunk in iterable:
  File "/home/hsbk/miniconda3/envs/rlkit/lib/python3.6/json/encoder.py", line 430, in _iterencode
    yield from _iterencode_dict(o, _current_indent_level)
  File "/home/hsbk/miniconda3/envs/rlkit/lib/python3.6/json/encoder.py", line 404, in _iterencode_dict
    yield from chunks
  File "/home/hsbk/miniconda3/envs/rlkit/lib/python3.6/json/encoder.py", line 404, in _iterencode_dict
    yield from chunks
  File "/home/hsbk/miniconda3/envs/rlkit/lib/python3.6/json/encoder.py", line 437, in _iterencode
    o = _default(o)
  File "/home/hsbk/sawyer_code/rlkit/rlkit/core/logging.py", line 55, in default
    '$function': o.__module__ + "." + o.__name__
  File "/home/hsbk/miniconda3/envs/rlkit/lib/python3.6/site-packages/torch/nn/modules/module.py", line 518, in __getattr__
    type(self).__name__, name))
AttributeError: 'ConvVAE' object has no attribute '__name__'

I am using the following dependencies

Package         Version     Location                         
boto3           1.9.246     
botocore        1.12.246    
certifi         2019.9.11   
cffi            1.12.3      
cloudpickle     1.2.2       
cycler          0.10.0      
Cython          0.29.13     
docutils        0.15.2      
future          0.18.0      
glfw            1.8.3       
gtimer          1.0.0b5     
gym             0.15.3      
imageio         2.6.1       
jmespath        0.9.4       
joblib          0.9.4       
lockfile        0.12.2      
Mako            1.0.6       
MarkupSafe      1.1.1       
matplotlib      2.0.2       
mkl-fft         1.0.14      
mkl-random      1.1.0       
mkl-service     2.3.0       
mujoco-py       1.50.1.68   
multiworld      0.0.0       /home/hsbk/sawyer_code/multiworld
numpy           1.17.2      
olefile         0.46        
opencv-python   4.1.1.26    
Pillow          6.2.0       
pip             19.2.3      
pycparser       2.19        
pygame          1.9.6       
pyglet          1.3.2       
pyparsing       2.4.2       
python-dateutil 2.8.0       
pytz            2019.3      
rlkit           0.2.1.dev0  /home/hsbk/sawyer_code/rlkit     
s3transfer      0.2.1       
scikit-video    1.1.11      
scipy           1.3.1       
setuptools      41.4.0      
six             1.12.0      
torch           0.4.1.post2 
torchvision     0.2.1       
urllib3         1.25.6      
wheel           0.33.6  

Could you guide me to fix it?

homangab commented 4 years ago

I am getting the same error and was just about to open an issue.

kaixindelele commented 4 years ago

I am getting the same error and was just about to open an issue.

kaixindelele commented 4 years ago

I am getting the same error and was just about to open an issue.

did you fix it?