-
Notifications
You must be signed in to change notification settings - Fork 17
Add local visualization action #3
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
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Pull Request Overview
Adds support for local visualization in ALE-Bench by extending the tool wrappers and Session API, updating utilities for image serialization, and expanding tests and documentation.
- Introduce
local_visualizationintool_wrappersand wire it throughSession, including argument validation and elapsed‐time logging. - Provide new base64↔PIL utilities in
utils.pyto support image serialization in schemas. - Update tests to cover setup paths and session action logs for visualization, and refine type hints across the codebase.
- Refresh documentation (README, CONTRIBUTING) and tighten CI type checking.
Reviewed Changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/ale_bench/tool_wrappers/local_visualization.py | Added setup_local_visualization_paths, case_iter_func, and local_visualization implementation |
| src/ale_bench/session.py | Integrated local_visualization method in Session, updated action‐log entries to include elapsed_time and added argument checks |
| src/ale_bench/utils.py | Added base64_to_pil and pil_to_base64 helpers and refactored pil_to_base64jpeg |
| tests/tool_wrappers/test_local_visualization.py | New parametrized tests for path setup of local visualization files |
| tests/test_session.py | Expanded session tests to assert local_visualization action‐log entries and validate new argument checks |
| README.md | Documented the new local_visualization API and streamlined development instructions |
| pyproject.toml | Enforced stricter import grouping and updated linting config |
| .github/workflows/check.yml | Upgraded mypy invocation to --strict |
Comments suppressed due to low confidence (2)
src/ale_bench/utils.py:218
- The functions
base64_to_pilandpil_to_base64referencebase64andiobut these modules are not imported. Addimport base64andimport ioat the top of the file.
def base64_to_pil(base64_str: str) -> Image.Image:
src/ale_bench/utils.py:232
- The type annotation uses
LiteralbutLiteralis not imported. Addfrom typing import Literalat the top of the file.
def pil_to_base64(image: Image.Image, image_format: Literal["JPEG", "PNG"] = "PNG") -> str:
No description provided.