-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suppress env frame errors; serialize logprob #197
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, one less annoyance in the system (export_frame
issues)
ldp/data_structures.py
Outdated
# logprob may have been serialized, but cnanot be passed to | ||
# OpResult, so remove it here. | ||
with suppress(KeyError): | ||
data["action"].pop("logprob") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why can logprob
not be passed to OpResult
's action?
Also, typo in "cannot"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logprob
is a property that we extract from the OpCtx, not an attribute of the OpResult, so there's no way to set it on OpResult deserialization - the correct thing to do is also hydrate the OpCtx from the backend.
TrajectoryFileCallback
changes assumed that all envs implementedexport_frame()
; this loosens that assumptionOpResult
s