Skip to content

Carnival - #212

Open
erfanpj wants to merge 1 commit into
k4ntz:devfrom
erfanpj:carnival-deadline
Open

Carnival#212
erfanpj wants to merge 1 commit into
k4ntz:devfrom
erfanpj:carnival-deadline

Conversation

@erfanpj

@erfanpj erfanpj commented Dec 21, 2025

Copy link
Copy Markdown

Summary

  • Adds Carnival environment implementation.

Files

  • src/jaxatari/games/jax_carnival.py

Notes

  • step() and render() are JIT-compatible
  • Pure functional state updates with fixed-shape arrays

Testing

  • pytest -q tests --game carnival

@github-actions

github-actions Bot commented Dec 21, 2025

Copy link
Copy Markdown
📁 Previous CI results (run #20414630662)

Test Report

This comment was generated automatically by a GitHub Action. It summarizes the test results for this pull request. The GitHub Action run can be found here:

https://github.com/k4ntz/JAXAtari/actions/runs/20414613532

Base Branch ✅

The PR's base branch is dev.
The expected base branch is dev.

Changed Files ❌

The PR changes files that should not be changed:

  • renovate.json
  • src/jaxatari/core.py

Please ensure that only allowed files are modified. Any changes in the src/jaxatari/games/ directory are allowed.

Framework Tests ✅

All framework tests passed. Good work! 🎉


This log was automatically created at 2025-12-21 19:23:56 UTC.

@github-actions

github-actions Bot commented Dec 21, 2025

Copy link
Copy Markdown
📁 Previous CI results (run #20414689970)

Test Report

This comment was generated automatically by a GitHub Action. It summarizes the test results for this pull request. The GitHub Action run can be found here:

https://github.com/k4ntz/JAXAtari/actions/runs/20414630662

Base Branch ✅

The PR's base branch is dev.
The expected base branch is dev.

Changed Files ❌

The PR changes files that should not be changed:

  • renovate.json

Please ensure that only allowed files are modified. Any changes in the src/jaxatari/games/ directory are allowed.

Framework Tests ✅

All framework tests passed. Good work! 🎉


This log was automatically created at 2025-12-21 19:25:33 UTC.

@github-actions

github-actions Bot commented Dec 21, 2025

Copy link
Copy Markdown
📁 Previous CI results (run #20415348235)

Test Report

This comment was generated automatically by a GitHub Action. It summarizes the test results for this pull request. The GitHub Action run can be found here:

https://github.com/k4ntz/JAXAtari/actions/runs/20414689970

Base Branch ✅

The PR's base branch is dev.
The expected base branch is dev.

Changed Files ✅

There are no forbidden file changes. Nice 👍

Framework Tests ✅

All framework tests passed. Good work! 🎉


This log was automatically created at 2025-12-21 19:30:24 UTC.

@github-actions

github-actions Bot commented Dec 21, 2025

Copy link
Copy Markdown
📁 Previous CI results (run #20931717063)

Test Report

This comment was generated automatically by a GitHub Action. It summarizes the test results for this pull request. The GitHub Action run can be found here:

https://github.com/k4ntz/JAXAtari/actions/runs/20415348235

Base Branch ✅

The PR's base branch is dev.
The expected base branch is dev.

Changed Files ✅

There are no forbidden file changes. Nice 👍

Framework Tests ✅

All framework tests passed. Good work! 🎉


This log was automatically created at 2025-12-21 20:30:31 UTC.

@erfanpj

erfanpj commented Dec 21, 2025

Copy link
Copy Markdown
Author

Latest commit is green (base=dev, changed-files ok, framework tests passed). One workflow run is awaiting maintainer approval due to fork security (Internal PR Tests). Please approve if it is required.

@n0braIn3

n0braIn3 commented Jan 4, 2026

Copy link
Copy Markdown

Code Review: Carnival

Summary

I've spent some time playing through your Carnival implementation and comparing it to the original Atari version, and I have to say the JAX implementation itself is really solid. The code is clean, well-structured, and properly uses JAX primitives throughout. However, I found some significant gameplay differences that really change how the game feels and plays compared to the original. Of course i understand that this is a purely functional submission without concentrating on visuals, but i will mention them anyway, maybe this helps to organize later. The biggest issue is that there's no way to replenish ammunition, which makes the game basically unwinnable.


ALE Similarity: 1.5/4

Strengths

  • The core shooting gallery concept is there. You've got the player moving horizontally, targets scrolling in lanes, and a firing mechanic
  • The visual layout is recognizable with the score and ammo counter at the top
  • The lane-based target system works well
  • Having a special falling bonus target is the right idea

Issues Found

1. Missing Ammunition Replenishment System

  • What's wrong: In the original Carnival, certain targets (like white boxes with "8") give you ammo back when you hit them. In your implementation, there's no way to get ammo back at all (or i couldn't find one).
  • Where I found it: Looking at the _bullet_target_collision function, it calculates reward_i32 but there's no mechanism to return an ammo_delta. The main one_frame step only ever decrements ammo when firing.

2. Incorrect Falling Object Behavior

  • What's wrong: The falling object in the original game is a "chicken" that actively moves horizontally toward the player's position and drains ammo if it reaches the bottom. In your version, it's just a block that falls straight down and doesn't threaten the player.
  • Where I found it: The _fall_step function only updates fall_y vertically. There's no horizontal tracking logic and no penalty when the object reaches the bottom.

3. Simplified Visuals and Missing Features

  • The original had more variety in targets (ducks, owls, rabbits with different point values) and a spinning, color-changing object. Your implementation uses simpler block-like sprites.

Recommendations

  1. Fix the ammo system: You need to add ammo replenishment when certain targets are hit. I'd suggest adding an ammo_delta field to the collision detection and updating the state accordingly.
  2. Implement proper chicken behavior: Add horizontal tracking in _fall_step so it moves toward the player, and add a check in the main step to penalize ammo when it reaches the bottom.
  3. Consider adding more target variety: While not critical, adding back some of the original target types and their point values would enhance the gameplay experience. (e.g. yellow boxes are currently overly present compared to the other types. Or just reduce the amount of boxes completely.)

Implementation Quality: 3.5/4

Strengths

  • JAX compliance: Everything is pure-functional and JIT-compatible. You're using jax.lax.cond, proper immutable state updates, and no Python control flow in JIT functions.
  • Really nice modularity: Your step() function is broken down into clear, semantic helpers (_player_step, _bullet_fire_step, _spawn_step, etc.). Each one has a single responsibility and it's easy to follow the logic.
  • Solid rendering: The _CarnivalRenderer class is well-organized. I particularly like the _blit_patch_padded helper. It's a clean solution for handling sprite rendering with boundary clipping.
  • Clean state management: The CarnivalState dataclass is well-defined, and the state transitions are clear and functional.

Issues Found

Honestly, from a pure JAX implementation perspective, I didn't find any issues. The code quality is great. The problems are all in the game logic itself (the missing mechanics I mentioned above), not in how you've written the JAX code.


Overall Assessment

Total Score: (ALE: 1.5/4) + (Implementation: 3.5/4) = 5/8

Key Strengths

  1. Excellent code structure - Your decomposition and use of JAX primitives is really well done
  2. Robust rendering system - The blitting logic handles edge cases properly
  3. Clean and readable - Easy to understand what each function does

Priority Improvements

  1. Ammo replenishment - This is absolutely critical. Without it, the game doesn't work as intended
  2. Chicken mechanics - Adds back the strategic threat element

Final Thoughts

I really like the JAX foundation you've built. Adding more sprites from the original game would improve your implementation. So your challenge now is getting the gameplay to match the original ALE version. Fix the ammo system first since that's what's breaking the game right now. Great work on the implementation!

@JTense

JTense commented Jan 5, 2026

Copy link
Copy Markdown

Review - Carnival

For this Review we played your game for about an hour, compared it side by side with the ALE version and read over your code implementation. Sínce this is an early stage of development, we know that you will change many things anyway. We considered you thought about your game implementation and how you want to do certain things a lot more than we do, but since this is a review we might still point out the obvious and hope we can give you reassurance about the things you wanted to change or build. Our game is also not ready yet, so we tried to write our review with this in mind, because we can probably relate how you would think right now. We hope this review helps a little bit, to finalize your game. :)

ALE Similarity (2/4):

What’s going well:

  • Core - The core is working well!

  • Bullet collision - Is working as intended. On hit a target disappears.

  • Target rows - Rows are moving in the right directions and they are containing different targets.

  • Score System - On hit a target gives a different amount of points on the score and bullets are subtracted after shooting.

  • Player Movement - The Inputs for the player like moving and shooting works about right.

What’s different or missing:

  • Prop Speed - The movement speed of the bullet is too slow and the target rows move too quickly, that makes it very hard to hit anything, because you have to anticipate the collision quite far.

  • Small Gameplay Bug - If you hold space and press left, then the player will move to the right. If you hold Space and press down, then the player will move to the left.

  • Falling Ducks Spawn - In your game implementation the falling ducks from the original are represented by falling blocks that spawn on top of the game window. In the original the ducks are falling from the literal duck sprite in the target lines. Also the duck from the target line has to vanish as well.

  • Falling Ducks Movement - It made sense to split the Falling Ducks issue, because they are kind of separate problems. The duck that is falling is also moving sidewards in the original game. In your version it falls straight down and despawns at the bottom of the game window.

  • Falling Ducks Collision - In the ALE version of Carnival when the flying duck hits the player or the line where the player moves, some of the remaining bullets are consumed and the duck vanishes. This mechanic is currently missing in your game.
    Ammo - Your game version is missing the feature of replenishing ammo, when hitting specific targets

  • Falling Ducks Type - The original version only contains falling ducks (so only the yellow prop). In your game all props like the +8 Bullets (blue blocks) and the owls (red blocks) can fall also.

  • Targets - In the ALE version each row of targets repeats its pattern until you have hit every target in that specific row. Then it will spawn a new pattern. Your game version is currently missing these repeated cycles.
    Also the ALE version immediately starts with targets on the screen while your game version initially starts with a blank screen and the targets have to spawn from the left/right side of the screen first.

  • Bunnies :( - We are missing the cute bunnies as targets. XoX

  • Bonus Target - The bonus targets that occasionally spawn on the top left are currency missing.

  • Sprites & Animations - Are currently missing and the Game HUD looks very different.

Implementation Quality (3/4):

Well implemented parts:

  • You have modular code and a well chosen selection of functions.

  • Everything is JIT-compatible and your usage of JAX functions is clean.

Recommendations:

  • In your Renderer-Class you are building text and digits for your HUD (i.e. score, ammo and the digits). For your final implementations you don’t really need any of these, since you only have a score that also has more pixels than the 5x3 display. An easier approach would be if you have your digits as sprites that you render based on a score array that you can update after getting points. For the bonus target and the “+8” target where you have digits as well, we would also recommend creating them with their own sprites, since they are static displays anyway.

  • Sometimes the readability of your code is quite hard, since you rarely commented on your implementation, and some variable names were quite confusing for us.

@erfanpj

erfanpj commented Jan 6, 2026

Copy link
Copy Markdown
Author

Hi @n0braIn3 and @JTense ,

Thank you both for the thorough reviews and for taking the time to play the game, compare it side by side with ALE, and read through the code. I really appreciate how specific and actionable your feedback is.

I’m glad the JAX side of the implementation came across well. I intentionally focused first on getting a clean, fully JIT-compatible, pure-functional structure with modular helpers, because that is the foundation I need for fast iteration and future fidelity work. I completely agree with the main conclusion from both of you: there are still several gameplay mechanics that do not match the original Carnival, and those gaps change the feel of the game in a big way.

I will update the mismatches and required mechanics as soon as possible. My priority list is:

1) Ammo replenishment (critical)
Right now ammo only decreases when firing. I agree this breaks the original gameplay loop. I will extend the bullet-target collision pipeline to return an ammo_delta (for example +8 targets) in addition to reward, and apply it in the main step so ammo can be restored correctly.

2) Falling duck / chicken behavior and penalties
I agree my current falling object is too simplified. I will rework it to behave closer to ALE: spawn it from the target lanes (and remove the source target), add sideways movement or player tracking, and implement the correct penalty (ammo drain) and despawn conditions when it reaches the player line or bottom.

3) Input mapping bug
Thanks for spotting the combined-input issue (holding fire affecting movement direction). I will fix the action decoding so firing does not interfere with left/right movement.

4) Timing and speeds
On the speed feedback: the movement speeds are already parameterized in the code, and I kept them as code-level constants rather than exposing an in-game speed setting because I assumed runtime configurability was not required at this stage. The current defaults are:

  • player_speed_px_per_step = 3
  • bullet_speed_px_per_step = 2
  • target_speed_px_per_step = 1
  • fall_speed_px_per_step = 1

However, you’re absolutely right that for ALE similarity the default timing is what really matters. If the bullet is too slow relative to the moving rows, the hit window shifts and the player has to over-anticipate shots. I’ll tune the default bullet/row/player/fall speeds to be closer to the original ALE dynamics.

5) Target row patterns and initial fill
I will implement the row pattern cycling (repeat until cleared, then respawn a new pattern) and adjust the initial state so targets are present from the start, consistent with ALE.

