-
Notifications
You must be signed in to change notification settings - Fork 48
Rename cog_arena.py to cogsguard.py and remove unused imports #4477
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
base: claude/extract-attack-system-013Fd6xd9xPLzvsNNDpAspZ5
Are you sure you want to change the base?
Rename cog_arena.py to cogsguard.py and remove unused imports #4477
Conversation
c043c8e to
9047930
Compare
This comment has been minimized.
This comment has been minimized.
9047930 to
a60bb7e
Compare
10c987e to
2d77cf2
Compare
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.
💡 Codex Review
metta/recipes/experiment/cogsguard.py
Lines 148 to 152 in a60bb7e
| transfer=TransferActionConfig( | |
| vibe_transfers=[ | |
| VibeTransfer(vibe="battery", target={"energy": 50}, actor={"energy": -50}), | |
| VibeTransfer(vibe="heart", target={"heart": 1}, actor={"heart": -1}), | |
| VibeTransfer(vibe="gear", target={"damage": -100}, actor={"energy": -10}), |
TransferActionConfig and VibeTransfer are still used to configure the transfer action in make_env, but they were dropped from the mettagrid imports above. With the imports removed, calling make_env now raises NameError: TransferActionConfig is not defined before the environment can be built. Restore the imports or remove the transfer block to keep the recipe loadable.
metta/recipes/experiment/cogsguard.py
Lines 215 to 219 in a60bb7e
| "market": MarketConfig( | |
| terminals={ | |
| # Terminals are keyed by the direction the agent enters the market from. | |
| "north": MarketTerminalConfig(sell=False, amount=1), # buy | |
| "south": MarketTerminalConfig(sell=True, amount=1), # sell |
The market object still instantiates MarketConfig and MarketTerminalConfig, but those imports were removed from the mettagrid import list. When make_env reaches this block it will fail immediately with NameError rather than producing a valid environment. Add the missing imports or remove these usages so the recipe can be constructed.
metta/recipes/experiment/cogsguard.py
Line 238 in a60bb7e
| build=BuildConfig(vibe="barrier", cost={"energy": 50, "silicon": 25}), |
BuildConfig (and the related demolition/aoe configs) are still referenced in the barrier definition, but the corresponding imports were removed. The first access at build=BuildConfig(...) will raise NameError, preventing make_env from returning. Reintroduce the missing mettagrid imports to keep the barrier object usable.
ℹ️ 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".
2d77cf2 to
8a849ed
Compare
85b1e90 to
2547f51
Compare
8a849ed to
0883f93
Compare
|
Looks like there are a few issues preventing this PR from being merged!
If you'd like me to help, just leave a comment, like Feel free to include any additional details that might help me get this PR into a better state. You can manage your notification settings |
0883f93 to
dc3fc68
Compare
2547f51 to
40b6d8f
Compare
40b6d8f to
90118db
Compare
3a2f74d to
c4847af
Compare
90118db to
564d4f2
Compare

TL;DR
Renamed
cog_arena.pytocogsguard.pyand removed unused imports.What changed?
recipes/experiment/cog_arena.pytorecipes/experiment/cogsguard.pyAOEEffectConfigBuildConfigDemolishConfigMarketConfigMarketTerminalConfigTransferActionConfigVibeTransferHow to test?
Why make this change?
This change improves code cleanliness by removing unused imports and renames the file to better reflect its purpose or align with a new naming convention. The rename from
cog_arenatocogsguardsuggests a more specific focus or branding for this component.