Skip to content

Commit 35b9264

Browse files
authored
Minor renaming
1 parent 7173df4 commit 35b9264

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

example/example_parallel.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
pass
2222

2323

24-
def run_spawn_classifier(X_train, y_train):
24+
def get_spawn_classifier(X_train, y_train):
2525
def spawn_classifier(seed, dataset_name):
2626
"""Spawn a subprocess.
2727
@@ -69,9 +69,9 @@ def spawn_classifier(seed, dataset_name):
6969
sklearn.model_selection.train_test_split(X, y, random_state=1)
7070

7171
processes = []
72-
f = run_spawn_classifier(X_train, y_train)
72+
spawn_classifier = get_spawn_classifier(X_train, y_train)
7373
for i in range(4): # set this at roughly half of your cores
74-
p = multiprocessing.Process(target=f, args=(i, 'digits'))
74+
p = multiprocessing.Process(target=spawn_classifier, args=(i, 'digits'))
7575
p.start()
7676
processes.append(p)
7777
for p in processes:

0 commit comments

Comments
 (0)