Visual polish, additional target variety, and sprite fidelity are also on my list, but I agree those should come after the core mechanics above, since these directly affect playability and similarity.

Thanks again for the detailed feedback. I’ll push updates addressing these points as soon as possible.
Best regards,
Erfan

@dominikmandok dominikmandok self-assigned this Jan 6, 2026
@github-actions

github-actions Bot commented Jan 12, 2026

Copy link
Copy Markdown
📁 Previous CI results (run #20932891324)

Test Report

This comment was generated automatically by a GitHub Action. It summarizes the test results for this pull request. The GitHub Action run can be found here:

https://github.com/k4ntz/JAXAtari/actions/runs/20931717063

Base Branch ✅

The PR's base branch is dev.
The expected base branch is dev.

Changed Files ❌

The PR changes files that should not be changed:

  • scripts/spriteEditor/convert_icon.py
  • scripts/spriteEditor/spriteEditor.py
  • src/jaxatari/rendering/jax_rendering_utils.py

Please ensure that only allowed files are modified. Any changes in the src/jaxatari/games/ directory are allowed.

Framework Tests ✅

All framework tests passed. Good work! 🎉


This log was automatically created at 2026-01-12 19:14:54 UTC.

@github-actions

github-actions Bot commented Jan 12, 2026

Copy link
Copy Markdown
📁 Previous CI results (run #20933161808)

Test Report

This comment was generated automatically by a GitHub Action. It summarizes the test results for this pull request. The GitHub Action run can be found here:

https://github.com/k4ntz/JAXAtari/actions/runs/20932891324

Base Branch ✅

The PR's base branch is dev.
The expected base branch is dev.

Changed Files ❌

The PR changes files that should not be changed:

  • priteEditor.py
  • scripts/spriteEditor/convert_icon.py
  • scripts/spriteEditor/spriteEditor.py
  • src/jaxatari/rendering/jax_rendering_utils.py

Please ensure that only allowed files are modified. Any changes in the src/jaxatari/games/ directory are allowed.

Framework Tests ✅

All framework tests passed. Good work! 🎉


This log was automatically created at 2026-01-12 19:55:16 UTC.

@github-actions

github-actions Bot commented Jan 12, 2026

Copy link
Copy Markdown
📁 Previous CI results (run #22093777834)

Test Report

This comment was generated automatically by a GitHub Action. It summarizes the test results for this pull request. The GitHub Action run can be found here:

https://github.com/k4ntz/JAXAtari/actions/runs/20933161808

Base Branch ✅

The PR's base branch is dev.
The expected base branch is dev.

Changed Files ✅

There are no forbidden file changes. Nice 👍

Framework Tests ✅

All framework tests passed. Good work! 🎉


This log was automatically created at 2026-01-12 20:05:20 UTC.

@dominikmandok dominikmandok changed the title carnival: first submission Carnival Feb 17, 2026
@github-actions

Copy link
Copy Markdown

Test Report

This comment was generated automatically by a GitHub Action. It summarizes the test results for this pull request. The GitHub Action run can be found here:

https://github.com/k4ntz/JAXAtari/actions/runs/22093777834

Base Branch ✅

The PR's base branch is dev.
The expected base branch is dev.

Changed Files ✅

There are no forbidden file changes. Nice 👍

Framework Tests ❌

Some framework tests failed. Please check the details below:

carnival ❌
============================= test session starts ==============================
platform linux -- Python 3.11.14, pytest-8.4.2, pluggy-1.6.0
rootdir: /home/runner/work/JAXAtari/JAXAtari
configfile: pyproject.toml
plugins: sugar-1.1.1, github-actions-annotate-failures-0.3.0, xdist-3.8.0, syrupy-4.9.1, jaxtyping-0.3.9
created: 2/2 workers
2 workers [143 items]

ssssssssssssss.::warning file=/home/runner/work/JAXAtari/JAXAtari/.venv/lib/python3.11/site-packages/pygame/pkgdata.py,line=25::pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
::warning file=/home/runner/work/JAXAtari/JAXAtari/.venv/lib/python3.11/site-packages/pygame/pkgdata.py,line=25::pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
sssss.....::error file=tests/test_core_and_wrappers.py,line=493::test_native_downscaling_hot_swap[carnival]%0A%0AAttributeError: '_CarnivalRenderer' object has no attribute 'config'
F::error file=tests/test_core_and_wrappers.py,line=555::test_native_downscaling_grayscale[carnival]%0A%0AAttributeError: '_CarnivalRenderer' object has no attribute 'config'
F............................................. [ 50%]
........sssssssssss..............sssss...............::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/gym_wrapper.py,line=131::Environment returned a NamedTuple for 'info'. This is deprecated.
::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/gym_wrapper.py,line=111::Environment returned a NamedTuple for 'info'. This is deprecated. Please return a Dict or a Flax PyTreeNode.
::warning file=/home/runner/work/JAXAtari/JAXAtari/.venv/lib/python3.11/site-packages/gymnasium/utils/passive_env_checker.py,line=317::WARN: No render modes was declared in the environment (env.metadata['render_modes'] is None or not defined), you may have trouble when calling `.render()`.
::warning file=/home/runner/work/JAXAtari/JAXAtari/.venv/lib/python3.11/site-packages/gymnasium/utils/env_checker.py,line=434::WARN: Not able to test alternative render modes due to the environment not having a spec. Try instantiating the environment through `gymnasium.make`
::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/gym_wrapper.py,line=131::Environment returned a NamedTuple for 'info'. This is deprecated.
::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/gym_wrapper.py,line=111::Environment returned a NamedTuple for 'info'. This is deprecated. Please return a Dict or a Flax PyTreeNode.
::warning file=/home/runner/work/JAXAtari/JAXAtari/.venv/lib/python3.11/site-packages/gymnasium/utils/passive_env_checker.py,line=317::WARN: No render modes was declared in the environment (env.metadata['render_modes'] is None or not defined), you may have trouble when calling `.render()`.
::warning file=/home/runner/work/JAXAtari/JAXAtari/.venv/lib/python3.11/site-packages/gymnasium/utils/env_checker.py,line=434::WARN: Not able to test alternative render modes due to the environment not having a spec. Try instantiating the environment through `gymnasium.make`
.::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/gym_wrapper.py,line=131::Environment returned a NamedTuple for 'info'. This is deprecated.
::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/gym_wrapper.py,line=131::Environment returned a NamedTuple for 'info'. This is deprecated.
.::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/gym_wrapper.py,line=131::Environment returned a NamedTuple for 'info'. This is deprecated.
::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/gym_wrapper.py,line=111::Environment returned a NamedTuple for 'info'. This is deprecated. Please return a Dict or a Flax PyTreeNode.
::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/gym_wrapper.py,line=131::Environment returned a NamedTuple for 'info'. This is deprecated.
::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/gym_wrapper.py,line=111::Environment returned a NamedTuple for 'info'. This is deprecated. Please return a Dict or a Flax PyTreeNode.
.::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/gym_wrapper.py,line=131::Environment returned a NamedTuple for 'info'. This is deprecated.
::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/gym_wrapper.py,line=111::Environment returned a NamedTuple for 'info'. This is deprecated. Please return a Dict or a Flax PyTreeNode.
::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/gym_wrapper.py,line=131::Environment returned a NamedTuple for 'info'. This is deprecated.
::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/gym_wrapper.py,line=111::Environment returned a NamedTuple for 'info'. This is deprecated. Please return a Dict or a Flax PyTreeNode.
.::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/gym_wrapper.py,line=131::Environment returned a NamedTuple for 'info'. This is deprecated.
::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/gym_wrapper.py,line=131::Environment returned a NamedTuple for 'info'. This is deprecated.
.::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/gym_wrapper.py,line=131::Environment returned a NamedTuple for 'info'. This is deprecated.
::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/gym_wrapper.py,line=131::Environment returned a NamedTuple for 'info'. This is deprecated.
.::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/gym_wrapper.py,line=131::Environment returned a NamedTuple for 'info'. This is deprecated.
::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/gym_wrapper.py,line=131::Environment returned a NamedTuple for 'info'. This is deprecated.
..::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/gym_wrapper.py,line=131::Environment returned a NamedTuple for 'info'. This is deprecated.
::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/gym_wrapper.py,line=111::Environment returned a NamedTuple for 'info'. This is deprecated. Please return a Dict or a Flax PyTreeNode.
::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/gym_wrapper.py,line=131::Environment returned a NamedTuple for 'info'. This is deprecated.
::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/gym_wrapper.py,line=111::Environment returned a NamedTuple for 'info'. This is deprecated. Please return a Dict or a Flax PyTreeNode.
s.::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/games/jax_pong.py,line=106::Performance Warning: JaxPong.consts is a 'NamedTuple'. This prevents JAX from treating constants as static metadata, potentially causing excessive recompilation. Future versions will require 'flax.struct.PyTreeNode' (and the states/observations/info to flax.struct.dataclass/PyTreeNode). Please refactor your constants class.
::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/core.py,line=175::Environment exposes deprecated obs_to_flat_array(). Observations should now be flax.struct.dataclasses using ObjectObservation for objects or plain arrays for observations like lives, score, etc. Depending on legacy obs_to_flat_array might lead to unforseen issues with wrappers.
::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/games/jax_pong.py,line=106::Performance Warning: JaxPong.consts is a 'NamedTuple'. This prevents JAX from treating constants as static metadata, potentially causing excessive recompilation. Future versions will require 'flax.struct.PyTreeNode' (and the states/observations/info to flax.struct.dataclass/PyTreeNode). Please refactor your constants class.
::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/core.py,line=175::Environment exposes deprecated obs_to_flat_array(). Observations should now be flax.struct.dataclasses using ObjectObservation for objects or plain arrays for observations like lives, score, etc. Depending on legacy obs_to_flat_array might lead to unforseen issues with wrappers.
.::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/games/jax_pong.py,line=106::Performance Warning: JaxPong.consts is a 'NamedTuple'. This prevents JAX from treating constants as static metadata, potentially causing excessive recompilation. Future versions will require 'flax.struct.PyTreeNode' (and the states/observations/info to flax.struct.dataclass/PyTreeNode). Please refactor your constants class.
::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/games/jax_pong.py,line=106::Performance Warning: JaxPong.consts is a 'NamedTuple'. This prevents JAX from treating constants as static metadata, potentially causing excessive recompilation. Future versions will require 'flax.struct.PyTreeNode' (and the states/observations/info to flax.struct.dataclass/PyTreeNode). Please refactor your constants class.
::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/core.py,line=175::Environment exposes deprecated obs_to_flat_array(). Observations should now be flax.struct.dataclasses using ObjectObservation for objects or plain arrays for observations like lives, score, etc. Depending on legacy obs_to_flat_array might lead to unforseen issues with wrappers.
::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/core.py,line=175::Environment exposes deprecated obs_to_flat_array(). Observations should now be flax.struct.dataclasses using ObjectObservation for objects or plain arrays for observations like lives, score, etc. Depending on legacy obs_to_flat_array might lead to unforseen issues with wrappers.
.::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/games/jax_pong.py,line=106::Performance Warning: JaxPong.consts is a 'NamedTuple'. This prevents JAX from treating constants as static metadata, potentially causing excessive recompilation. Future versions will require 'flax.struct.PyTreeNode' (and the states/observations/info to flax.struct.dataclass/PyTreeNode). Please refactor your constants class.
::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/core.py,line=175::Environment exposes deprecated obs_to_flat_array(). Observations should now be flax.struct.dataclasses using ObjectObservation for objects or plain arrays for observations like lives, score, etc. Depending on legacy obs_to_flat_array might lead to unforseen issues with wrappers.
::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/games/jax_pong.py,line=106::Performance Warning: JaxPong.consts is a 'NamedTuple'. This prevents JAX from treating constants as static metadata, potentially causing excessive recompilation. Future versions will require 'flax.struct.PyTreeNode' (and the states/observations/info to flax.struct.dataclass/PyTreeNode). Please refactor your constants class.
::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/core.py,line=175::Environment exposes deprecated obs_to_flat_array(). Observations should now be flax.struct.dataclasses using ObjectObservation for objects or plain arrays for observations like lives, score, etc. Depending on legacy obs_to_flat_array might lead to unforseen issues with wrappers.
...::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/games/jax_pong.py,line=106::Performance Warning: JaxPong.consts is a 'NamedTuple'. This prevents JAX from treating constants as static metadata, potentially causing excessive recompilation. Future versions will require 'flax.struct.PyTreeNode' (and the states/observations/info to flax.struct.dataclass/PyTreeNode). Please refactor your constants class.
::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/core.py,line=175::Environment exposes deprecated obs_to_flat_array(). Observations should now be flax.struct.dataclasses using ObjectObservation for objects or plain arrays for observations like lives, score, etc. Depending on legacy obs_to_flat_array might lead to unforseen issues with wrappers.
::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/games/jax_pong.py,line=106::Performance Warning: JaxPong.consts is a 'NamedTuple'. This prevents JAX from treating constants as static metadata, potentially causing excessive recompilation. Future versions will require 'flax.struct.PyTreeNode' (and the states/observations/info to flax.struct.dataclass/PyTreeNode). Please refactor your constants class.
::warning file=/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/core.py,line=175::Environment exposes deprecated obs_to_flat_array(). Observations should now be flax.struct.dataclasses using ObjectObservation for objects or plain arrays for observations like lives, score, etc. Depending on legacy obs_to_flat_array might lead to unforseen issues with wrappers.
...  [100%]
=================================== FAILURES ===================================
/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/modification.py:31: AttributeError: '_CarnivalRenderer' object has no attribute 'config'
/home/runner/work/JAXAtari/JAXAtari/src/jaxatari/modification.py:31: AttributeError: '_CarnivalRenderer' object has no attribute 'config'
=============================== warnings summary ===============================
tests/test_all_mods.py::test_no_duplicate_mod_keys
  /home/runner/work/JAXAtari/JAXAtari/.venv/lib/python3.11/site-packages/pygame/pkgdata.py:25: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    from pkg_resources import resource_stream, resource_exists

tests/test_funcenv_adapter.py::TestGymnasiumApiCompliance::test_gymnasium_env_checker[carnival]
tests/test_funcenv_adapter.py::TestGymnasiumApiCompliance::test_reset_method[carnival]
tests/test_funcenv_adapter.py::TestGymnasiumApiCompliance::test_step_method[carnival]
tests/test_funcenv_adapter.py::TestGymWrapperIntegration::test_time_limit_wrapper[carnival]
tests/test_funcenv_adapter.py::TestGymnasiumApiCompliance::test_render_method[carnival]
tests/test_funcenv_adapter.py::TestGymWrapperIntegration::test_preprocessing_wrappers[carnival]
tests/test_funcenv_adapter.py::TestGymWrapperIntegration::test_frame_stack_wrapper[carnival]
tests/test_funcenv_adapter.py::TestGymnasiumApiCompliance::test_seeding_and_determinism[carnival]
  /home/runner/work/JAXAtari/JAXAtari/src/jaxatari/gym_wrapper.py:131: UserWarning: Environment returned a NamedTuple for 'info'. This is deprecated.
    warnings.warn(

tests/test_funcenv_adapter.py::TestGymnasiumApiCompliance::test_gymnasium_env_checker[carnival]
tests/test_funcenv_adapter.py::TestGymnasiumApiCompliance::test_step_method[carnival]
tests/test_funcenv_adapter.py::TestGymWrapperIntegration::test_time_limit_wrapper[carnival]
tests/test_funcenv_adapter.py::TestGymnasiumApiCompliance::test_seeding_and_determinism[carnival]
  /home/runner/work/JAXAtari/JAXAtari/src/jaxatari/gym_wrapper.py:111: UserWarning: Environment returned a NamedTuple for 'info'. This is deprecated. Please return a Dict or a Flax PyTreeNode.
    warnings.warn(

tests/test_funcenv_adapter.py::TestGymnasiumApiCompliance::test_gymnasium_env_checker[carnival]
  /home/runner/work/JAXAtari/JAXAtari/.venv/lib/python3.11/site-packages/gymnasium/utils/passive_env_checker.py:317: UserWarning: WARN: No render modes was declared in the environment (env.metadata['render_modes'] is None or not defined), you may have trouble when calling `.render()`.
    logger.warn(

tests/test_funcenv_adapter.py::TestGymnasiumApiCompliance::test_gymnasium_env_checker[carnival]
  /home/runner/work/JAXAtari/JAXAtari/.venv/lib/python3.11/site-packages/gymnasium/utils/env_checker.py:434: UserWarning: WARN: Not able to test alternative render modes due to the environment not having a spec. Try instantiating the environment through `gymnasium.make`
    logger.warn(

tests/test_spaces.py::test_discrete_space
tests/test_spaces.py::test_dict_space
tests/test_spaces.py::test_box_space
tests/test_spaces.py::test_tuple_space
  /home/runner/work/JAXAtari/JAXAtari/src/jaxatari/games/jax_pong.py:106: UserWarning: Performance Warning: JaxPong.consts is a 'NamedTuple'. This prevents JAX from treating constants as static metadata, potentially causing excessive recompilation. Future versions will require 'flax.struct.PyTreeNode' (and the states/observations/info to flax.struct.dataclass/PyTreeNode). Please refactor your constants class.
    super().__init__(consts)

tests/test_spaces.py::test_discrete_space
tests/test_spaces.py::test_dict_space
tests/test_spaces.py::test_box_space
tests/test_spaces.py::test_tuple_space
  /home/runner/work/JAXAtari/JAXAtari/src/jaxatari/core.py:175: DeprecationWarning: Environment exposes deprecated obs_to_flat_array(). Observations should now be flax.struct.dataclasses using ObjectObservation for objects or plain arrays for observations like lives, score, etc. Depending on legacy obs_to_flat_array might lead to unforseen issues with wrappers.
    _warn_deprecated_obs_to_flat_array(env)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
SKIPPED [1] tests/test_all_mods.py:188: Game does not have mods registered
SKIPPED [1] tests/test_all_mods.py:234: Game does not have mods registered
SKIPPED [1] tests/test_all_mods.py:309: Game does not have mods registered
SKIPPED [1] tests/test_all_mods.py:333: Game does not have mods registered
SKIPPED [1] tests/test_all_mods.py:350: Game does not have mods registered
SKIPPED [1] tests/test_all_mods.py:396: Game does not have mods registered
SKIPPED [1] tests/test_all_mods.py:671: Game 'carnival' is not in core.GAME_MODULES
SKIPPED [1] tests/test_all_mods.py:694: Game 'carnival' is not in core.GAME_MODULES
SKIPPED [1] tests/test_all_mods.py:712: Game 'carnival' is not in core.GAME_MODULES
SKIPPED [1] tests/test_all_mods.py:732: Game 'carnival' is not in core.GAME_MODULES
SKIPPED [1] tests/test_all_mods.py:752: Game 'carnival' is not in core.GAME_MODULES
SKIPPED [1] tests/test_all_mods.py:774: Game 'carnival' is not in core.GAME_MODULES
SKIPPED [1] tests/test_all_mods.py:787: Game 'carnival' is not in core.GAME_MODULES
SKIPPED [1] tests/test_all_mods.py:809: Game 'carnival' is not in core.GAME_MODULES
SKIPPED [1] tests/test_all_mods.py:483: Game does not have mods registered
SKIPPED [1] tests/test_all_mods.py:542: Game 'carnival' is not in core.GAME_MODULES
SKIPPED [1] tests/test_all_mods.py:565: Game 'carnival' is not in core.GAME_MODULES
SKIPPED [1] tests/test_all_mods.py:593: Game 'carnival' is not in core.GAME_MODULES
SKIPPED [1] tests/test_all_mods.py:605: Game 'carnival' is not in core.GAME_MODULES
SKIPPED [8] tests/test_environment_compatibility.py:521: Skipping to debug memory issues in CI
SKIPPED [8] tests/test_environment_compatibility.py:560: Skipping to debug memory issues in CI
SKIPPED [1] tests/test_funcenv_adapter.py:157: Skipping to debug memory issues in CI
FAILED tests/test_core_and_wrappers.py::test_native_downscaling_hot_swap[carnival] - AttributeError: '_CarnivalRenderer' object has no attribute 'config'
FAILED tests/test_core_and_wrappers.py::test_native_downscaling_grayscale[carnival] - AttributeError: '_CarnivalRenderer' object has no attribute 'config'
====== 2 failed, 105 passed, 36 skipped, 23 warnings in 228.03s (0:03:48) ======


This log was automatically created at 2026-02-17 10:20:29 UTC.

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.

4 participants