Closed IanButterworth closed 1 year ago
Base: 96.94% // Head: 97.26% // Increases project coverage by +0.31%
:tada:
Coverage data is based on head (
8ab238a
) compared to base (e9ac70b
). Patch has no changes to coverable lines.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
@ViralBShah good to go ahead with this, and remove SparseArrays from the sysimage once bumped on julia master? (I don't have merge rights here)
good to go ahead with this
Didn't we find out that extensions didn't work right now for stdlibs? To me, it only makes sense to merge this once Statistics.jl is not an stdlib?
It seemed to work for me, so I think we should try this
Okay, let's go with this then. Thanks for testing!
Unfortunately this fails if I bump Statistics to the latest commit on Julia master. And indeed even after using SparseArrays
, the cov
method defined in the extension isn't used for some reason.
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.11.0-DEV.473 (2023-09-15)
_/ |\__'_|_|_|\__'_| | Commit 42d98a2ed14* (0 days old master)
|__/ |
julia> Base.runtests(["Statistics"])
Running parallel tests with:
nworkers() = 1
nthreads() = 1
Sys.CPU_THREADS = 4
Sys.total_memory() = 15.282 GiB
Sys.free_memory() = 7.305 GiB
Test (Worker) | Time (s) | GC (s) | GC % | Alloc (MB) | RSS (MB)
Statistics (1) | started at 2023-09-15T19:57:33.267
Statistics (1) | failed at 2023-09-15T19:58:48.347
Test Failed at /home/milan/Dev/julia/usr/share/julia/stdlib/v1.11/Statistics/test/runtests.jl:963
Expression: isfinite.(cov_sparse) == isfinite.(cov_dense)
Evaluated: sparse([1, 2, 3, 4, 5, 6, 7, 8, 9, 10 … 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1 … 10, 10, 10, 10, 10, 10, 10, 10, 10, 10], Bool[0, 1, 0, 0, 0, 1, 1, 0, 0, 0 … 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], 10, 10) == Bool[0 0 … 0 0; 0 1 … 1 1; … ; 0 1 … 1 1; 0 1 … 1 1]
Test Failed at /home/milan/Dev/julia/usr/share/julia/stdlib/v1.11/Statistics/test/runtests.jl:964
Expression: isfinite.(cov_sparse) == isfinite.(cov_dense)
Evaluated: sparse([1, 2, 3, 4, 5, 6, 7, 8, 9, 10 … 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1 … 10, 10, 10, 10, 10, 10, 10, 10, 10, 10], Bool[0, 1, 0, 0, 0, 1, 1, 0, 0, 0 … 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], 10, 10) == Bool[0 0 … 0 0; 0 1 … 1 1; … ; 0 1 … 1 1; 0 1 … 1 1]
Test Failed at /home/milan/Dev/julia/usr/share/julia/stdlib/v1.11/Statistics/test/runtests.jl:963
Expression: isfinite.(cov_sparse) == isfinite.(cov_dense)
Evaluated: sparse([1, 2, 3, 4, 5, 6, 7, 8, 9, 10 … 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1 … 10, 10, 10, 10, 10, 10, 10, 10, 10, 10], Bool[0, 1, 0, 0, 0, 1, 1, 0, 0, 0 … 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], 10, 10) == Bool[0 0 … 0 0; 0 1 … 1 1; … ; 0 1 … 1 1; 0 1 … 1 1]
Test Failed at /home/milan/Dev/julia/usr/share/julia/stdlib/v1.11/Statistics/test/runtests.jl:964
Expression: isfinite.(cov_sparse) == isfinite.(cov_dense)
Evaluated: sparse([1, 2, 3, 4, 5, 6, 7, 8, 9, 10 … 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1 … 10, 10, 10, 10, 10, 10, 10, 10, 10, 10], Bool[0, 1, 0, 0, 0, 1, 1, 0, 0, 0 … 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], 10, 10) == Bool[0 0 … 0 0; 0 1 … 1 1; … ; 0 1 … 1 1; 0 1 … 1 1]
Test Failed at /home/milan/Dev/julia/usr/share/julia/stdlib/v1.11/Statistics/test/runtests.jl:963
Expression: isfinite.(cov_sparse) == isfinite.(cov_dense)
Evaluated: sparse([1, 2, 3, 4, 5, 6, 7, 8, 9, 10 … 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1 … 10, 10, 10, 10, 10, 10, 10, 10, 10, 10], Bool[0, 1, 0, 0, 0, 1, 1, 0, 0, 0 … 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], 10, 10) == Bool[0 0 … 0 0; 0 1 … 1 1; … ; 0 1 … 1 1; 0 1 … 1 1]
Test Failed at /home/milan/Dev/julia/usr/share/julia/stdlib/v1.11/Statistics/test/runtests.jl:964
Expression: isfinite.(cov_sparse) == isfinite.(cov_dense)
Evaluated: sparse([1, 2, 3, 4, 5, 6, 7, 8, 9, 10 … 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1 … 10, 10, 10, 10, 10, 10, 10, 10, 10, 10], Bool[0, 1, 0, 0, 0, 1, 1, 0, 0, 0 … 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], 10, 10) == Bool[0 0 … 0 0; 0 1 … 1 1; … ; 0 1 … 1 1; 0 1 … 1 1]
Test Failed at /home/milan/Dev/julia/usr/share/julia/stdlib/v1.11/Statistics/test/runtests.jl:963
Expression: isfinite.(cov_sparse) == isfinite.(cov_dense)
Evaluated: sparse([1, 2, 3, 4, 5, 6, 7, 8, 9, 10 … 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1 … 10, 10, 10, 10, 10, 10, 10, 10, 10, 10], Bool[0, 1, 0, 0, 0, 1, 1, 0, 0, 0 … 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], 10, 10) == Bool[0 0 … 0 0; 0 1 … 1 1; … ; 0 1 … 1 1; 0 1 … 1 1]
Test Failed at /home/milan/Dev/julia/usr/share/julia/stdlib/v1.11/Statistics/test/runtests.jl:964
Expression: isfinite.(cov_sparse) == isfinite.(cov_dense)
Evaluated: sparse([1, 2, 3, 4, 5, 6, 7, 8, 9, 10 … 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1 … 10, 10, 10, 10, 10, 10, 10, 10, 10, 10], Bool[0, 1, 0, 0, 0, 1, 1, 0, 0, 0 … 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], 10, 10) == Bool[0 0 … 0 0; 0 1 … 1 1; … ; 0 1 … 1 1; 0 1 … 1 1]
Test Failed at /home/milan/Dev/julia/usr/share/julia/stdlib/v1.11/Statistics/test/runtests.jl:978
Expression: isfinite.(cov_sparse) == isfinite.(cov_dense)
Evaluated: sparse([1, 2, 3, 4, 5, 6, 7, 8, 9, 10 … 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1 … 10, 10, 10, 10, 10, 10, 10, 10, 10, 10], Bool[0, 0, 0, 0, 0, 1, 1, 0, 0, 0 … 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 10, 10) == Bool[0 0 … 0 0; 0 0 … 0 0; … ; 0 0 … 1 1; 0 0 … 1 1]
Test Failed at /home/milan/Dev/julia/usr/share/julia/stdlib/v1.11/Statistics/test/runtests.jl:979
Expression: isfinite.(cov_sparse) == isfinite.(cov_dense)
Evaluated: sparse([1, 2, 3, 4, 5, 6, 7, 8, 9, 10 … 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1 … 10, 10, 10, 10, 10, 10, 10, 10, 10, 10], Bool[0, 0, 0, 0, 0, 1, 1, 0, 0, 0 … 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 10, 10) == Bool[0 0 … 0 0; 0 0 … 0 0; … ; 0 0 … 1 1; 0 0 … 1 1]
Test Failed at /home/milan/Dev/julia/usr/share/julia/stdlib/v1.11/Statistics/test/runtests.jl:978
Expression: isfinite.(cov_sparse) == isfinite.(cov_dense)
Evaluated: sparse([1, 2, 3, 4, 5, 6, 7, 8, 9, 10 … 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1 … 10, 10, 10, 10, 10, 10, 10, 10, 10, 10], Bool[0, 0, 0, 0, 0, 1, 1, 0, 0, 0 … 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 10, 10) == Bool[0 0 … 0 0; 0 0 … 0 0; … ; 0 0 … 1 1; 0 0 … 1 1]
Test Failed at /home/milan/Dev/julia/usr/share/julia/stdlib/v1.11/Statistics/test/runtests.jl:979
Expression: isfinite.(cov_sparse) == isfinite.(cov_dense)
Evaluated: sparse([1, 2, 3, 4, 5, 6, 7, 8, 9, 10 … 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1 … 10, 10, 10, 10, 10, 10, 10, 10, 10, 10], Bool[0, 0, 0, 0, 0, 1, 1, 0, 0, 0 … 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 10, 10) == Bool[0 0 … 0 0; 0 0 … 0 0; … ; 0 0 … 1 1; 0 0 … 1 1]
Test Summary: | Pass Fail Total Time
Overall | 821 12 833 1m16.5s
Statistics | 821 12 833 1m15.7s
FAILURE
The global RNG seed was 0x7eb6b98a471ff52f1a5a23d7acd773bb.
@nalimilan, I think this is fixed now with https://github.com/JuliaLang/julia/pull/52428
Uses the recently merged https://github.com/JuliaLang/julia/pull/47695 to set up SparseArrays as a weak dependency of Statistics, via a package extension.
All code was copied across to the package extension untouched, with the addition of some imports.
This is backwards compatible. On older julia versions that don't support package extensions, SparseArrays will be loaded as per normal.
What this would look like on julia master, if SparseArrays is removed from the sysimage
cc. @KristofferC