-
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
Module files that import LightGBM fail to compile #71
Comments
Hi @msekino ! Thanks for taking the time to report this After a quick bit of digging it seems it is due to this: Line 21 in 47d9a87
I'll have to figure out why I did it and then stop doing it without breaking it. I will keep you up to date with this. Hopefully the fix can make it soon. |
I think I did it to stop this class of warnings appearing. However, it seems like its no consequence for me to remove this include from the init, which would fix the issue. I will go to MLJ project and see what I can do to suppress those warnings. I will try to come with a fix soon. |
@ablaom do you know what I might do in order to stop those warnings appearing? |
Yeah, I've also had problems using Maybe this helps: JuliaLang/julia#29059 . |
Sorry, I was a little unclear. I was asking because it occurs when I move it out of |
Oh, I see. This looks like a problem with MLJModelInterface.jl. My guess is there is an issue with Would be helpful to know if you get the warnings if you remove the module wrapping of the code in MLJlInterface.jl. If my suspicions are right, a solution for you might be to replace the calls to |
I managed to find this: Is it possible that is related? |
https://github.com/alan-turing-institute/MLJModelInterface.jl/blob/master/src/model_def.jl#L70 |
Yes that's it. Good catch. This needs to be evaluated in the module from where the @mlj_macro is called, which must according be passed to the function you point out as an argument. Working on a new release of MLJModelsInterface. Thanks for bringing this to my attention. |
@msekino When JuliaRegistries/General#22970 is merged, would you be so kind as to update your project env and confirm that my fix resolves your issue? |
Oh sorry. @yalwan-iqvia will first need to move the include out of |
@ablaom Thank you for your help! I just updated as follows.
I made a project "Example"
then, I wrote Example.jl
However,
I'm not sure what caused it. And I'm sorry if I'm doing something wrong... |
@msekino when this merge is complete JuliaRegistries/General#22979 it should hopefully resolve your issue. You will need to make sure to update to LightGBM.jl >= 0.3.2 |
@yalwan-iqvia @ablaom |
Thanks for reporting and thanks Anthony for the super quick response 😄 |
I'd like to use LightGBM in a module file.
I made a project "Example" and wrote a following code in Example.jl
using Example
resulted in the following.Temporarily, it is possible to avoid the error by putting
__precompile__(false)
to the beginning of the file, but it doesn't seem to be a very preferred solution.The text was updated successfully, but these errors were encountered: