[envpool] clean up dev Python dependencies and stabilize state buffers - #340
Merged
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3b5a6d7162
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
protobuf<=4.20.0,box2d-py, andmujoco_py, while the phase-4 cleanup surfaced aStateBufferQueue::Wait()path that could block forever when the background stock-buffer queue was temporarily empty.bazel_rules_qtpin, and harden the state-buffer fallback path. This does not change the release requirements or take on a broaderbazel_clang_tidymigration.make bazel-testis stable again ondev.This diff modernizes the phase-4 dev dependency surface and closes the queue-preallocation flaky that showed up during the full Linux test sweep.
Technical Details
devresolution, keep the minimal runtime extras still required by Bazel tests, and make the state-buffer preallocation path fall back to synchronous allocation instead of blocking on an empty stock queue.third_party/pip_requirements/requirements-dev.txt: removes the protobuf cap, dropsbox2d-py/mujoco_py, updatesopencv-python-headless, and keepsimageiofor the MuJoCo Gym test runtime.third_party/pip_requirements/requirements-dev-lock.txt: refreshed from a Linuxdevenvironment to match the new dependency surface.envpool/box2d/box2d_correctness_test.py: switches the baseline side of the Box2D space checks to Gymnasium's currentv3env IDs.envpool/box2d/BUILD: depends onbox2dandgymnasiumdirectly so Bazel sandboxes still see the right runtime packages.envpool/core/circular_buffer.h: adds a non-blockingTryGet()helper.envpool/core/state_buffer_queue.h: usesTryGet()and falls back to a synchronousStateBufferallocation when the background stock queue is temporarily empty.envpool/workspace0.bzl: refreshes thebazel_rules_qtpin.BUILD: exposes.clang-tidyviasrcsfor the current aspect consumer.threadpoolandgym3_libenvwere checked and already match upstream head, so there is no diff for them. I also probed a newerbazel_clang_tidy, but that turned into a much larger lint/toolchain migration and is intentionally not included here.Test Plan
Automated
brix ssh dev -C -- 'cd /root/code/envpool && USE_BAZEL_VERSION=8.6.0 bazelisk test //envpool/core:state_buffer_queue_test --config=test --test_output=errors --nocache_test_results --runs_per_test=10': passed (10/10).brix ssh dev -C -- 'cd /root/code/envpool && make bazel-test': passed (30/30).Suggested Manual
python -m venv /tmp/envpool-phase4 && source /tmp/envpool-phase4/bin/activate && pip install -r third_party/pip_requirements/requirements-dev.txt: verify the dev dependency set resolves cleanly on Linux.USE_BAZEL_VERSION=8.6.0 bazelisk test //envpool/box2d:box2d_correctness_test --config=test --test_output=errors: verify the Gymnasium Box2D baseline continues to line up with EnvPool.