You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem:
Currently, the Policy class directly calls the init methods of its base classes (Model and GaussianMixin) like this:
python
Model.init(self, observation_space, action_space, device)
GaussianMixin.init(self, clip_actions, clip_log_std, min_log_std, max_log_std, reduction)
This approach bypasses Python's cooperative multiple inheritance mechanism (using super()) and can lead to problems—especially if any of the base classes use super() in their own initializers. You might encounter issues such as multiple values for the same argument if the parameters are not managed properly.
Suggestion:
Modify the base classes (Model and GaussianMixin) so that they accept extra keyword arguments (using **kwargs) and call super().init(**kwargs). Then, update the Policy class to use a single super().init() call. This way, each class in the method resolution order (MRO) will only consume the parameters it needs, and the remaining arguments will be passed along properly.
What skrl version are you using?
1.4.1
What ML framework/library version are you using?
pytorch
Additional system information
No response
The text was updated successfully, but these errors were encountered:
Description
Problem:
Currently, the Policy class directly calls the init methods of its base classes (Model and GaussianMixin) like this:
python
Model.init(self, observation_space, action_space, device)
GaussianMixin.init(self, clip_actions, clip_log_std, min_log_std, max_log_std, reduction)
This approach bypasses Python's cooperative multiple inheritance mechanism (using super()) and can lead to problems—especially if any of the base classes use super() in their own initializers. You might encounter issues such as multiple values for the same argument if the parameters are not managed properly.
Suggestion:
Modify the base classes (Model and GaussianMixin) so that they accept extra keyword arguments (using **kwargs) and call super().init(**kwargs). Then, update the Policy class to use a single super().init() call. This way, each class in the method resolution order (MRO) will only consume the parameters it needs, and the remaining arguments will be passed along properly.
What skrl version are you using?
1.4.1
What ML framework/library version are you using?
pytorch
Additional system information
No response
The text was updated successfully, but these errors were encountered: