JuliaML / LIBSVM.jl

LIBSVM bindings for Julia
Other
88 stars 35 forks source link

ERROR: Package LIBSVM errored during testing (exit code: 3221226356) #103

Closed WuSiren closed 4 months ago

WuSiren commented 4 months ago

It reports an error when I test LIBSVM.

ERROR: Package LIBSVM errored during testing (exit code: 3221226356)
ablaom commented 4 months ago

@WuSiren Thanks for reporting, but could you please provide more context as below.

I am not able to reproduce the fail in this context:

julia> using Pkg; Pkg.status()
Status `/private/var/folders/4n/gvbmlhdc8xj973001s6vdyw00000gq/T/jl_e4ttWI/Project.toml`
  [b1bec4e5] LIBSVM v0.8.0

julia> versioninfo()
Julia Version 1.10.1
Commit 7790d6f0641 (2024-02-13 20:41 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (x86_64-apple-darwin22.4.0)
  CPU: 12 × Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, skylake)
Threads: 12 default, 0 interactive, 6 GC (on 12 virtual cores)
Environment:
  JULIA_LTS_PATH = /Applications/Julia-1.6.app/Contents/Resources/julia/bin/julia
  JULIA_PATH = /Applications/Julia-1.10.app/Contents/Resources/julia/bin/julia
  JULIA_EGLOT_PATH = /Applications/Julia-1.7.app/Contents/Resources/julia/bin/julia
  JULIA_NUM_THREADS = 12
  DYLD_LIBRARY_PATH = /usr/local/homebrew/Cellar/libomp/9.0.1/lib/
  JULIA_NIGHTLY_PATH = /Applications/Julia-1.10.app/Contents/Resources/julia/bin/julia
WuSiren commented 4 months ago

The version of LIBSVM is [b1bec4e5] LIBSVM v0.8.0, and Julia is

julia> versioninfo()
Julia Version 1.9.0
Commit 8e63055292 (2023-05-07 11:25 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 8 × Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, skylake)
  Threads: 1 on 8 virtual cores
Environment:
  JULIA_IMAGE_THREADS = 1
  JULIA_EDITOR = code
  JULIA_NUM_THREADS =
WuSiren commented 4 months ago

And I fail to run even the simplest example:

# Training data
X = [-2 -1 -1 1 1 2;
     -1 -1 -2 1 2 1]
y = [1, 1, 1, 2, 2, 2]

# Testing data
T = [-1 2 3;
     -1 2 2]

# Precomputed matrix for training (corresponds to linear kernel)
K = X' * X

model = svmtrain(K, y, kernel=Kernel.Precomputed)

The editor (VS Code) reports:

终端进程“D:\julia-1.9.0\bin\julia.exe '-i', '--banner=no', '--project=C:\Users\name\.julia\environments\v1.9', 'c:\Users\name\.vscode\extensions\julialang.language-julia-1.79.2\scripts\terminalserver\terminalserver.jl', '\\.\pipe\vsc-jl-repl-5cac0226-a4a5-4f21-91b5-e0ee54d3c58e', '\\.\pipe\vsc-jl-cr-3e861dda-aaa4-4e5c-af0f-f522cecfbe0b', 'USE_REVISE=false', 'USE_PLOTPANE=true', 'USE_PROGRESS=true', 'ENABLE_SHELL_INTEGRATION=true', 'DEBUG_MODE=false'”已终止,退出代码: -1073740940。
WuSiren commented 4 months ago

And nothing changes after I remove and reinstall this package.

WuSiren commented 4 months ago

It works well under Julia v1.10.3.

ablaom commented 4 months ago

This looks like a known Julia 1.9 issue, fixed in 1.10. See https://github.com/JuliaML/LIBSVM.jl/issues/95.

@barucden Do you think we should bump julia [compat] to 1.9? I don't know if there a plan for a backwards fix for julia 1.9.

WuSiren commented 4 months ago

OK, thank you very much! @ablaom 🤝

Anyway, I've upgraded to Julia1.10.

barucden commented 4 months ago

The fix (https://github.com/JuliaLang/julia/pull/50135) was backported and released with julia 1.9.2.

I am not against bumping the compatible julia version. An alternative might be to raise a warning for the affected users:

if Sys.iswindows() and (v"1.8.3" < VERSION < v"1.9.2")
    @warn "LIBSVM is known to error under the current Julia version. Consider upgrading to Julia 1.9.2 (see https://github.com/JuliaML/LIBSVM.jl/issues/95)."
end

(Speaking of bumping versions -- we haven't made a release (8.0.1) with the LIBLINEAR version bumped to 0.7. Should we release that?)

ablaom commented 4 months ago

Speaking of bumping versions -- we haven't made a release (8.0.1) with the LIBLINEAR version bumped to 0.7. Should we release that?

That would be nice.

The fix (https://github.com/JuliaLang/julia/pull/50135) was backported and released with julia 1.9.2.

Ah, thanks for that. I see @WuSiren was indeed using 1.9.0. In that case I don't think we need to take any further action and can close this. I think it's fair to assume users are using the latest patch of any package.

barucden commented 4 months ago

Alright. Closing as duplicate of #95.