Skip to content

Commit

Permalink
Always have context in MultiModel
Browse files Browse the repository at this point in the history
  • Loading branch information
moyner committed Nov 20, 2024
1 parent 318c1ac commit 2094596
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/core_types/core_types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,17 @@ struct MultiModel{label, T, CT, G, C, GL} <: AbstractMultiModel{label}
group_lookup::GL
end

function MultiModel(models, label::Union{Nothing, Symbol} = nothing; cross_terms = Vector{CrossTermPair}(), groups = nothing, context = nothing, reduction = missing, specialize = false, specialize_ad = false)
function MultiModel(models, label::Union{Nothing, Symbol} = nothing;
cross_terms = Vector{CrossTermPair}(),
groups = nothing,
context = nothing,
reduction = missing,
specialize = false,
specialize_ad = false
)
if isnothing(context)
context = models[first(keys(models))].context
end
group_lookup = Dict{Symbol, Int}()
if isnothing(groups)
num_groups = 1
Expand Down

0 comments on commit 2094596

Please sign in to comment.