Skip to content

Commit

Permalink
error
Browse files Browse the repository at this point in the history
  • Loading branch information
matteobettini committed Jan 7, 2025
1 parent 71d46cd commit 441d897
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions benchmarl/models/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,10 @@ class EnsembleModelConfig(ModelConfig):
model_configs_map: Dict[str, ModelConfig]

def get_model(self, agent_group: str, **kwargs) -> Model:
if agent_group not in self.model_configs_map.keys():
raise ValueError(
f"Environment contains agent group '{agent_group}' not present in the EnsembleModelConfig configuration."
)
return self.model_configs_map[agent_group].get_model(
**kwargs, agent_group=agent_group
)
Expand Down

0 comments on commit 441d897

Please sign in to comment.