This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from agentlightning import Algorithm, LightningStore, Dataset | |
| from agentlightning.types import Rollout, Span, ResourcesUpdate | |
| class MyCustomAlgorithm(Algorithm): | |
| """Custom algorithm that learns from agent traces.""" | |
| async def fit( | |
| self, | |
| train_dataset: Dataset, | |
| val_dataset: Dataset, |