Skip to content

Commit 708af75

Browse files
committed
Clarify ABIDES hook signatures
1 parent 9391fdf commit 708af75

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

codeclash/arenas/abides/runtime/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@ across identical seeded market worlds.
1313
Scores are computed from exchange execution messages, so editing `self.holdings` directly does not
1414
create scored profit.
1515
Some upstream ABIDES agents keep default behavior behind exact-class checks. If you subclass one of
16-
those agents, override the relevant hooks instead of relying on an empty subclass.
16+
those agents, override the relevant hooks instead of relying on an empty subclass. Inspect method
17+
signatures before overriding them; common signatures are `wakeup(self, currentTime)`,
18+
`receiveMessage(self, currentTime, msg)`, `kernelStarting(self, startTime)`, and
19+
`kernelStopping(self)`.

configs/examples/ABIDES__dummy__r1__s2.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,9 @@ prompts:
2828
2929
from agent.ValueAgent import ValueAgent as MyAgent
3030
31+
If you subclass an upstream ABIDES agent, inspect and match ABIDES method signatures exactly.
32+
Common hooks are `wakeup(self, currentTime)`, `receiveMessage(self, currentTime, msg)`,
33+
`kernelStarting(self, startTime)`, and `kernelStopping(self)`.
34+
3135
The arena runs compact ABIDES market simulations. Your objective is to maximize average
3236
mark-to-market profit across identical seeded market worlds.

docs/reference/arenas/abides.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ is installed in the ABIDES arena Docker image, not in CodeClash's core Python en
4141

4242
Some upstream ABIDES agents, including `ValueAgent`, keep default behavior behind exact-class
4343
checks. If you subclass one of those agents, override the relevant `wakeup` and `receiveMessage`
44-
hooks instead of relying on `pass`.
44+
hooks instead of relying on `pass`. Inspect method signatures before overriding hooks; common
45+
signatures are `wakeup(self, currentTime)`, `receiveMessage(self, currentTime, msg)`,
46+
`kernelStarting(self, startTime)`, and `kernelStopping(self)`.
4547

4648
## Configuration Example
4749

0 commit comments

Comments
 (0)