Skip to content

Documentation/refactor semopt api#301

Closed
Maximilian-Stefan-Ernst wants to merge 39 commits intodevelfrom
documentation/refactor_semopt_api
Closed

Documentation/refactor semopt api#301
Maximilian-Stefan-Ernst wants to merge 39 commits intodevelfrom
documentation/refactor_semopt_api

Conversation

@Maximilian-Stefan-Ernst
Copy link
Collaborator

No description provided.

alyst and others added 30 commits January 27, 2026 12:45
It is a simple and intuitive syntax and avoids declaring new types.
Also allow specifying default constraint tolerance as `constraint_tol`.
use SemOptimizer(engine = :NLopt) instead of SemOptimizerNLopt()
as this is a more universal scheme
It works around docstring errors during SemOptimizer{:E} parsing.
Instead of engine-specific subtype as it might be not available
in the user session.
since it moved from struct to ctor
### Constructor
############################################################################################

"""
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
"""
!isa(inequality_constraints, NamedTuple) ||


# fallback optimizer constructor when the engine E is not supported
SemOptimizer(::Val{E}, args...; kwargs...) where {E} = throw_engine_error(E)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
fit(SemOptimizer(; engine, kwargs...), model; start_val, kwargs...)

Comment on lines +59 to +60
Returns a vector of optimizer engines supported by the `engine` keyword argument of
the [`SemOptimizer`](@ref) constructor.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
Returns a vector of optimizer engines supported by the `engine` keyword argument of
the [`SemOptimizer`](@ref) constructor.
prepare_start_params(start_val, model::AbstractSem; kwargs...) = start_val(model; kwargs...)

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

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