Skip to content

Commit

Permalink
fix mypy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
JXZhou authored and JXZhou committed Jan 17, 2025
1 parent a67166e commit 02ea368
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def __init__(
node_name: str,
model_name: str,
goal: str,
agent_name: str | None = None,
agent_name: str = "",
background: dict[str, Any] | None = None,
agent_pk: str | None = None,
redis_url: str = "redis://localhost:6379/0",
Expand All @@ -57,7 +57,7 @@ def __init__(
self.goal: str = goal
self.model_name: str = model_name
self.agent_profile_pk: str | None = agent_pk
self.name: str | None = agent_name
self.name: str = agent_name
self.background: dict[str, Any] | None = background
self.awake: bool = False

Expand Down
2 changes: 1 addition & 1 deletion sotopia/experimental/agents/evaluators.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ async def aact(self, content: Observation) -> AgentAction:
),
)

async def aevaluate(self, episode: EpisodeLog) -> dict[str, Any]:
async def aevaluate(self, episode: EpisodeLog) -> Any:
# TODO: below is a temporary implementation, need to replaced by using render_for_humans in EpisodeLog
history = "\n".join(
f"{msg[0][0]} said: {msg[0][2]}" for msg in episode.messages
Expand Down
2 changes: 1 addition & 1 deletion sotopia/experimental/agents/moderator.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def __init__(
evaluator_channels
) > 0, "if evaluate_episode is True, evaluator_channels should not be empty"

self.epilog: EpisodeLog | None = None # will be initialized in booting process
self.epilog: EpisodeLog # will be initialized in booting process

if self.action_order == "round-robin":
pass
Expand Down

0 comments on commit 02ea368

Please sign in to comment.