We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7173df4 commit 35b9264Copy full SHA for 35b9264
example/example_parallel.py
@@ -21,7 +21,7 @@
21
pass
22
23
24
-def run_spawn_classifier(X_train, y_train):
+def get_spawn_classifier(X_train, y_train):
25
def spawn_classifier(seed, dataset_name):
26
"""Spawn a subprocess.
27
@@ -69,9 +69,9 @@ def spawn_classifier(seed, dataset_name):
69
sklearn.model_selection.train_test_split(X, y, random_state=1)
70
71
processes = []
72
- f = run_spawn_classifier(X_train, y_train)
+ spawn_classifier = get_spawn_classifier(X_train, y_train)
73
for i in range(4): # set this at roughly half of your cores
74
- p = multiprocessing.Process(target=f, args=(i, 'digits'))
+ p = multiprocessing.Process(target=spawn_classifier, args=(i, 'digits'))
75
p.start()
76
processes.append(p)
77
for p in processes:
0 commit comments