Skip to content

Commit 39201c1

Browse files
committed
Fixes
1 parent e8afdfa commit 39201c1

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/instantiate.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,6 @@ function _instantiate_and_check(optimizer_constructor::OptimizerWithAttributes)
124124
return optimizer
125125
end
126126

127-
struct IfIncrementalInterfaceNotSupported{T} end
128-
129127
"""
130128
instantiate(
131129
optimizer_constructor,
@@ -179,10 +177,11 @@ function instantiate(
179177
end
180178
optimizer = _instantiate_and_check(optimizer_constructor)
181179
if !isnothing(with_bridge_type) && isnothing(with_cache_type)
182-
with_cache_type = T
180+
with_cache_type = with_bridge_type
183181
cache_only_if_incremental_interface_not_supported = true
184182
end
185-
if cache_only_if_incremental_interface_not_supported && !supports_incremental_interface(optimizer)
183+
if cache_only_if_incremental_interface_not_supported &&
184+
!supports_incremental_interface(optimizer)
186185
with_cache_type = nothing
187186
cache = default_cache(optimizer, with_cache_type)
188187
optimizer = Utilities.CachingOptimizer(cache, optimizer)

0 commit comments

Comments
 (0)