Skip to content

Comments

Update loss checks#309

Merged
Maximilian-Stefan-Ernst merged 2 commits intoStructuralEquationModels:develfrom
alyst:update_loss_check
Feb 20, 2026
Merged

Update loss checks#309
Maximilian-Stefan-Ernst merged 2 commits intoStructuralEquationModels:develfrom
alyst:update_loss_check

Conversation

@alyst
Copy link
Contributor

@alyst alyst commented Feb 19, 2026

The PR slightly tweaks the recently introduced checks that the SEM loss function uses the compatible SemObserved object:

  • Instead of throwing an error, it allows using SemObservedMissing for SemML and SemWLS, but shows a warning that approximate cov/mean will be used.
    In my use cases it is actually unfeasible to use FIML, because of the large number of observed vars and missing patterns, but EM-based approximation works quite well with SemML
  • The missingness check in SemObservedData is tweaked to avoid generating temporary array, which could be quite large
  • The messages introduced by these checks are multiline and contain indentation + they respect the indentation of the surrounding code.
    The correct way to define such messages is to use indented """ strings -- the indentation of """ is subtracted from the string indentation, so they are not overindented when printed.
  • I have also switched to the pipe syntax for these messages, because it results in fewer indentations + potentially more readable overall

@codecov
Copy link

codecov bot commented Feb 19, 2026

Codecov Report

❌ Patch coverage is 33.33333% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.68%. Comparing base (1f8d2a9) to head (03b2048).
⚠️ Report is 30 commits behind head on devel.

Files with missing lines Patch % Lines
src/loss/WLS/WLS.jl 33.33% 2 Missing ⚠️
src/loss/ML/ML.jl 0.00% 1 Missing ⚠️
src/observed/data.jl 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            devel     #309      +/-   ##
==========================================
- Coverage   71.83%   71.68%   -0.16%     
==========================================
  Files          51       51              
  Lines        2223     2239      +16     
==========================================
+ Hits         1597     1605       +8     
- Misses        626      634       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Maximilian-Stefan-Ernst
Copy link
Collaborator

Thank you! Also good to know about the indentation behaviour.

@Maximilian-Stefan-Ernst Maximilian-Stefan-Ernst merged commit 36b88e6 into StructuralEquationModels:devel Feb 20, 2026
2 of 5 checks passed
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.

2 participants