-
-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Overview
This issue serves as the master epic for tracking the implementation of the entire Meta-Learning Suite. It consolidates the required features into a high-level checklist, with each item linking to a separate, highly-detailed implementation plan (a "sub-epic").
Implementation Plan
Epic 1: Data Abstractions
Goal: Build the foundational data loaders required for all meta-learning tasks.
- [Episodic Data Abstractions for Meta-Learning (N-way K-shot) #290] Episodic Data Abstractions: Implement the
EpisodicDataLoaderfor N-way, K-shot task sampling. This is the critical first step.
Epic 2: Baseline Algorithms
Goal: Implement well-established meta-learning algorithms to serve as performance baselines.
- [Implement Reptile Baseline for Meta-Learning Benchmarks #292] Implement Reptile: Implement the simple and efficient first-order Reptile meta-learning algorithm.
- [Implement MAML Baseline for Meta-Learning Benchmarks #291] Implement MAML: Implement the powerful, gradient-based Model-Agnostic Meta-Learning algorithm.
Epic 3: Advanced Algorithm
Goal: Implement the state-of-the-art SEAL algorithm.
- [Implement SEAL Meta-Learning Algorithm (Core Integration) #289] Implement SEAL: Implement the SEAL meta-learning algorithm, which combines self-supervision and active learning for improved few-shot performance.
Epic 4: Documentation & Examples
Goal: Ensure the new meta-learning suite is accessible, understandable, and easy to use.
- [Documentation and Examples for Meta-Learning #288] Documentation and Examples: Create runnable examples for each trainer and write a comprehensive markdown document explaining the concepts and APIs.
Future Work (Out of Scope for this Epic)
The following algorithms were considered during the initial investigation but are not part of the initial implementation. They may be prioritized in the future.
- iMAML (Implicit MAML)
- ALFA (Adaptive Layer-wise First-order Approximation)
- Meta-SGD
⚠️ CRITICAL ARCHITECTURAL REQUIREMENTS
Before implementing this user story, you MUST review:
- 📋 Full Requirements:
.github/USER_STORY_ARCHITECTURAL_REQUIREMENTS.md - 📐 Project Rules:
.github/PROJECT_RULES.md
Mandatory Implementation Checklist
1. INumericOperations Usage (CRITICAL)
- Include
protected static readonly INumericOperations<T> NumOps = MathHelper.GetNumericOperations<T>();in base class - NEVER hardcode
double,float, or specific numeric types - use genericT - NEVER use
default(T)- useNumOps.Zeroinstead - Use
NumOps.Zero,NumOps.One,NumOps.FromDouble()for values - Use
NumOps.Add(),NumOps.Multiply(), etc. for arithmetic - Use
NumOps.LessThan(),NumOps.GreaterThan(), etc. for comparisons
2. Inheritance Pattern (REQUIRED)
- Create
I{FeatureName}.csinsrc/Interfaces/(root level, NOT subfolders) - Create
{FeatureName}Base.csinsrc/{FeatureArea}/inheriting from interface - Create concrete classes inheriting from Base class (NOT directly from interface)
3. PredictionModelBuilder Integration (REQUIRED)
- Add private field:
private I{FeatureName}<T>? _{featureName};toPredictionModelBuilder.cs - Add Configure method taking ONLY interface (no parameters):
public IPredictionModelBuilder<T, TInput, TOutput> Configure{FeatureName}(I{FeatureName}<T> {featureName}) { _{featureName} = {featureName}; return this; }
- Use feature in
Build()with default:var {featureName} = _{featureName} ?? new Default{FeatureName}<T>(); - Verify feature is ACTUALLY USED in execution flow
4. Beginner-Friendly Defaults (REQUIRED)
- Constructor parameters with defaults from research/industry standards
- Document WHY each default was chosen (cite papers/standards)
- Validate parameters and throw
ArgumentExceptionfor invalid values
5. Property Initialization (CRITICAL)
- NEVER use
default!operator - String properties:
= string.Empty; - Collections:
= new List<T>();or= new Vector<T>(0); - Numeric properties: appropriate default or
NumOps.Zero
6. Class Organization (REQUIRED)
- One class/enum/interface per file
- ALL interfaces in
src/Interfaces/(root level) - Namespace mirrors folder structure (e.g.,
src/Regularization/→namespace AiDotNet.Regularization)
7. Documentation (REQUIRED)
- XML documentation for all public members
-
<b>For Beginners:</b>sections with analogies and examples - Document all
<param>,<returns>,<exception>tags - Explain default value choices
8. Testing (REQUIRED)
- Minimum 80% code coverage
- Test with multiple numeric types (double, float)
- Test default values are applied correctly
- Test edge cases and exceptions
- Integration tests for PredictionModelBuilder usage
See full details: .github/USER_STORY_ARCHITECTURAL_REQUIREMENTS.md