test: add comprehensive integration tests for Prototypes module - #761
Conversation
Add 58 integration tests covering PrototypeVector, PrototypeAdamOptimizer, SimpleLinearRegression, and SimpleNeuralNetwork classes. Tests include: - PrototypeVector: construction, indexing, arithmetic operations, factory methods - PrototypeAdamOptimizer: construction, parameter updates, convergence behavior - SimpleLinearRegression: training, prediction, MSE/R2 computation - SimpleNeuralNetwork: forward/backward passes, XOR training scenario - Cross-component integration scenarios Also removes stale CLBlast project reference from test project. Closes #667 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Summary by CodeRabbitRelease Notes
✏️ Tip: You can customize this high-level summary in your review settings. WalkthroughRemoved a native CLBlast project dependency from test configuration and added comprehensive integration tests for the Prototypes module, including PrototypeVector, PrototypeAdamOptimizer, SimpleLinearRegression, SimpleNeuralNetwork, and cross-component operations. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
|
Add 58 integration tests covering PrototypeVector, PrototypeAdamOptimizer, SimpleLinearRegression, and SimpleNeuralNetwork classes. Tests include: - PrototypeVector: construction, indexing, arithmetic operations, factory methods - PrototypeAdamOptimizer: construction, parameter updates, convergence behavior - SimpleLinearRegression: training, prediction, MSE/R2 computation - SimpleNeuralNetwork: forward/backward passes, XOR training scenario - Cross-component integration scenarios Also removes stale CLBlast project reference from test project. Closes #667 Co-authored-by: franklinic <franklin@ivorycloud.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* test: add comprehensive Serving module integration tests (#670) Add 62 integration tests covering: - ContinuousBatcherConfig (defaults, configuration, model presets) - BatchSchedulerConfig (defaults, model-specific configs) - BatchScheduler<T> (scheduling, preemption, cancellation, statistics) - SequenceState<T> (lifecycle, token management, stop conditions) - GenerationRequest<T> (configuration options) - GenerationResult<T> (result data) - BatcherStatistics and SchedulerStatistics - SequenceStatus, StopReason, SchedulingPolicy enums - Full integration workflows Also remove stale CLBlast project reference from test project. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * test: add comprehensive FineTuning module integration tests (#640) (#753) Add 49 integration tests covering all 16 fine-tuning methods: - SFT (Supervised Fine-Tuning) - DPO (Direct Preference Optimization) - SimPO (Simple Preference Optimization) - ORPO (Odds Ratio Preference Optimization) - IPO (Identity Preference Optimization) - RDPO (Robust Direct Preference Optimization) - KTO (Kahneman-Tversky Optimization) - CPO (Contrastive Preference Optimization) - RLHF-PPO (Reinforcement Learning Human Feedback) - GRPO (Group Relative Policy Optimization) - PRO (Pairwise Ranking Optimization) - RRHF (Rank Responses Human Feedback) - RSO (Statistical Rejection Sampling) - SPIN (Self-Play Fine-Tuning) - CAI (Constitutional AI) Tests cover: - Constructor initialization - Fine-tuning workflow completion - Data validation (SFT, Preference, RL, Ranking) - Serialization/deserialization - Edge cases and parameter handling - Cancellation support Also removes stale CLBlast project reference from test project. Co-authored-by: franklinic <franklin@ivorycloud.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * test: add Evaluation integration tests (#655) (#765) Add 51 comprehensive integration tests for the Evaluation module covering: - Enums: PredictionType (BinaryClassification, Regression, MultiClass, MultiLabel) - DefaultModelEvaluator: Construction, options handling - PredictionStatsOptions: Default values, configuration - PredictionTypeInference: Inference from vectors, matrices, tensors Tests validate prediction type inference logic including: - Binary classification detection (0/1 labels) - Multi-class detection (integer labels with low unique ratio) - Regression detection (continuous values, NaN, infinity, high unique ratio) - Multi-label detection (matrix with multiple positives per row) Also fixes stale CLBlast project reference in test project. Co-authored-by: franklinic <franklin@ivorycloud.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * test: add ProgramSynthesis integration tests (#665) (#763) Add 50 comprehensive integration tests for the ProgramSynthesis module covering: - Models: CodePosition, CodeSpan, CodeLocation, CodeIssue, Program<T> - Enums: ProgramLanguage, CodeTask, CodeIssueSeverity, SqlDialect, etc. - Execution: CompilationDiagnostic, SqlValue, ProgramExecuteResponse - Results: CodeGenerationResult All tests validate model construction, property access, and default values. Co-authored-by: franklinic <franklin@ivorycloud.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * test: add comprehensive integration tests for PromptEngineering module (#762) Add 81 integration tests covering Templates, Analysis, FewShot selectors, Compression, Chains, and Tools components. Tests include: - SimplePromptTemplate: construction, variable extraction, formatting, validation - PromptMetrics: property values and timestamp behavior - PromptIssue and IssueSeverity: issue tracking and severity levels - ValidationOptions: default, strict, and lenient configurations - CompressionResult: token savings, compression ratio, success detection - CompressionOptions: default, aggressive, conservative presets - FixedExampleSelector: example management and selection behavior - ToolRegistry: registration, execution, case-insensitivity, descriptions - SequentialChain: step management, sync/async execution, cancellation - FewShotExample: model properties Also removes stale CLBlast project reference from test project. Closes #666 Co-authored-by: franklinic <franklin@ivorycloud.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * test: add comprehensive integration tests for Prototypes module (#761) Add 58 integration tests covering PrototypeVector, PrototypeAdamOptimizer, SimpleLinearRegression, and SimpleNeuralNetwork classes. Tests include: - PrototypeVector: construction, indexing, arithmetic operations, factory methods - PrototypeAdamOptimizer: construction, parameter updates, convergence behavior - SimpleLinearRegression: training, prediction, MSE/R2 computation - SimpleNeuralNetwork: forward/backward passes, XOR training scenario - Cross-component integration scenarios Also removes stale CLBlast project reference from test project. Closes #667 Co-authored-by: franklinic <franklin@ivorycloud.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * test: add comprehensive TrainingMonitoring module integration tests (#673) (#755) Add 92 integration tests for the TrainingMonitoring module covering: - TrainingMonitor<T>: session lifecycle, metric logging, progress tracking, speed stats, resource usage, issue detection, and data export - ResourceMonitor: lifecycle, snapshots, history, threshold alerts, events - ExperimentTracker: experiments, runs, parameters, metrics, artifacts, tags, deletion/restoration, persistence, and search - NotificationManager: services, sending, filtering, buffering, events - Dashboard implementations (ConsoleDashboard, HtmlDashboard, LiveDashboard): scalar/histogram logging, hyperparameters, confusion matrix, reports - Cross-module integration tests combining multiple components Also removes stale CLBlast project reference from test project. Co-authored-by: franklinic <franklin@ivorycloud.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * Add comprehensive integration tests for AiDotNet.Serving module Added 42 integration tests covering: - ServingOptions configuration defaults and custom values - StartupModel property validation - PerformanceMetrics recording, percentiles, and statistics - ContinuousBatchingStrategy concurrency and adaptive behavior - TimeoutBatchingStrategy timeout-based processing - SizeBatchingStrategy fixed-size batching - AdaptiveBatchingStrategy latency-based adaptation - BucketBatchingStrategy bucket index handling - Padding strategies (Minimal, Bucket, Fixed) data preservation - Configuration enum value verification Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: replace thread.sleep with deterministic timestamp in queue time test Instead of using Thread.Sleep(50) which is flaky under CI load, directly set GenerationStartedAt to a known offset from CreatedAt. This makes the test deterministic and asserts the exact expected duration instead of using >= comparison. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: use net471-compatible Enum.GetValues in serving tests Replace Enum.GetValues<T>() (NET 5+ only) with Enum.GetValues(typeof(T)).Cast<T>() for .NET Framework 4.7.1 compatibility. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: franklinic <franklin@ivorycloud.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>



Summary
Tests Added
PrototypeVector (26 tests)
PrototypeAdamOptimizer (12 tests)
SimpleLinearRegression (9 tests)
SimpleNeuralNetwork (11 tests)
Test plan
Closes #667
🤖 Generated with Claude Code