JuliaAI / JuliaAI/DecisionTree.jl

Julia crashes when using decision tree for random forest regressions

Open
#118 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
364
Forks
100
PR merge metrics
No merged PRs in 30d

Description

I am trying to learn a random forest regressor with decision trees and scikitlearn packages, however, my Julia crashes during the run. This is the error I get:

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x1f1aae7 -- getindex at .\array.jl:789 [inlined]
macro expansion at C:\Users\Reza.juliapro\JuliaPro_v1.4.1-1\packages\DecisionTree\wpdwP\src\regression\tree.jl:201 [inlined]
macro expansion at .\simdloop.jl:77 [inlined]
_split! at C:\Users\Reza.juliapro\JuliaPro_v1.4.1-1\packages\DecisionTree\wpdwP\src\regression\tree.jl:200
in expression starting at C:\Users\Reza\Documents\GitHub\RL_scratch\run_pvenv.jl:17
getindex at .\array.jl:789 [inlined]
macro expansion at C:\Users\Reza.juliapro\JuliaPro_v1.4.1-1\packages\DecisionTree\wpdwP\src\regression\tree.jl:201 [inlined]
macro expansion at .\simdloop.jl:77 [inlined]
_split! at C:\Users\Reza.juliapro\JuliaPro_v1.4.1-1\packages\DecisionTree\wpdwP\src\regression\tree.jl:200
_fit at C:\Users\Reza.juliapro\JuliaPro_v1.4.1-1\packages\DecisionTree\wpdwP\src\regression\tree.jl:283
#fit#1 at C:\Users\Reza.juliapro\JuliaPro_v1.4.1-1\packages\DecisionTree\wpdwP\src\regression\tree.jl:329
fit##kw at C:\Users\Reza.juliapro\JuliaPro_v1.4.1-1\packages\DecisionTree\wpdwP\src\regression\tree.jl:314
#build_tree#32 at C:\Users\Reza.juliapro\JuliaPro_v1.4.1-1\packages\DecisionTree\wpdwP\src\regression\main.jl:35
build_tree##kw at C:\Users\Reza.juliapro\JuliaPro_v1.4.1-1\packages\DecisionTree\wpdwP\src\regression\main.jl:27
unknown function (ip: 0000000001F167F2)
#34 at C:\Users\julia\AppData\Local\Julia-1.4.1\share\julia\stdlib\v1.4\Distributed\src\macros.jl:290
#135 at C:\Users\julia\AppData\Local\Julia-1.4.1\share\julia\stdlib\v1.4\Distributed\src\remotecall.jl:350 [inlined]
run_work_thunk at C:\Users\julia\AppData\Local\Julia-1.4.1\share\julia\stdlib\v1.4\Distributed\src\process_messages.jl:79
#remotecall_fetch#140 at C:\Users\julia\AppData\Local\Julia-1.4.1\share\julia\stdlib\v1.4\Distributed\src\remotecall.jl:375 [inlined]
remotecall_fetch at C:\Users\julia\AppData\Local\Julia-1.4.1\share\julia\stdlib\v1.4\Distributed\src\remotecall.jl:375 [inlined]
#remotecall_fetch#144 at C:\Users\julia\AppData\Local\Julia-1.4.1\share\julia\stdlib\v1.4\Distributed\src\remotecall.jl:417 [inlined]
remotecall_fetch at C:\Users\julia\AppData\Local\Julia-1.4.1\share\julia\stdlib\v1.4\Distributed\src\remotecall.jl:417 [inlined]
#155 at C:\Users\julia\AppData\Local\Julia-1.4.1\share\julia\stdlib\v1.4\Distributed\src\macros.jl:270
jl_apply at /cygdrive/d/buildbot/worker/package_win64/build/src\julia.h:1700 [inlined]
start_task at /cygdrive/d/buildbot/worker/package_win64/build/src\task.c:687
Allocations: 2787883355 (Pool: 2777953729; Big: 9929626); GC: 878

