Skip to content

Commit 1ad64ea

Browse files
committed
fix: include validation context in meta-learning errors
1 parent ed77d2f commit 1ad64ea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/MetaLearning/Trainers/MetaLearnerBase.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@ protected MetaLearnerBase(
110110
throw new ArgumentNullException(nameof(config), "Configuration cannot be null");
111111

112112
if (config.NumMetaIterations < 1)
113-
throw new ArgumentException("Invalid meta-iterations: NumMetaIterations must be at least 1.", nameof(config));
113+
throw new ArgumentException("Configuration validation failed: invalid meta-iterations (NumMetaIterations must be at least 1).", nameof(config));
114114
if (config.MetaBatchSize < 1)
115-
throw new ArgumentException("Invalid meta-batch size: MetaBatchSize must be at least 1.", nameof(config));
115+
throw new ArgumentException("Configuration validation failed: invalid meta-batch size (MetaBatchSize must be at least 1).", nameof(config));
116116
if (config.InnerSteps < 1)
117-
throw new ArgumentException("Invalid inner steps: InnerSteps must be at least 1.", nameof(config));
117+
throw new ArgumentException("Configuration validation failed: invalid inner steps (InnerSteps must be at least 1).", nameof(config));
118118

119119
if (!config.IsValid())
120120
throw new ArgumentException("Configuration validation failed.", nameof(config));

0 commit comments

Comments
 (0)