arrival-ltd / catalyst-rl-tutorial

Using Catalyst.RL to train a robot to perform peg-in-hole insertion in simulation.
MIT License
151 stars 14 forks source link

Package throws errors relating to catalyst_rl and copeliasim #5

Closed omardg1 closed 3 years ago

omardg1 commented 3 years ago

Dear arrival team, Thank you for the great package, i get the following error after trying to install the catalyst-rl-tutorial package on a fresh install of ubuntu 18.04 LTS:

Machine specs are as follows : OS: Ubuntu 18.04 Intel® Core™ i7-9750H CPU @ 2.60GHz × 12 Graphics card : GeForce RTX 2070 with Max-Q Design/PCIe/SSE2 gnome 3.28.2

This was attempted on 2 additional machines and it always throws the same issue as below. package initiates copeliasim however it crashes within seconds and shows the following terminal messages.

Sampler terminal error:

Traceback (most recent call last): File "/home/lws1/Desktop/RL/catalyst-rl-tutorial/catalystenv/lib/python3.6/site-packages/catalyst_rl/utils/tools/registry.py", line 220, in get_instance return f.get_from_params(*args, kwargs) File "/home/lws1/Desktop/RL/catalyst-rl-tutorial/src/actor.py", line 47, in get_from_params state_net = StateNet.get_from_params(im_width, im_height, in_channels, state_net_params) File "/home/lws1/Desktop/RL/catalyst-rl-tutorial/src/network.py", line 149, in get_from_params image_net = _get_convolution_net(in_channels, **image_net_params) File "/home/lws1/Desktop/RL/catalyst-rl-tutorial/src/network.py", line 57, in _get_convolution_net net.apply(utils.initialization.get_optimal_inner_init(activation_fn)) AttributeError: module 'catalyst.utils' has no attribute 'initialization'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/lws1/Desktop/RL/catalyst-rl-tutorial/catalystenv/bin/catalyst-rl", line 8, in sys.exit(main()) File "/home/lws1/Desktop/RL/catalyst-rl-tutorial/catalystenv/lib/python3.6/site-packages/catalyst_rl/rl/main.py", line 44, in main COMMANDS[args.command].main(args, uargs) File "/home/lws1/Desktop/RL/catalyst-rl-tutorial/catalystenv/lib/python3.6/site-packages/catalyst_rl/rl/scripts/run_trainer.py", line 89, in main algorithm = algorithm_fn.prepare_for_trainer(env_spec=env, config=config) File "/home/lws1/Desktop/RL/catalyst-rl-tutorial/catalystenv/lib/python3.6/site-packages/catalyst_rl/rl/offpolicy/algorithms/td3.py", line 442, in prepare_for_trainer env_spec=env_spec, File "/home/lws1/Desktop/RL/catalyst-rl-tutorial/catalystenv/lib/python3.6/site-packages/catalyst_rl/utils/tools/registry.py", line 244, in get_from_params return self.get_instance(name, meta_factory=meta_factory, **kwargs) File "/home/lws1/Desktop/RL/catalyst-rl-tutorial/catalystenv/lib/python3.6/site-packages/catalyst_rl/utils/tools/registry.py", line 225, in get_instance ) from e catalyst_rl.utils.tools.registry.RegistryException: Factory 'UR5Actor' call failed: args=() kwargs={'state_net_params': OrderedDict([('image_net_params', OrderedDict([('history_len', 1), ('channels', [16, 32, 32, 32, 16]), ('use_bias', True), ('use_groups', False), ('use_normalization', True), ('use_dropout', False), ('activation', 'ReLU')])), ('main_net_params', OrderedDict([('features', [256, 256]), ('use_bias', False), ('use_normalization', False), ('use_dropout', False), ('activation', 'ReLU')]))]), 'policy_head_params': OrderedDict([('in_features', 256), ('policy_type', None), ('out_activation', 'Tanh'), ('out_features', 3)]), 'env_spec': <src.env.CoppeliaSimEnvWrapper object at 0x7f4dc7ce80f0>}

Trainer terminal error: Same error as above in addtion to the following error Error: signal 11: /home/lws1/COPPELIASIM/libcoppeliaSim.so.1(_Z11_segHandleri+0x2b)[0x7f5fc8f91a4b] /lib/x86_64-linux-gnu/libc.so.6(+0x3f040)[0x7f60f2118040] /home/lws1/COPPELIASIM/libQt5Core.so.5(_ZN6QMutex4lockEv+0x15)[0x7f5ff937d375] /home/lws1/COPPELIASIM/libQt5Gui.so.5(+0x387b0e)[0x7f5fc3b3ab0e] /home/lws1/COPPELIASIM/libQt5Gui.so.5(+0x37f3cf)[0x7f5fc3b323cf] /home/lws1/COPPELIASIM/libQt5Gui.so.5(_ZN18QRasterPaintEngine11updateBrushERK6QBrush+0x87)[0x7f5fc3b35837] /home/lws1/COPPELIASIM/libQt5Gui.so.5(_ZN18QRasterPaintEngine8fillRectERK6QRectFRK6QBrush+0x2a)[0x7f5fc3b3630a] /home/lws1/COPPELIASIM/libQt5Gui.so.5(_ZN8QPainter8fillRectERK5QRectRK6QBrush+0xc5)[0x7f5fc3b49165] /home/lws1/COPPELIASIM/libQt5Widgets.so.5(_ZNK12QFusionStyle11drawControlEN6QStyle14ControlElementEPK12QStyleOptionP8QPainterPK7QWidget+0x2da7)[0x7f5fc8509207]

