#2869 - Committing minor changes to base AbstractAgent class before changing branches

This commit is contained in:
Charlie Crane
2024-12-12 11:32:59 +00:00
parent fe65cef9aa
commit 86ad872cba

View File

@@ -96,8 +96,8 @@ class AbstractAgent(BaseModel, ABC, identifier="Abstract_Agent"):
"""Base class for scripted and RL agents."""
_registry: ClassVar[Dict[str, Type[AbstractAgent]]] = {}
config: "AbstractAgent.ConfigSchema"
agent_name = "Abstract_Agent"
class ConfigSchema(BaseModel):
"""
@@ -130,6 +130,11 @@ class AbstractAgent(BaseModel, ABC, identifier="Abstract_Agent"):
raise ValueError(f"Cannot create a new agent under reserved name {identifier}")
cls._registry[identifier] = cls
@property
def logger(self) -> AgentLog:
"""Return the AgentLog."""
return self.config.logger
@property
def observation_manager(self) -> ObservationManager:
"""Returns the agents observation manager."""