Skip to content

Commit d06e191

Browse files
authored
Merge pull request #143 from RomeoV/main
Change default parallel executor to `ThreadedEx`
2 parents 2677a73 + cc508f6 commit d06e191

File tree

5 files changed

+4
-8
lines changed

5 files changed

+4
-8
lines changed

Project.toml

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
name = "MLUtils"
22
uuid = "f1d291b0-491e-4a28-83b9-f70985020b54"
33
authors = ["Carlo Lucibello <[email protected]> and contributors"]
4-
version = "0.4.2"
4+
version = "0.4.3"
55

66
[deps]
77
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
88
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
99
DataAPI = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
1010
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
1111
FLoops = "cc61a311-1640-44b5-9fba-1b764f453329"
12-
FoldsThreads = "9c68100b-dfe1-47cf-94c8-95104e173443"
1312
NNlib = "872c559c-99b0-510c-b3b7-b6c96a88d5cd"
1413
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1514
ShowCases = "605ecd9f-84a6-4c9e-81e2-4798472b76a3"
@@ -25,7 +24,6 @@ Compat = "4.2"
2524
DataAPI = "1.0"
2625
DelimitedFiles = "1.0"
2726
FLoops = "0.2"
28-
FoldsThreads = "0.1"
2927
NNlib = "0.8"
3028
ShowCases = "0.1"
3129
SimpleTraits = "0.9"

src/MLUtils.jl

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ using Statistics
55
using ShowCases: ShowLimit
66
using FLoops: @floop
77
using FLoops.Transducers: Executor, ThreadedEx
8-
using FoldsThreads: TaskPoolEx
98
import StatsBase: sample
109
using Transducers
1110
using Tables

src/parallel.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ end
7373
# since `ThreadedEx` has shown to be more performant. This may
7474
# change in the future.
7575
# See PR 33 https://github.com/JuliaML/MLUtils.jl/pull/33
76-
_default_executor() = TaskPoolEx(basesize=1, background=Threads.nthreads() > 1)
76+
_default_executor() = ThreadedEx()
7777

7878

7979
# ## Internals

test/parallel.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
@test length(unique(X_)) == 10
99
end
1010

11-
@testset "With `TaskPoolEx`" begin
12-
iter = eachobsparallel(collect(1:10); executor = TaskPoolEx())
11+
@testset "With `ThreadedEx`" begin
12+
iter = eachobsparallel(collect(1:10); executor = ThreadedEx())
1313
@test_nowarn for i in iter end
1414
X_ = collect(iter)
1515
@test all(x 1:10 for x in X_)

test/runtests.jl

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ using SparseArrays
66
using Random, Statistics
77
using Test
88
using Transducers
9-
using FoldsThreads: TaskPoolEx
109
using ChainRulesTestUtils: test_rrule
1110
using Zygote: ZygoteRuleConfig
1211
using ChainRulesCore: rrule_via_ad

0 commit comments

Comments
 (0)