Feature/upgrade deps and modernize tests#169
Open
SeanAdams10 wants to merge 2 commits intoHumanCompatibleAI:masterfrom
Open
Feature/upgrade deps and modernize tests#169SeanAdams10 wants to merge 2 commits intoHumanCompatibleAI:masterfrom
SeanAdams10 wants to merge 2 commits intoHumanCompatibleAI:masterfrom
Conversation
… framework - Update Python requirement from 3.10 to >=3.13 - Upgrade all packages to latest stable versions across pyproject.toml, setup.py, server/requirements.txt, and Dockerfile (python:3.13-bookworm) - Remove numpy<2 constraint, now using numpy 2.4.4 - Update tensorflow 2.19->2.21, ray 2.2->2.54.1, setuptools 77->82, and all other pinned dependencies - Replace legacy `import gym` with `import gymnasium` in rllib.py and remove deprecated `gym` package from dependencies - Fix Gymnasium env warnings: change observation_space from Box to Tuple(Box, Box), return obs tuples from reset()/step() instead of dicts, move metadata to info dict - Add 14 new pytest tests (test_gym_env_warnings.py) verifying no gymnasium warnings and correct observation format - Convert all 9 test files from unittest to pytest (testing/ and src/human_aware_rl/), removing all unittest.TestCase inheritance, setUp/tearDown -> fixtures, self.assert* -> plain assert - Fix flaky test_mdp_serialization by using tempfile instead of shared path, and fix test_render_state_from_dict misnamed helper function - Regenerate uv.lock with all updated dependencies BREAKING CHANGES: - Python 3.10/3.11/3.12 no longer supported (now requires >=3.13) - numpy 2.x: code using numpy 1.x-only APIs (e.g. removed type aliases like np.bool, np.int, np.float, np.object, np.str) will break. Pickled data using old numpy dtypes may trigger deprecation warnings. - Gymnasium env API change: Overcooked.reset() and step() now return observation as a tuple of two numpy arrays instead of a dict with "both_agent_obs"/"overcooked_state"/"other_agent_env_idx" keys. "overcooked_state" and "other_agent_env_idx" are now in the info dict. observation_space is now Tuple(Box, Box) instead of Box. - gym package removed: code importing `gym` must switch to `gymnasium` - Flask upgraded 2.x->3.x and Flask-SocketIO 4.x->5.x in server requirements (different async handling, python-socketio 4.x->5.x) - protobuf upgraded 3.x->7.x in server requirements (breaking API changes across major versions) - Dockerfile base image changed from python:3.7-buster to python:3.13-bookworm Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Description
Hi there - the current code base has all dependencies are pinned to 2022-era versions, would the maintainers welcome a PR to modernize? Note: the readme.md mentions that this is a fork with full credit to the original - this comment may need to be removed if you accept this to the main trunk.
Key changes
setup.py, server/requirements.txt, and Dockerfile (python:3.13-bookworm)
all other pinned dependencies
import gymwithimport gymnasiumin rllib.py andremove deprecated
gympackage from dependenciesTuple(Box, Box), return obs tuples from reset()/step() instead of
dicts, move metadata to info dict
gymnasium warnings and correct observation format
src/human_aware_rl/), removing all unittest.TestCase inheritance,
setUp/tearDown → fixtures, self.assert* → plain assert
path, and fix test_render_state_from_dict misnamed helper function
Potentially breaking changes (depends on usage)
Pickled data using old numpy dtypes may trigger deprecation warnings.
gymmust switch togymnasiumChecklist: