Skip to content

Commit

Permalink
fix: ambiguity in target scitype
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Dec 21, 2024
1 parent 110f1ae commit a394da2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/MLJInterface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -622,12 +622,14 @@ MMI.metadata_model(
human_name="Multi-Target Symbolic Regression via Evolutionary Search",
)

function MMI.target_scitype(::Type{<:SRRegressor{<:Any,<:Any,<:TemplateExpression}})
function MMI.target_scitype(
::Type{<:SRRegressor{D,L,E}}
) where {D<:AbstractDimensions,L,E<:TemplateExpression}
return AbstractVector{<:Any}
end
function MMI.target_scitype(
::Type{<:MultitargetSRRegressor{<:Any,<:Any,<:TemplateExpression}}
)
::Type{<:MultitargetSRRegressor{D,L,E}}
) where {D<:AbstractDimensions,L,E<:TemplateExpression}
return Union{MMI.Table(Any),AbstractMatrix{<:Any}}
end

Expand Down

0 comments on commit a394da2

Please sign in to comment.