-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fit!(estimator, X, y, test...)
method fails into infinite loops without test...
arguments
#59
Comments
fit!(estimator, X, y, test...)
method fails into infinite loopsfit!(estimator, X, y, test...)
method fails into infinite loops without test...
arguments
I'll need to review our tests for this, surprised it didn't show itself |
P.S. Thanks for reporting so quickly! |
Ok so, I have a comment, which is related (but the bug itself is still valid) I can (will) fix the hang (its not an infinite loop) by strongly typing the signature, but you will still not be able to pass julia> typeof(y)
CategoricalArray{Int64,1,UInt32,Int64,CategoricalValue{Int64,UInt32},Union{}}
julia> typeof(collect(y))
CategoricalArray{Int64,1,UInt32,Int64,CategoricalValue{Int64,UInt32},Union{}}
julia> That seems off to me -- maybe its by design by DataFrames authors but you'd need to check with them Reason why I found this is because we do have some tests which don't pass Anyway long story short is that I will emergency fix the hang by strongly typing the passthrough signatures, but there are some other, more subtle issues at play as well. Stand by for 0.3.1 release |
I'm putting a small investigative summary here for future reference (will not close this when fix is released) # ] add [email protected] [email protected]
using DataFrames, LightGBM
n = 3
X = DataFrame(A = rand(n), B = categorical(rand(1:10, n)))
y = categorical(rand(0:2, n))
lgbm_model = LGBMClassification(num_class = length(y.pool))
XX = Array(X)
yy = Int.(collect(y).refs)
LightGBM.fit!(lgbm_model, XX, yy, (XX, yy)) # test vectors with non categorical ys, LightGBM FFI vom, thats fine
LightGBM.fit!(lgbm_model, XX, y, (XX, yy)) # test vectors with categorical y, stackoverflow error, not fine
LightGBM.fit!(lgbm_model, XX, collect(y), (XX, yy)) # test vectors with categorical y, stackoverflow error, not fine
LightGBM.fit!(lgbm_model, XX, yy) # no test vectors, LightGBM FFI vom, is fine
LightGBM.fit!(lgbm_model, X, yy) # .... throws an error but cant even finish throwing "ERROR: " < nothing else
LightGBM.fit!(lgbm_model, Array(X), collect(y); verbosity=-1) # original reproducing case
|
0.3.1 has been released: JuliaRegistries/General#16152 |
@yalwan-iqvia thank for quick update ! |
MRE:
so I guess you maybe need to introduce some type piracy here
The text was updated successfully, but these errors were encountered: