From a394da24d0dda8fc740fa7c254034e21c7dbf5ea Mon Sep 17 00:00:00 2001 From: MilesCranmer Date: Fri, 20 Dec 2024 22:29:10 -0500 Subject: [PATCH] fix: ambiguity in target scitype --- src/MLJInterface.jl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/MLJInterface.jl b/src/MLJInterface.jl index 1cc34fe4..6dafa404 100644 --- a/src/MLJInterface.jl +++ b/src/MLJInterface.jl @@ -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