Skip to content

Fix the episode_steps property binding - #162

Open
hartikainen wants to merge 1 commit into
google-deepmind:masterfrom
hartikainen:kristian/episode-steps-binding
Open

hartikainen wants to merge 1 commit into
google-deepmind:masterfrom
hartikainen:kristian/episode-steps-binding

Conversation

@hartikainen

@hartikainen hartikainen commented Sep 16, 2026 •

Copy link
Copy Markdown

Currently, Reverb passes py::call_guard directly to the episode_steps property declaration. As explained in pybind11's upstream change, property declarations silently ignored these guards, and the added compile-time check rejects that usage, preventing the binding from compiling.

This PR wraps the episode_steps getter in py::cpp_function and applies the call guard to that function so that reading the property releases the GIL as intended.

@hartikainen hartikainen mentioned this pull request Sep 16, 2026
Currently, Reverb passes `py::call_guard` directly to the
`episode_steps` property declaration. As explained in [pybind11's
upstream change](pybind/pybind11#5533), property
declarations silently ignored these guards, and the added compile-time
check rejects that usage, preventing the binding from compiling.

This PR wraps the `episode_steps` getter in `py::cpp_function` and
applies the call guard to that function so that reading the property
releases the GIL as intended.
@hartikainen
hartikainen force-pushed the kristian/episode-steps-binding branch 2 times, most recently from 2617cb3 to 4ee14dc Compare September 19, 2026 17:22
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.

1 participant