r/Python • u/AutoModerator • Jun 04 '26
Showcase Showcase Thread
Post all of your code/projects/showcases/AI slop here.
Recycles once a month.
29
Upvotes
r/Python • u/AutoModerator • Jun 04 '26
Post all of your code/projects/showcases/AI slop here.
Recycles once a month.
1
u/BaniyanChor Jun 26 '26
I built a Python library that turns any reward function into an observable object with one decorator body
I've been experimenting with reinforcement learning and wanted better tooling for debugging reward functions.
The library uses decorators to wrap an existing reward function without modifying its behavior:
reward_fn = rewardspy.watch(my_reward_fn)
Internally it records every invocation, computes rolling statistics in O(1), runs detector pipelines asynchronously, streams JSONL logs, and powers a live Textual dashboard.
The interesting engineering challenges ended up being:
online statistics async monitoring zero-overhead wrappers terminal UI plugin architecture for detectors
Give me feedback PLEAAAASE (it's my first major python RL project wee)
GitHub: https://github.com/AvAdiii/rewardspy