#2869 - Committing minor changes to base AbstractAgent class before changing branches
This commit is contained in:
@@ -96,8 +96,8 @@ class AbstractAgent(BaseModel, ABC, identifier="Abstract_Agent"):
|
|||||||
"""Base class for scripted and RL agents."""
|
"""Base class for scripted and RL agents."""
|
||||||
|
|
||||||
_registry: ClassVar[Dict[str, Type[AbstractAgent]]] = {}
|
_registry: ClassVar[Dict[str, Type[AbstractAgent]]] = {}
|
||||||
|
|
||||||
config: "AbstractAgent.ConfigSchema"
|
config: "AbstractAgent.ConfigSchema"
|
||||||
agent_name = "Abstract_Agent"
|
|
||||||
|
|
||||||
class ConfigSchema(BaseModel):
|
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}")
|
raise ValueError(f"Cannot create a new agent under reserved name {identifier}")
|
||||||
cls._registry[identifier] = cls
|
cls._registry[identifier] = cls
|
||||||
|
|
||||||
|
@property
|
||||||
|
def logger(self) -> AgentLog:
|
||||||
|
"""Return the AgentLog."""
|
||||||
|
return self.config.logger
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def observation_manager(self) -> ObservationManager:
|
def observation_manager(self) -> ObservationManager:
|
||||||
"""Returns the agents observation manager."""
|
"""Returns the agents observation manager."""
|
||||||
|
|||||||
Reference in New Issue
Block a user