Skip to content

Commit 1ff4e49

Browse files
Merge pull request #8 from surfiniaburger/dipg-research
Fix(client): Correctly pass timeout parameter to parent class
2 parents b047ea2 + b4111db commit 1ff4e49

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/envs/dipg_safety_env/client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@ class DIPGSafetyEnv(HTTPEnvClient[DIPGAction, DIPGObservation]):
2121
This class inherits from the base `HTTPEnvClient` and is specialized to handle
2222
the specific data types of our environment: `DIPGAction` and `DIPGObservation`.
2323
"""
24-
# --- THIS IS THE NEWLY ADDED METHOD ---
2524

26-
def __init__(self, base_url: str, timeout: int = 60):
25+
def __init__(self, base_url: str, timeout: float = 60.0):
2726
"""
2827
Initializes the client.
2928
3029
Args:
3130
base_url: The URL of the running environment server.
3231
timeout: The number of seconds to wait for a server response.
3332
"""
34-
# This calls the parent class's initializer, passing the arguments along.
35-
super().__init__(base_url=base_url, timeout=timeout)
33+
# This correctly calls the parent initializer with the expected
34+
# 'request_timeout_s' keyword argument.
35+
super().__init__(base_url=base_url, request_timeout_s=timeout)
3636
# ----------------------------------------
3737

3838
def _step_payload(self, action: DIPGAction) -> dict:

0 commit comments

Comments
 (0)