@ablaom - I tried your code with the make_blobs()
and ScikitLearn
’s SVM and am getting the same error as before:
Error
┌ Error: Problem fitting the machine Machine{Resampler{CV},…}.
└ @ MLJBase ~/.julia/packages/MLJBase/u6vLz/src/machines.jl:533
[ Info: Running type checks...
[ Info: Type checks okay.
┌ Error: Problem fitting the machine Machine{DeterministicTunedModel{Grid,…},…}.
└ @ MLJBase ~/.julia/packages/MLJBase/u6vLz/src/machines.jl:533
[ Info: Running type checks...
[ Info: Type checks okay.
ERROR: LoadError: TypeError: in CategoricalValue, in T, expected T<:Union{AbstractChar, AbstractString, Number}, got Type{Any}
Stacktrace:
[1] argtypes_to_type
@ ./compiler/typeutils.jl:50 [inlined]
[2] abstract_call_known(interp::Core.Compiler.NativeInterpreter, f::Any, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState, max_methods::Int64)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1032
[3] abstract_call(interp::Core.Compiler.NativeInterpreter, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState, max_methods::Int64)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1056
[4] abstract_call(interp::Core.Compiler.NativeInterpreter, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1040
[5] abstract_eval_statement(interp::Core.Compiler.NativeInterpreter, e::Any, vtypes::Vector{Any}, sv::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1167
[6] typeinf_local(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1462
[7] typeinf_nocycle(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1520
[8] _typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/typeinfer.jl:214
[9] typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/typeinfer.jl:209
[10] typeinf_edge(interp::Core.Compiler.NativeInterpreter, method::Method, atypes::Any, sparams::Core.SimpleVector, caller::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/typeinfer.jl:806
[11] abstract_call_method(interp::Core.Compiler.NativeInterpreter, method::Method, sig::Any, sparams::Core.SimpleVector, hardlimit::Bool, sv::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:490
[12] abstract_call_gf_by_type(interp::Core.Compiler.NativeInterpreter, f::Any, argtypes::Vector{Any}, atype::Any, sv::Core.Compiler.InferenceState, max_methods::Int64)
@ Core.Compiler ./compiler/abstractinterpretation.jl:143
[13] abstract_call_known(interp::Core.Compiler.NativeInterpreter, f::Any, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState, max_methods::Int64)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1033
--- the last 11 lines are repeated 1 more time ---
[25] abstract_call(interp::Core.Compiler.NativeInterpreter, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState, max_methods::Int64)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1056
[26] abstract_call(interp::Core.Compiler.NativeInterpreter, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1040
[27] abstract_eval_statement(interp::Core.Compiler.NativeInterpreter, e::Any, vtypes::Vector{Any}, sv::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1167
[28] typeinf_local(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1462
[29] typeinf_nocycle(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1520
[30] _typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/typeinfer.jl:214
[31] typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/typeinfer.jl:209
[32] typeinf_edge(interp::Core.Compiler.NativeInterpreter, method::Method, atypes::Any, sparams::Core.SimpleVector, caller::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/typeinfer.jl:806
[33] abstract_call_method(interp::Core.Compiler.NativeInterpreter, method::Method, sig::Any, sparams::Core.SimpleVector, hardlimit::Bool, sv::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:490
[34] abstract_call_gf_by_type(interp::Core.Compiler.NativeInterpreter, f::Any, argtypes::Vector{Any}, atype::Any, sv::Core.Compiler.InferenceState, max_methods::Int64)
@ Core.Compiler ./compiler/abstractinterpretation.jl:143
[35] abstract_call(interp::Core.Compiler.NativeInterpreter, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState, max_methods::Int64)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1054
[36] abstract_call(interp::Core.Compiler.NativeInterpreter, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1040
[37] abstract_eval_statement(interp::Core.Compiler.NativeInterpreter, e::Any, vtypes::Vector{Any}, sv::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1167
[38] typeinf_local(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1462
[39] typeinf_nocycle(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1520
[40] _typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/typeinfer.jl:214
[41] typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/typeinfer.jl:209
[42] typeinf_edge(interp::Core.Compiler.NativeInterpreter, method::Method, atypes::Any, sparams::Core.SimpleVector, caller::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/typeinfer.jl:806
[43] abstract_call_method(interp::Core.Compiler.NativeInterpreter, method::Method, sig::Any, sparams::Core.SimpleVector, hardlimit::Bool, sv::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:490
[44] abstract_call_gf_by_type(interp::Core.Compiler.NativeInterpreter, f::Any, argtypes::Vector{Any}, atype::Any, sv::Core.Compiler.InferenceState, max_methods::Int64)
@ Core.Compiler ./compiler/abstractinterpretation.jl:143
[45] abstract_call_known(interp::Core.Compiler.NativeInterpreter, f::Any, fargs::Nothing, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState, max_methods::Int64)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1033
[46] abstract_call(interp::Core.Compiler.NativeInterpreter, fargs::Nothing, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState, max_methods::Int64)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1056
[47] abstract_apply(interp::Core.Compiler.NativeInterpreter, itft::Any, aft::Any, aargtypes::Vector{Any}, sv::Core.Compiler.InferenceState, max_methods::Int64)
@ Core.Compiler ./compiler/abstractinterpretation.jl:738
[48] abstract_call_known(interp::Core.Compiler.NativeInterpreter, f::Any, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState, max_methods::Int64)
@ Core.Compiler ./compiler/abstractinterpretation.jl:952
[49] abstract_call(interp::Core.Compiler.NativeInterpreter, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState, max_methods::Int64)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1056
[50] abstract_call(interp::Core.Compiler.NativeInterpreter, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1040
[51] abstract_eval_statement(interp::Core.Compiler.NativeInterpreter, e::Any, vtypes::Vector{Any}, sv::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1167
[52] typeinf_local(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1462
[53] typeinf_nocycle(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1520
[54] _typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/typeinfer.jl:214
[55] typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/typeinfer.jl:209
[56] typeinf_edge(interp::Core.Compiler.NativeInterpreter, method::Method, atypes::Any, sparams::Core.SimpleVector, caller::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/typeinfer.jl:806
[57] abstract_call_method(interp::Core.Compiler.NativeInterpreter, method::Method, sig::Any, sparams::Core.SimpleVector, hardlimit::Bool, sv::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:490
[58] abstract_call_gf_by_type(interp::Core.Compiler.NativeInterpreter, f::Any, argtypes::Vector{Any}, atype::Any, sv::Core.Compiler.InferenceState, max_methods::Int64)
@ Core.Compiler ./compiler/abstractinterpretation.jl:143
[59] abstract_call_known(interp::Core.Compiler.NativeInterpreter, f::Any, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState, max_methods::Int64)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1033
[60] abstract_call(interp::Core.Compiler.NativeInterpreter, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState, max_methods::Int64)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1056
[61] abstract_call(interp::Core.Compiler.NativeInterpreter, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1040
[62] abstract_eval_statement(interp::Core.Compiler.NativeInterpreter, e::Any, vtypes::Vector{Any}, sv::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1167
[63] typeinf_local(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1462
[64] typeinf_nocycle(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1520
[65] _typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/typeinfer.jl:214
[66] typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/typeinfer.jl:209
[67] typeinf_edge(interp::Core.Compiler.NativeInterpreter, method::Method, atypes::Any, sparams::Core.SimpleVector, caller::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/typeinfer.jl:806
[68] abstract_call_method(interp::Core.Compiler.NativeInterpreter, method::Method, sig::Any, sparams::Core.SimpleVector, hardlimit::Bool, sv::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:490
[69] abstract_call_gf_by_type(interp::Core.Compiler.NativeInterpreter, f::Any, argtypes::Vector{Any}, atype::Any, sv::Core.Compiler.InferenceState, max_methods::Int64)
@ Core.Compiler ./compiler/abstractinterpretation.jl:143
[70] abstract_call(interp::Core.Compiler.NativeInterpreter, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState, max_methods::Int64)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1054
[71] abstract_call(interp::Core.Compiler.NativeInterpreter, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1040
[72] abstract_eval_statement(interp::Core.Compiler.NativeInterpreter, e::Any, vtypes::Vector{Any}, sv::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1167
[73] typeinf_local(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1462
[74] typeinf_nocycle(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1520
[75] _typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/typeinfer.jl:214
[76] typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/typeinfer.jl:209
[77] typeinf_edge(interp::Core.Compiler.NativeInterpreter, method::Method, atypes::Any, sparams::Core.SimpleVector, caller::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/typeinfer.jl:806
[78] abstract_call_method(interp::Core.Compiler.NativeInterpreter, method::Method, sig::Any, sparams::Core.SimpleVector, hardlimit::Bool, sv::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:490
[79] abstract_call_gf_by_type(interp::Core.Compiler.NativeInterpreter, f::Any, argtypes::Vector{Any}, atype::Any, sv::Core.Compiler.InferenceState, max_methods::Int64)
@ Core.Compiler ./compiler/abstractinterpretation.jl:143
[80] abstract_call_known(interp::Core.Compiler.NativeInterpreter, f::Any, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState, max_methods::Int64)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1033
[81] abstract_call(interp::Core.Compiler.NativeInterpreter, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState, max_methods::Int64)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1056
--- the last 11 lines are repeated 1 more time ---
[93] abstract_apply(interp::Core.Compiler.NativeInterpreter, itft::Any, aft::Any, aargtypes::Vector{Any}, sv::Core.Compiler.InferenceState, max_methods::Int64)
@ Core.Compiler ./compiler/abstractinterpretation.jl:738
[94] abstract_call_known(interp::Core.Compiler.NativeInterpreter, f::Any, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState, max_methods::Int64)
@ Core.Compiler ./compiler/abstractinterpretation.jl:952
[95] abstract_call(interp::Core.Compiler.NativeInterpreter, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState, max_methods::Int64)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1056
[96] abstract_call(interp::Core.Compiler.NativeInterpreter, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1040
[97] abstract_eval_statement(interp::Core.Compiler.NativeInterpreter, e::Any, vtypes::Vector{Any}, sv::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1167
[98] typeinf_local(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1462
[99] typeinf_nocycle(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1520
[100] _typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/typeinfer.jl:214
[101] typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/typeinfer.jl:209
[102] typeinf_edge(interp::Core.Compiler.NativeInterpreter, method::Method, atypes::Any, sparams::Core.SimpleVector, caller::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/typeinfer.jl:806
[103] abstract_call_method(interp::Core.Compiler.NativeInterpreter, method::Method, sig::Any, sparams::Core.SimpleVector, hardlimit::Bool, sv::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:490
[104] abstract_call_gf_by_type(interp::Core.Compiler.NativeInterpreter, f::Any, argtypes::Vector{Any}, atype::Any, sv::Core.Compiler.InferenceState, max_methods::Int64)
@ Core.Compiler ./compiler/abstractinterpretation.jl:143
[105] abstract_call_known(interp::Core.Compiler.NativeInterpreter, f::Any, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState, max_methods::Int64)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1033
--- the last 11 lines are repeated 1 more time ---
[117] abstract_call(interp::Core.Compiler.NativeInterpreter, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState, max_methods::Int64)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1056
[118] abstract_call(interp::Core.Compiler.NativeInterpreter, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1040
[119] abstract_eval_statement(interp::Core.Compiler.NativeInterpreter, e::Any, vtypes::Vector{Any}, sv::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1167
[120] typeinf_local(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1462
[121] typeinf_nocycle(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1520
[122] _typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/typeinfer.jl:214
[123] typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/typeinfer.jl:209
[124] typeinf_edge(interp::Core.Compiler.NativeInterpreter, method::Method, atypes::Any, sparams::Core.SimpleVector, caller::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/typeinfer.jl:806
[125] abstract_call_method(interp::Core.Compiler.NativeInterpreter, method::Method, sig::Any, sparams::Core.SimpleVector, hardlimit::Bool, sv::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:490
[126] abstract_call_gf_by_type(interp::Core.Compiler.NativeInterpreter, f::Any, argtypes::Vector{Any}, atype::Any, sv::Core.Compiler.InferenceState, max_methods::Int64)
@ Core.Compiler ./compiler/abstractinterpretation.jl:143
[127] abstract_call(interp::Core.Compiler.NativeInterpreter, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState, max_methods::Int64)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1054
[128] abstract_call(interp::Core.Compiler.NativeInterpreter, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1040
[129] abstract_eval_statement(interp::Core.Compiler.NativeInterpreter, e::Any, vtypes::Vector{Any}, sv::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1167
[130] typeinf_local(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1462
[131] typeinf_nocycle(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1520
[132] _typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/typeinfer.jl:214
[133] typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/typeinfer.jl:209
[134] typeinf_edge(interp::Core.Compiler.NativeInterpreter, method::Method, atypes::Any, sparams::Core.SimpleVector, caller::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/typeinfer.jl:806
[135] abstract_call_method(interp::Core.Compiler.NativeInterpreter, method::Method, sig::Any, sparams::Core.SimpleVector, hardlimit::Bool, sv::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:490
[136] abstract_call_gf_by_type(interp::Core.Compiler.NativeInterpreter, f::Any, argtypes::Vector{Any}, atype::Any, sv::Core.Compiler.InferenceState, max_methods::Int64)
@ Core.Compiler ./compiler/abstractinterpretation.jl:143
[137] abstract_call_known(interp::Core.Compiler.NativeInterpreter, f::Any, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState, max_methods::Int64)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1033
[138] abstract_call(interp::Core.Compiler.NativeInterpreter, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState, max_methods::Int64)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1056
[139] abstract_call(interp::Core.Compiler.NativeInterpreter, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1040
[140] abstract_eval_statement(interp::Core.Compiler.NativeInterpreter, e::Any, vtypes::Vector{Any}, sv::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1167
[141] typeinf_local(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1447
[142] typeinf_nocycle(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/abstractinterpretation.jl:1520
[143] _typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/typeinfer.jl:214
[144] typeinf(interp::Core.Compiler.NativeInterpreter, frame::Core.Compiler.InferenceState)
@ Core.Compiler ./compiler/typeinfer.jl:209
[145] typeinf
@ ./compiler/typeinfer.jl:8 [inlined]
[146] typeinf_type(interp::Core.Compiler.NativeInterpreter, method::Method, atypes::Any, sparams::Core.SimpleVector)
@ Core.Compiler ./compiler/typeinfer.jl:914
[147] return_type(interp::Core.Compiler.NativeInterpreter, f::Any, t::Any)
@ Core.Compiler ./compiler/typeinfer.jl:963
[148] return_type(f::Any, t::Any, world::UInt64)
@ Core.Compiler ./compiler/typeinfer.jl:950
[149] return_type(f::Any, t::Any)
@ Core.Compiler ./compiler/typeinfer.jl:947
[150] macro expansion
@ ./array.jl:652 [inlined]
[151] dict_with_eltype(DT_apply::F, kv::Base.Generator, t::Any) where F
@ Base ./abstractdict.jl:541
[152] Dict(kv::Any)
@ Base ./dict.jl:129
[153] (::MLJBase.var"#fit_and_extract_on_fold#299")(mach::Any, k::Any)
@ MLJBase ~/.julia/packages/MLJBase/u6vLz/src/resampling.jl:1086
[154] (::MLJBase.var"#276#277")(k::Any)
@ MLJBase ~/.julia/packages/MLJBase/u6vLz/src/resampling.jl:927
[155] mapreduce_impl(f::Any, op::Any, A::Union{Base.AbstractBroadcasted, AbstractArray}, ifirst::Integer, ilast::Integer, blksize::Int64)
@ Base ./reduce.jl:242
[156] mapreduce_impl(f::Function, op::Function, A::UnitRange{Int64}, ifirst::Int64, ilast::Int64)
@ Base ./reduce.jl:257
[157] _mapreduce(f::Any, op::Any, #unused#::IndexLinear, A::Union{Base.AbstractBroadcasted, AbstractArray})
@ Base ./reduce.jl:415
[158] _mapreduce_dim(f::Function, op::Function, #unused#::Base._InitialValue, A::UnitRange{Int64}, #unused#::Colon)
@ Base ./reducedim.jl:318
[159] #mapreduce#672
@ ./reducedim.jl:310 [inlined]
[160] mapreduce(f::Function, op::Function, A::UnitRange{Int64})
@ Base ./reducedim.jl:310
[161] _evaluate!(func::Any, mach::Any, #unused#::CPU1, nfolds::Any, verbosity::Any)
@ MLJBase ~/.julia/packages/MLJBase/u6vLz/src/resampling.jl:926
[162] evaluate!(mach::Machine{MLJScikitLearnInterface.SVMClassifier, true}, resampling::Vector{Tuple{Vector{Int64}, UnitRange{Int64}}}, weights::Nothing, class_weights::Nothing, rows::Nothing, verbosity::Int64, repeats::Int64, measures::Vector{Accuracy}, operations::Vector{typeof(predict)}, acceleration::CPU1{Nothing}, force::Bool)
@ MLJBase ~/.julia/packages/MLJBase/u6vLz/src/resampling.jl:1121
[163] evaluate!(::Machine{MLJScikitLearnInterface.SVMClassifier, true}, ::CV, ::Nothing, ::Nothing, ::Nothing, ::Int64, ::Int64, ::Vector{Accuracy}, ::Vector{typeof(predict)}, ::CPU1{Nothing}, ::Bool)
@ MLJBase ~/.julia/packages/MLJBase/u6vLz/src/resampling.jl:1188
[164] fit(::Resampler{CV}, ::Int64, ::Tables.MatrixTable{Matrix{Float64}}, ::CategoricalVector{Int64, UInt32, Int64, CategoricalValue{Int64, UInt32}, Union{}})
@ MLJBase ~/.julia/packages/MLJBase/u6vLz/src/resampling.jl:1332
[165] fit_only!(mach::Machine{Resampler{CV}, false}; rows::Nothing, verbosity::Int64, force::Bool)
@ MLJBase ~/.julia/packages/MLJBase/u6vLz/src/machines.jl:531
[166] #fit!#103
@ ~/.julia/packages/MLJBase/u6vLz/src/machines.jl:598 [inlined]
[167] event!(metamodel::MLJScikitLearnInterface.SVMClassifier, resampling_machine::Machine{Resampler{CV}, false}, verbosity::Int64, tuning::Grid, history::Nothing, state::NamedTuple{(:models, :fields, :parameter_scales, :models_delivered), Tuple{Vector{MLJScikitLearnInterface.SVMClassifier}, Vector{Symbol}, Vector{Symbol}, Bool}})
@ MLJTuning ~/.julia/packages/MLJTuning/bjRHJ/src/tuned_models.jl:390
[168] #35
@ ~/.julia/packages/MLJTuning/bjRHJ/src/tuned_models.jl:428 [inlined]
[169] iterate
@ ./generator.jl:47 [inlined]
[170] _collect(c::Vector{MLJScikitLearnInterface.SVMClassifier}, itr::Base.Generator{Vector{MLJScikitLearnInterface.SVMClassifier}, MLJTuning.var"#35#36"{Machine{Resampler{CV}, false}, Int64, Grid, Nothing, NamedTuple{(:models, :fields, :parameter_scales, :models_delivered), Tuple{Vector{MLJScikitLearnInterface.SVMClassifier}, Vector{Symbol}, Vector{Symbol}, Bool}}, ProgressMeter.Progress}}, #unused#::Base.EltypeUnknown, isz::Base.HasShape{1})
@ Base ./array.jl:691
[171] collect_similar
@ ./array.jl:606 [inlined]
[172] map
@ ./abstractarray.jl:2294 [inlined]
[173] assemble_events!(metamodels::Vector{MLJScikitLearnInterface.SVMClassifier}, resampling_machine::Machine{Resampler{CV}, false}, verbosity::Int64, tuning::Grid, history::Nothing, state::NamedTuple{(:models, :fields, :parameter_scales, :models_delivered), Tuple{Vector{MLJScikitLearnInterface.SVMClassifier}, Vector{Symbol}, Vector{Symbol}, Bool}}, acceleration::CPU1{Nothing})
@ MLJTuning ~/.julia/packages/MLJTuning/bjRHJ/src/tuned_models.jl:427
[174] build!(history::Nothing, n::Int64, tuning::Grid, model::MLJScikitLearnInterface.SVMClassifier, model_buffer::Channel{Any}, state::NamedTuple{(:models, :fields, :parameter_scales, :models_delivered), Tuple{Vector{MLJScikitLearnInterface.SVMClassifier}, Vector{Symbol}, Vector{Symbol}, Bool}}, verbosity::Int64, acceleration::CPU1{Nothing}, resampling_machine::Machine{Resampler{CV}, false})
@ MLJTuning ~/.julia/packages/MLJTuning/bjRHJ/src/tuned_models.jl:620
[175] fit(::MLJTuning.DeterministicTunedModel{Grid, MLJScikitLearnInterface.SVMClassifier}, ::Int64, ::Tables.MatrixTable{Matrix{Float64}}, ::CategoricalVector{Int64, UInt32, Int64, CategoricalValue{Int64, UInt32}, Union{}})
@ MLJTuning ~/.julia/packages/MLJTuning/bjRHJ/src/tuned_models.jl:699
[176] fit_only!(mach::Machine{MLJTuning.DeterministicTunedModel{Grid, MLJScikitLearnInterface.SVMClassifier}, true}; rows::Nothing, verbosity::Int64, force::Bool)
@ MLJBase ~/.julia/packages/MLJBase/u6vLz/src/machines.jl:531
[177] fit_only!
@ ~/.julia/packages/MLJBase/u6vLz/src/machines.jl:484 [inlined]
[178] #fit!#103
@ ~/.julia/packages/MLJBase/u6vLz/src/machines.jl:598 [inlined]
[179] fit!(mach::Machine{MLJTuning.DeterministicTunedModel{Grid, MLJScikitLearnInterface.SVMClassifier}, true})
@ MLJBase ~/.julia/packages/MLJBase/u6vLz/src/machines.jl:596
Code
SVMClassifier = @load SVMClassifier pkg=ScikitLearn
svm_model = SVMClassifier()
r_svm = range(svm_model, :C, values=[0.25, 0.5, 1])
self_tuning_svm = TunedModel(model=svm_model,
resampling=CV(nfolds=10),
repeats=5,
tuning=Grid(),
range=r_svm,
measure=accuracy)
X, y_svm = make_blobs();
svm = machine(self_tuning_svm, X, y_svm)
MLJ.fit!(svm)
SVM fitting works fine with LIBSVM. Code is as follows:
SVMClassifier = @load SVC pkg=LIBSVM
svm_model = SVMClassifier()
r_svm = range(svm_model, :cost, values=[0.25, 0.5, 1])
self_tuning_svm = TunedModel(model=svm_model,
resampling=CV(nfolds=10),
repeats=5,
tuning=Grid(),
range=r_svm,
measure=accuracy)
X, y_svm = make_blobs();
svm = machine(self_tuning_svm, X, y_svm)
MLJ.fit!(svm)