Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transition everything from gym to gymnasium #30

Open
ll7 opened this issue Jun 3, 2024 · 1 comment
Open

Transition everything from gym to gymnasium #30

ll7 opened this issue Jun 3, 2024 · 1 comment
Labels
enhancement New feature or request p3 3rd most important task category

Comments

@ll7
Copy link
Owner

ll7 commented Jun 3, 2024

Update everything from gym to gymnasium.

Warning extracted

UserWarning: You loaded a model that was trained using OpenAI Gym. We strongly recommend transitioning to Gymnasium by saving that model again.

Full Warning

root@docker-desktop:/workspaces/robot_sf_ll7# python examples/demo_offensive.py 
2024-06-03 12:19:44.635 | INFO     | robot_sf.render.sim_view:__post_init__:86 - Initializing the simulation view.
/opt/venv/lib/python3.10/site-packages/torch/cuda/__init__.py:141: UserWarning: CUDA initialization: Unexpected error from cudaGetDeviceCount(). Did you run some cuda functions before calling NumCudaDevices() that might have already set an error? Error 500: named symbol not found (Triggered internally at ../c10/cuda/CUDAFunctions.cpp:108.)
  return torch._C._cuda_getDeviceCount() > 0
/opt/venv/lib/python3.10/site-packages/stable_baselines3/common/vec_env/patch_gym.py:95: UserWarning: You loaded a model that was trained using OpenAI Gym. We strongly recommend transitioning to Gymnasium by saving that model again.
  warnings.warn(
/opt/venv/lib/python3.10/site-packages/stable_baselines3/common/base_class.py:748: UserWarning: You are probably loading a model saved with SB3 < 1.7.0, we deactivated exact_match so you can save the model again to avoid issues in the future (see https://github.com/DLR-RM/stable-baselines3/issues/1233 for more info). Original error: Error(s) in loading state_dict for MultiInputActorCriticPolicy:
        Missing key(s) in state_dict: "pi_features_extractor.ray_extractor.0.weight", "pi_features_extractor.ray_extractor.0.bias", "pi_features_extractor.ray_extractor.3.weight", "pi_features_extractor.ray_extractor.3.bias", "pi_features_extractor.ray_extractor.6.weight", "pi_features_extractor.ray_extractor.6.bias", "pi_features_extractor.ray_extractor.9.weight", "pi_features_extractor.ray_extractor.9.bias", "vf_features_extractor.ray_extractor.0.weight", "vf_features_extractor.ray_extractor.0.bias", "vf_features_extractor.ray_extractor.3.weight", "vf_features_extractor.ray_extractor.3.bias", "vf_features_extractor.ray_extractor.6.weight", "vf_features_extractor.ray_extractor.6.bias", "vf_features_extractor.ray_extractor.9.weight", "vf_features_extractor.ray_extractor.9.bias".  
Note: the model should still work fine, this only a warning.
  warnings.warn(
  
@ll7
Copy link
Owner Author

ll7 commented Jun 26, 2024

Robot_env is already updated to gymnasium according to:

from gymnasium import Env
from gymnasium.utils import seeding

However, the old trainings models are not trained with this new interface:
https://github.com/ll7/robot_sf_ll7/blob/5aae237c2bc3d6eb7268eccaa29f7afe84d04159/examples/demo_defensive.py

uses
https://github.com/ll7/robot_sf_ll7/blob/2116eb08e1620e6a6e136c7c62e42babd2e86c56/model/run_023.zip

Which is likely trained with gym and not with `gymnasium.

@ll7 ll7 added enhancement New feature or request p3 3rd most important task category labels Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request p3 3rd most important task category
Projects
None yet
Development

No branches or pull requests

1 participant