Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /dislovelhl_enhanced-agent-bus /online_learning_infra /evaluator.py
| """ | |
| Online learning evaluator for ACGS-2. | |
| Provides metrics and stats aggregation for the online learning pipeline. | |
| Constitutional Hash: 608508a9bd224290 | |
| """ | |
| from .config import LearningStatus | |
| from .models import LearningStats, PipelineStats | |
| class OnlineLearningEvaluator: | |
| """ | |
| Evaluator for online learning metrics and system status. | |
| """ | |
| def compute_pipeline_stats( | |
| adapter_stats: LearningStats, | |
| online_predictions: int, | |
| fallback_predictions: int, | |
| has_fallback: bool, | |
| preprocessing_enabled: bool, | |
| ) -> PipelineStats: | |
| """ | |
| Compute comprehensive pipeline statistics. | |
| """ | |
| total_predictions = fallback_predictions + online_predictions | |
| fallback_rate = fallback_predictions / total_predictions if total_predictions > 0 else 0.0 | |
| return PipelineStats( | |
| learning_stats=adapter_stats, | |
| total_predictions=total_predictions, | |
| online_predictions=online_predictions, | |
| fallback_predictions=fallback_predictions, | |
| fallback_rate=fallback_rate, | |
| model_ready=adapter_stats.status == LearningStatus.READY, | |
| has_fallback=has_fallback, | |
| preprocessing_enabled=preprocessing_enabled, | |
| ) | |
| def is_model_ready(samples_learned: int, min_samples: int) -> bool: | |
| """Check if the model has enough samples to be considered ready.""" | |
| return samples_learned >= min_samples | |
Xet Storage Details
- Size:
- 1.5 kB
- Xet hash:
- cdb7c83757cffb1400c7d5e2185c85220d3edd4b772bdd5a66f4928f2fff1885
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.