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
remove unsafe use of dictionary in multithreading #49
Conversation
Due to |
Not had a chance to review but I see CI is failing on julia 1.0 where there is no multi-threading. Something to do with reversion to Channels? |
This should be live now but will also require you to wait for #50 because the new MLJBase requires MLJModelInterface 0.3. Aaarrrgghhh.... |
Okay dev now has extended MLJModelInterface [compat]. Retriggering CI: |
@OkonSamuel Just a note that it is easier for me if you push your PR branches directly to github rather than basing the PR on a fork. You should have permission to do that. |
Noted |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@OkonSamuel Many thanks for this!
Merge when ready.
We can tag a release but the previous PR to General is stalled for some reason.
@ablaom before i merge let me drawn your attention to an issue i have been researching for some time now. This unfortunately showed up in the tests
see it here. |
@OkonSamuel Thank you very much indeed for looking into this. Unfortunately, I'm not sure what to add except that, as far as I know, I have not observed this and cannot reproduce the CI "failure" julia> versioninfo()
Julia Version 1.3.0
Commit 46ce4d7933 (2019-11-26 06:09 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin19.0.0)
CPU: Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, skylake)
Environment:
JULIA_PATH = /Applications/Julia-1.3.app/Contents/Resources/julia/bin/julia
JULIA_NUM_THREADS = 5 Had you observed this prior in commits prior to this PR? |
@ablaom. No. I Observed this sometime ago on my PC. julia> using Distributed
julia> addprocs(2)
julia> @everywhere using MLJ
#The module must be precompiled for error to occur below
julia> @everywhere logic = @load LogisticClassifier pkg=MLJLinearModels
julia> X = table(rand(10000,3));
julia> y = categorical(repeat(["up","no","yes","down"],outer=2500));
julia> mach = machine(logic, X, y)
julia> evaluate!(mach, acceleration = CPUThreads(), repeats=10, verbosity=1);
#At this point the warning should popup but won't stop the evaluation To get the warning to show up is tricky and you have to edit |
@ablaom. I think it's coming from |
Happy to wait for your experiements. Many thanks! |
@ablaom. I've implemented a fix here. |
I'm still happy for you to merge when ready. See my comment here: JuliaAI/MLJBase.jl#338 (comment) |
closes #48
I also reverted to using channels for Multithreading Threading reason being julia
Ctrl + C
cancellation doesn't yet work well for multithreading so i have to use channels for now to work around this.