change more hardcoded CPU counts to os.cpu_count()

This commit is contained in:
Tanushree Tunstall 2022-07-02 10:25:13 +01:00
parent b8653c6afe
commit 2fda32901b
4 changed files with 4 additions and 4 deletions

View file

@ -185,7 +185,7 @@ def CMLogoSkf(combined_df
, run_blind_test = True
, return_formatted_output = True
, random_state = 42
, n_jobs = 10
, n_jobs = os.cpu_count() # the number of jobs should equal the number of CPU cores
)
cD3_v2.to_csv(outFile)

View file

@ -112,7 +112,7 @@ def fsgs_rfecv(input_df
, resampling_type = 'none'
, verbose = 3
, random_state = 42
, n_jobs = 10
, n_jobs = os.cpu_count()
):
'''
returns

View file

@ -78,7 +78,7 @@ import itertools
from sklearn.model_selection import LeaveOneGroupOut
#%% GLOBALS
rs = {'random_state': 42}
njobs = {'n_jobs': 10}
njobs = {'n_jobs': os.cpu_count() } # the number of jobs should equal the number of CPU cores
scoring_fn = ({ 'mcc' : make_scorer(matthews_corrcoef)
, 'fscore' : make_scorer(f1_score)

View file

@ -152,7 +152,7 @@ def MultModelsCl_logo_skf(input_df
, run_blind_test = True
, return_formatted_output = True
, random_state = 42
, n_jobs = 10
, n_jobs = os.cpu_count() # the number of jobs should equal the number of CPU cores
, ):
'''