Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added trait for checking derivative requirement #711 #643

Merged
merged 4 commits into from
Mar 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions src/alg_traits.jl
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,46 @@
"""
requiresconstraints(opt) = false

"""
requiresgradient(opt)

Trait declaration for whether an optimizer
requires gradient in `instantiate_function`.

Defaults to false.
"""
requiresgradient(opt) = false

Check warning on line 129 in src/alg_traits.jl

View check run for this annotation

Codecov / codecov/patch

src/alg_traits.jl#L129

Added line #L129 was not covered by tests

"""
requireshessian(opt)

Trait declaration for whether an optimizer
requires hessian in `instantiate_function`.

Defaults to false.
"""
requireshessian(opt) = false

Check warning on line 139 in src/alg_traits.jl

View check run for this annotation

Codecov / codecov/patch

src/alg_traits.jl#L139

Added line #L139 was not covered by tests

"""
requiresconsjac(opt)

Trait declaration for whether an optimizer
requires cons_j in `instantiate_function`, that is, does the optimizer require a constant Jacobian.

Defaults to false.
"""
requiresconsjac(opt) = false

Check warning on line 149 in src/alg_traits.jl

View check run for this annotation

Codecov / codecov/patch

src/alg_traits.jl#L149

Added line #L149 was not covered by tests

"""
requiresconshess(opt)

Trait declaration for whether an optimizer
requires cons_h in `instantiate_function`, that is, does the optimizer require a constant hessian.

Defaults to false.
"""
requiresconshess(opt) = false

Check warning on line 159 in src/alg_traits.jl

View check run for this annotation

Codecov / codecov/patch

src/alg_traits.jl#L159

Added line #L159 was not covered by tests

"""
allowscallback(opt)

Expand Down
Loading