Skip to content

Commit faa7293

Browse files
committed
add comment for removing nr_thread in liblinear-multicore options
1 parent d4725e5 commit faa7293

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libmultilabel/linear/linear.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ def init_trainer(
131131
num_instances, num_classes = cls.y.shape
132132
num_features = cls.x.shape[1]
133133
cls.prob = problem(np.ones((num_instances,)), cls.x)
134+
135+
# remove "-m nr_thread" from options to prevent nested multi-threading
134136
cls.param = parameter(re.sub(r"-m\s+\d+", "", options))
135137
if cls.param.solver_type in [solver_names.L2R_L1LOSS_SVC_DUAL, solver_names.L2R_L2LOSS_SVC_DUAL]:
136138
cls.param.w_recalc = True # only works for solving L1/L2-SVM dual

0 commit comments

Comments
 (0)