Skip to content

Commit 919833c

Browse files
Merge pull request #1 from surfiniaburger/dipg-research
FIX: Handle double-nested observation in client parser
2 parents e847824 + 05490a0 commit 919833c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/envs/dipg_safety_env/client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ def _parse_result(self, payload: dict) -> StepResult[DIPGObservation]:
1111
print(payload)
1212
print("-------------------------------------------")
1313
# -----------------------------
14-
obs = DIPGObservation(**payload["observation"])
14+
# Go one level deeper to get the actual observation data
15+
obs = DIPGObservation(**payload["observation"]["observation"])
1516
return StepResult(
1617
observation=obs,
1718
reward=payload.get("reward"),

0 commit comments

Comments
 (0)