PR #170 (comprehensive type hints for LLMAgent & ModuleLLM + Mesa 4.x test migration) #171
abhinavk0220
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey everyone! Wanted to share a quick update on my recent
contribution PR #170 (comprehensive type hints for LLMAgent &
ModuleLLM + Mesa 4.x test migration).
The review process surfaced some genuinely interesting issues:
Bug caught by CodeRabbit: In record_model.py, the step counter
was being recorded as self.step but in Mesa 4.x, model.step is
the wrapped method, not the counter. The actual step counter is
self._time. Would've silently broken simulation recordings. Fixed!
Test ownership bug: neighbor.memory was being initialized with
agent=agent instead of agent=neighbor :
a copy-paste issue that
could hide memory bugs downstream. Fixed!
Type discussion with @IlamaranMagesh: The Any annotation on
generate() sparked a useful discussion about litellm's return types
(ModelResponse vs CustomStreamWrapper). Kept it as Any for now to
avoid hard coupling open to tightening if the team prefers.
All 287 tests passing. The review process was really valuable for
understanding the codebase more deeply!
PR: #170
Beta Was this translation helpful? Give feedback.
All reactions