Skip to content

Fix CI: lint, format, vulture, cv2-free test imports - #1

Merged
m9h merged 1 commit into
mainfrom
fix/ci-green
Jun 10, 2026
Merged

Fix CI: lint, format, vulture, cv2-free test imports#1
m9h merged 1 commit into
mainfrom
fix/ci-green

Conversation

@m9h

@m9h m9h commented Jun 10, 2026

Copy link
Copy Markdown
Owner

The last several main runs were red on all three jobs — none in the simulation core.

What was failing

  • lint — ruff style nits (X | None, dict vs Dict, unsorted/unused imports) in monitor/ and training/sharding.py.
  • testModuleNotFoundError: No module named 'cv2' in tests/test_udp_bridge.py::TestVirtualCL1::test_init. Constructing VirtualCL1Server (with vis on by default) eagerly imported monitor/mjpeg, whose top-level import cv2 is only needed to JPEG-encode dashboard frames.
  • qualityvulture exited 3 on intentionally-unused params.

Fixes

  • ruff check --fix + ruff format (bulk of the diff is formatting).
  • Made import cv2 lazy inside NeuralMJPEGServer.update_frame; declared opencv-python in the vizdoom extra so the dashboard still resolves it.
  • [tool.vulture] ignore_names = ["colorby", "exc", "format"] for the public plotting kwarg, context-manager *exc, and the log_message override.
  • Removed a genuinely dead neuron_ids in core/pallas_ops.py; replaced a try/except/pass with contextlib.suppress in monitor/logger.py.

Verification (local)

  • ruff check/ruff format --check clean · interrogate 91.3% · vulture clean
  • tests/test_udp_bridge.py7 passed with cv2 absent
  • 76 passed across pallas/logger/cl_sdk/feedback/doom suites

🤖 Generated with Claude Code

Three CI jobs were red (none in the simulation core):

- lint: ruff style nits across monitor/ and training/sharding.py
  (X | None, dict vs Dict, unsorted/unused imports). Auto-fixed via
  `ruff check --fix` + `ruff format`.
- test: `ModuleNotFoundError: No module named 'cv2'` — constructing
  VirtualCL1Server eagerly imported monitor/mjpeg, whose top-level
  `import cv2` is only needed on the dashboard path. Made the import
  lazy (inside update_frame) and declared opencv-python in the vizdoom
  extra so the dashboard still resolves it.
- quality: vulture exited 3 on intentionally-unused params (public
  `colorby` kwarg, context-manager `*exc`, log_message `format`
  override). Added them to [tool.vulture] ignore_names. Also removed a
  genuinely dead `neuron_ids` in core/pallas_ops.py and replaced a
  try/except/pass with contextlib.suppress in monitor/logger.py.

Verified locally: ruff check/format clean, interrogate 91.3%, vulture
clean, and tests/test_udp_bridge.py passes with cv2 absent (7 passed);
76 passed across pallas/logger/cl_sdk/feedback/doom suites.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@m9h
m9h merged commit 91f7c01 into main Jun 10, 2026
3 checks passed
@m9h
m9h deleted the fix/ci-green branch June 10, 2026 00:32
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