Skip to content

Commit

Permalink
use all cpus
Browse files Browse the repository at this point in the history
  • Loading branch information
dsethz committed Nov 9, 2024
1 parent 7b35ca2 commit b187094
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/nuclai/models/train_lr_rf.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def main():
grid_lr = ParameterGrid(param_grid_lr)
for params in grid_lr:
try:
lr = LogisticRegression(max_iter=10000, **params)
lr = LogisticRegression(max_iter=10000, n_jobs=-1, **params)
lr.fit(data_train, labels_train)
# Save the model
penalty = params["penalty"]
Expand All @@ -110,7 +110,7 @@ def main():
grid_rf = ParameterGrid(param_grid_rf)
for params in grid_rf:
try:
rf = RandomForestClassifier(**params)
rf = RandomForestClassifier(n_jobs=-1, **params)
rf.fit(data_train, labels_train)
# Save the model
n_estimators = params["n_estimators"]
Expand Down

0 comments on commit b187094

Please sign in to comment.