omardg1 commented 3 years ago

Dear arrival team, Thank you for the great package, i get the following error after trying to install the catalyst-rl-tutorial package on a fresh install of ubuntu 18.04 LTS:

Machine specs are as follows : OS: Ubuntu 18.04 Intel® Core™ i7-9750H CPU @ 2.60GHz × 12 Graphics card : GeForce RTX 2070 with Max-Q Design/PCIe/SSE2 gnome 3.28.2

This was attempted on 2 additional machines and it always throws the same issue as below. package initiates copeliasim however it crashes within seconds and shows the following terminal messages.

Sampler terminal error:

Traceback (most recent call last): File "/home/lws1/Desktop/RL/catalyst-rl-tutorial/catalystenv/lib/python3.6/site-packages/catalyst_rl/utils/tools/registry.py", line 220, in get_instance return f.get_from_params(*args, kwargs) File "/home/lws1/Desktop/RL/catalyst-rl-tutorial/src/actor.py", line 47, in get_from_params state_net = StateNet.get_from_params(im_width, im_height, in_channels, state_net_params) File "/home/lws1/Desktop/RL/catalyst-rl-tutorial/src/network.py", line 149, in get_from_params image_net = _get_convolution_net(in_channels, **image_net_params) File "/home/lws1/Desktop/RL/catalyst-rl-tutorial/src/network.py", line 57, in _get_convolution_net net.apply(utils.initialization.get_optimal_inner_init(activation_fn)) AttributeError: module 'catalyst.utils' has no attribute 'initialization'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/lws1/Desktop/RL/catalyst-rl-tutorial/catalystenv/bin/catalyst-rl", line 8, in sys.exit(main()) File "/home/lws1/Desktop/RL/catalyst-rl-tutorial/catalystenv/lib/python3.6/site-packages/catalyst_rl/rl/main.py", line 44, in main COMMANDS[args.command].main(args, uargs) File "/home/lws1/Desktop/RL/catalyst-rl-tutorial/catalystenv/lib/python3.6/site-packages/catalyst_rl/rl/scripts/run_trainer.py", line 89, in main algorithm = algorithm_fn.prepare_for_trainer(env_spec=env, config=config) File "/home/lws1/Desktop/RL/catalyst-rl-tutorial/catalystenv/lib/python3.6/site-packages/catalyst_rl/rl/offpolicy/algorithms/td3.py", line 442, in prepare_for_trainer env_spec=env_spec, File "/home/lws1/Desktop/RL/catalyst-rl-tutorial/catalystenv/lib/python3.6/site-packages/catalyst_rl/utils/tools/registry.py", line 244, in get_from_params return self.get_instance(name, meta_factory=meta_factory, **kwargs) File "/home/lws1/Desktop/RL/catalyst-rl-tutorial/catalystenv/lib/python3.6/site-packages/catalyst_rl/utils/tools/registry.py", line 225, in get_instance ) from e catalyst_rl.utils.tools.registry.RegistryException: Factory 'UR5Actor' call failed: args=() kwargs={'state_net_params': OrderedDict([('image_net_params', OrderedDict([('history_len', 1), ('channels', [16, 32, 32, 32, 16]), ('use_bias', True), ('use_groups', False), ('use_normalization', True), ('use_dropout', False), ('activation', 'ReLU')])), ('main_net_params', OrderedDict([('features', [256, 256]), ('use_bias', False), ('use_normalization', False), ('use_dropout', False), ('activation', 'ReLU')]))]), 'policy_head_params': OrderedDict([('in_features', 256), ('policy_type', None), ('out_activation', 'Tanh'), ('out_features', 3)]), 'env_spec': <src.env.CoppeliaSimEnvWrapper object at 0x7f4dc7ce80f0>}

Trainer terminal error: Same error as above in addtion to the following error Error: signal 11: /home/lws1/COPPELIASIM/libcoppeliaSim.so.1(_Z11_segHandleri+0x2b)[0x7f5fc8f91a4b] /lib/x86_64-linux-gnu/libc.so.6(+0x3f040)[0x7f60f2118040] /home/lws1/COPPELIASIM/libQt5Core.so.5(_ZN6QMutex4lockEv+0x15)[0x7f5ff937d375] /home/lws1/COPPELIASIM/libQt5Gui.so.5(+0x387b0e)[0x7f5fc3b3ab0e] /home/lws1/COPPELIASIM/libQt5Gui.so.5(+0x37f3cf)[0x7f5fc3b323cf] /home/lws1/COPPELIASIM/libQt5Gui.so.5(_ZN18QRasterPaintEngine11updateBrushERK6QBrush+0x87)[0x7f5fc3b35837] /home/lws1/COPPELIASIM/libQt5Gui.so.5(_ZN18QRasterPaintEngine8fillRectERK6QRectFRK6QBrush+0x2a)[0x7f5fc3b3630a] /home/lws1/COPPELIASIM/libQt5Gui.so.5(_ZN8QPainter8fillRectERK5QRectRK6QBrush+0xc5)[0x7f5fc3b49165] /home/lws1/COPPELIASIM/libQt5Widgets.so.5(_ZNK12QFusionStyle11drawControlEN6QStyle14ControlElementEPK12QStyleOptionP8QPainterPK7QWidget+0x2da7)[0x7f5fc8509207]

modified the requirements file to install catalyst==20.04 have resolved the issue