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
I tried running MARL with multiple SAC as internal policies for each agent for one of my custom-made petting zoo environments. After rigorous debugging, I realized that the MultiAgentPolicyManager in version 0.5.1 needs a train(self, mode: bool = True) method that iteratively sets all the internal policies to mode. Otherwise, the internal policies are never called in eval mode. I am not sure if this is also true when used with other types of internal policies.
The following function solves the issue if added to tianshou/policy/multiagent/mapolicy.py :
deftrain(self, mode: bool=True):
"""Sets each internal policy in training mode."""foragent_id, policyinself.policies.items():
policy.train(mode)
returnself
I can do a pull-request to the main branch, if needed.
The text was updated successfully, but these errors were encountered:
I tried running MARL with multiple SAC as internal policies for each agent for one of my custom-made petting zoo environments. After rigorous debugging, I realized that the MultiAgentPolicyManager in version 0.5.1 needs a train(self, mode: bool = True) method that iteratively sets all the internal policies to mode. Otherwise, the internal policies are never called in eval mode. I am not sure if this is also true when used with other types of internal policies.
The following function solves the issue if added to tianshou/policy/multiagent/mapolicy.py :
I can do a pull-request to the main branch, if needed.
The text was updated successfully, but these errors were encountered: