Skip to content

Commit

Permalink
temporarily use static scheduler for multithreaded CV #53
Browse files Browse the repository at this point in the history
  • Loading branch information
biona001 committed Jun 11, 2023
1 parent 1121112 commit c43c18e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "MendelIHT"
uuid = "921c7187-1484-5754-b919-5d3ed9ac03c4"
keywords = ["GWAS", "Genome-wide association studies", "feature selection", "iterative hard thresholding"]
authors = ["Benjamin Chu <benchu99@hotmail.com>", "Kevin Keys <kevin.keys@ucsf.edu>"]
version = "1.4.10"
version = "1.4.11"

[deps]
BGEN = "6db4b851-9beb-4b83-9d64-eb1cfb37721d"
Expand All @@ -20,7 +20,6 @@ Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
SnpArrays = "4e780e97-f5bf-4111-9dc4-b70aaf691b06"
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
ThreadPools = "b189fb0b-2eb5-4ed4-bc0c-d34c51242431"
VCFTools = "a620830f-fdd7-5ebc-8d26-3621ab35fbfe"

[compat]
Expand All @@ -36,7 +35,6 @@ Reexport = "1"
SnpArrays = "0.3.15"
SpecialFunctions = "1, 2"
StatsBase = "0.33, 0.34"
ThreadPools = "2"
VCFTools = "0.2"
julia = "1.5, 1.6"

Expand Down
1 change: 0 additions & 1 deletion src/MendelIHT.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ module MendelIHT
using DelimitedFiles
using ProgressMeter
using Reexport
using ThreadPools
using BGEN

@reexport using Distributions
Expand Down
2 changes: 1 addition & 1 deletion src/cross_validation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function cv_iht(
# cross validate. TODO: wrap pmap with batch_size keyword to enable distributed CV
combinations = allocate_fold_and_k(q, path)
mses = zeros(length(combinations))
ThreadPools.@qthreads for i in 1:length(combinations)
Threads.@threads :static for i in eachindex(combinations)
fold, sparsity = combinations[i]

# assign train/test indices
Expand Down

2 comments on commit c43c18e

@biona001
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/85294

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.4.11 -m "<description of version>" c43c18e5a9619f7a5de4d9ca37910521e96b298a
git push origin v1.4.11

Please sign in to comment.