I have tried using different APIs (Atom, JuliaPro, Jupyter), different Julia versions (1.05,1.3 and 1.4), different Decisiontree.jl versions but none worked. The issue seems to happen randomly. For example, the same issue happened during the development of my code 2 weeks ago but it disappeared. But it has emerged again stronger and makes Julia crash during the running. This is another instance of the report for different code settings:

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x201adb7 -- <= at .\float.jl:460 [inlined]
partition! at C:\Users\Reza.juliapro\JuliaPro_v1.4.1-1\packages\DecisionTree\wpdwP\src\util.jl:59 [inlined]
_split! at C:\Users\Reza.juliapro\JuliaPro_v1.4.1-1\packages\DecisionTree\wpdwP\src\regression\tree.jl:213
in expression starting at C:\Users\Reza\Documents\GitHub\RL_scratch\run_pvenv.jl:17
<= at .\float.jl:460 [inlined]
partition! at C:\Users\Reza.juliapro\JuliaPro_v1.4.1-1\packages\DecisionTree\wpdwP\src\util.jl:59 [inlined]
_split! at C:\Users\Reza.juliapro\JuliaPro_v1.4.1-1\packages\DecisionTree\wpdwP\src\regression\tree.jl:213
_fit at C:\Users\Reza.juliapro\JuliaPro_v1.4.1-1\packages\DecisionTree\wpdwP\src\regression\tree.jl:283
#fit#1 at C:\Users\Reza.juliapro\JuliaPro_v1.4.1-1\packages\DecisionTree\wpdwP\src\regression\tree.jl:329
fit##kw at C:\Users\Reza.juliapro\JuliaPro_v1.4.1-1\packages\DecisionTree\wpdwP\src\regression\tree.jl:314
#build_tree#32 at C:\Users\Reza.juliapro\JuliaPro_v1.4.1-1\packages\DecisionTree\wpdwP\src\regression\main.jl:35
build_tree##kw at C:\Users\Reza.juliapro\JuliaPro_v1.4.1-1\packages\DecisionTree\wpdwP\src\regression\main.jl:27
unknown function (ip: 00000000020167F2)
#34 at C:\Users\julia\AppData\Local\Julia-1.4.1\share\julia\stdlib\v1.4\Distributed\src\macros.jl:290
#135 at C:\Users\julia\AppData\Local\Julia-1.4.1\share\julia\stdlib\v1.4\Distributed\src\remotecall.jl:350 [inlined]
run_work_thunk at C:\Users\julia\AppData\Local\Julia-1.4.1\share\julia\stdlib\v1.4\Distributed\src\process_messages.jl:79
#remotecall_fetch#140 at C:\Users\julia\AppData\Local\Julia-1.4.1\share\julia\stdlib\v1.4\Distributed\src\remotecall.jl:375 [inlined]
remotecall_fetch at C:\Users\julia\AppData\Local\Julia-1.4.1\share\julia\stdlib\v1.4\Distributed\src\remotecall.jl:375 [inlined]
#remotecall_fetch#144 at C:\Users\julia\AppData\Local\Julia-1.4.1\share\julia\stdlib\v1.4\Distributed\src\remotecall.jl:417 [inlined]
remotecall_fetch at C:\Users\julia\AppData\Local\Julia-1.4.1\share\julia\stdlib\v1.4\Distributed\src\remotecall.jl:417 [inlined]
#155 at C:\Users\julia\AppData\Local\Julia-1.4.1\share\julia\stdlib\v1.4\Distributed\src\macros.jl:270
jl_apply at /cygdrive/d/buildbot/worker/package_win64/build/src\julia.h:1700 [inlined]
start_task at /cygdrive/d/buildbot/worker/package_win64/build/src\task.c:687
Allocations: 5348696670 (Pool: 5321605138; Big: 27091532); GC: 1837

julia> versioninfo()
Julia Version 1.4.1
Commit 381693d3df* (2020-04-14 17:20 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-8.0.1 (ORCJIT, skylake)
Environment:
JULIA_DEPOT_PATH = C:\Users\Reza.juliapro\JuliaPro_v1.4.1-1;C:\Users\Reza\AppData\Local\JuliaPro-1.4.1-1\Julia-1.4.1\local\share\julia;C:\Users\Reza\AppData\Local\JuliaPro-1.4.1-1\Julia-1.4.1\share\julia
JULIA_EDITOR = "C:\Users\Reza\AppData\Local\JuliaPro-1.4.1-1\app-1.45.0\atom.exe" -a
JULIA_NUM_THREADS = 4
JULIA_PKG_SERVER = pkg.juliacomputing.com

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report points to src/regression/tree.jl at lines 200, 201, 213, 283, 314, and 329, src/util.jl:59, and run_pvenv.jl:17 as the caller. First obtain a minimal reproducible random-forest regression case on the reported Windows and Julia setup, then inspect those stack frames. Done means the case no longer crashes and a regression test covers it; no input data or runnable reproduction is supplied.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.