burtenshaw HF Staff commited on
Commit
73071e0
·
verified ·
1 Parent(s): 5536759

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. models.py +4 -5
models.py CHANGED
@@ -12,15 +12,15 @@ The textarena environment is a simple test environment that echoes back messages
12
 
13
  from __future__ import annotations
14
 
15
- from pydantic import Field
16
  from typing import Any, Dict, List, Optional
17
 
18
- from pydantic import BaseModel, Field
19
 
20
  from openenv.core.env_server.types import Action, Observation, State
21
 
22
 
23
- class TextArenaMessage:
24
  """Single message observed by a player."""
25
 
26
  sender_id: int
@@ -43,7 +43,7 @@ class TextArenaObservation(Observation):
43
  legal_players: List[int] = Field(default_factory=list)
44
  info: Dict[str, Any] = Field(default_factory=dict)
45
 
46
-
47
  class TextArenaState(State):
48
  """Structured state snapshot for the server."""
49
 
@@ -54,4 +54,3 @@ class TextArenaState(State):
54
  last_reward: float = 0.0
55
  last_info: Dict[str, Any] = Field(default_factory=dict)
56
  raw_state: Dict[str, Any] = Field(default_factory=dict)
57
-
 
12
 
13
  from __future__ import annotations
14
 
15
+ from pydantic import BaseModel, Field
16
  from typing import Any, Dict, List, Optional
17
 
18
+
19
 
20
  from openenv.core.env_server.types import Action, Observation, State
21
 
22
 
23
+ class TextArenaMessage(BaseModel):
24
  """Single message observed by a player."""
25
 
26
  sender_id: int
 
43
  legal_players: List[int] = Field(default_factory=list)
44
  info: Dict[str, Any] = Field(default_factory=dict)
45
 
46
+
47
  class TextArenaState(State):
48
  """Structured state snapshot for the server."""
49
 
 
54
  last_reward: float = 0.0
55
  last_info: Dict[str, Any] = Field(default_factory=dict)
56
  raw_state: Dict[str, Any] = Field(default_factory=dict)