Skip to content

fix: TelemetryCallback import crash + 12 TRL tests#231

Merged
abrichr merged 1 commit into
mainfrom
fix/trl-callback-import-crash
Mar 29, 2026
Merged

fix: TelemetryCallback import crash + 12 TRL tests#231
abrichr merged 1 commit into
mainfrom
fix/trl-callback-import-crash

Conversation

@abrichr
Copy link
Copy Markdown
Member

@abrichr abrichr commented Mar 29, 2026

Fixes bases crash. 12 tests for TRL integration.

The dynamic __bases__ assignment to inject TrainerCallback as a base
class fails in Python: "deallocator differs from object". Fixed by
creating a proper subclass at definition time instead.

12 new tests:
- Mock rollout_func: correct keys, count, reward variance
- Config separation: TrainingConfig has no TRL fields, wrapper accepts trl_config
- Wrapper construction: all callback combinations, trl_config passthrough
- TelemetryCallback: importable, fires events

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@abrichr abrichr merged commit ac2df2f into main Mar 29, 2026
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.

1 participant