Skip to content

fix: validate model optimization options#18

Merged
kholdrex merged 1 commit into
mainfrom
fix/validate-model-options
Jun 6, 2026
Merged

fix: validate model optimization options#18
kholdrex merged 1 commit into
mainfrom
fix/validate-model-options

Conversation

@kholdrex
Copy link
Copy Markdown
Member

@kholdrex kholdrex commented Jun 5, 2026

Summary

Validate model optimization options before fitting so invalid numerical settings fail fast with clear ArgumentError messages. This prevents silent no-op, non-finite, or unstable configurations from reaching the Rasch, 2PL, and 3PL optimization loops.

Changes

  • Add shared optimization option validation for model constructors.
  • Reject non-positive or non-finite tolerances and learning rates, invalid decay factors, non-integer iteration counts, and complex/string/nil values.
  • Add shared specs covering invalid option values across Rasch, 2PL, and 3PL models.

Test Plan

  • RSpec suite passed.
  • RuboCop passed with no offenses.
  • Gem build passed.

@kholdrex kholdrex merged commit f83cff6 into main Jun 6, 2026
5 checks passed
@kholdrex kholdrex deleted the fix/validate-model-options branch June 6, 2026 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant