Skip to content
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

Merged
merged 3 commits into from
Dec 30, 2024
Merged

Suppress env frame errors; serialize logprob #197

merged 3 commits into from
Dec 30, 2024

Conversation

sidnarayanan
Copy link
Collaborator

  1. TrajectoryFileCallback changes assumed that all envs implemented export_frame(); this loosens that assumption
  2. Serializing logprobs when dumping OpResults

Copy link
Collaborator

@jamesbraza jamesbraza left a 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)

Comment on lines 126 to 129
# logprob may have been serialized, but cnanot be passed to
# OpResult, so remove it here.
with suppress(KeyError):
data["action"].pop("logprob")
Copy link
Collaborator

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"

Copy link
Collaborator Author

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.

@sidnarayanan sidnarayanan merged commit 97fa1a2 into main Dec 30, 2024
6 checks passed
@sidnarayanan sidnarayanan deleted the logprobs branch December 30, 2024 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants