Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Orange/evaluation/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,9 @@ def _is_picklable(obj):
# multiprocessing (otherwise it shits itself at least on Windos)
mp_queue = mp_ctx.Manager().Queue() if n_jobs > 1 else mp.Queue()
except (EOFError, RuntimeError):
raise RuntimeError('''
mp_queue = mp.Queue()
n_jobs = 1
warnings.warn('''

Can't run multiprocessing code without a __main__ guard.

Expand All @@ -365,8 +367,8 @@ def _is_picklable(obj):
recursion ensues.

Guard your executed code with above Python idiom, or pass n_jobs=1
to evaluation methods, i.e. {}(..., n_jobs=1).
'''.format(self.__class__.__name__)) from None
to evaluation methods, i.e. {}(..., n_jobs=1). Setting n_jobs to 1.
'''.format(self.__class__.__name__), OrangeWarning)

data_splits = (
(fold_i, self.preprocessor(train_data[train_i]), test_data[test_i])
Expand Down
4 changes: 2 additions & 2 deletions Orange/widgets/classify/owlogisticregression.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ def add_main_layout(self):
gui.widgetLabel(box2, "Weak").setStyleSheet("margin-top:6px")
gui.hSlider(box2, self, "C_index",
minValue=0, maxValue=len(self.C_s) - 1,
callback=self.set_c, createLabel=False)
callback=lambda: (self.set_c(), self.settings_changed()),
createLabel=False)
gui.widgetLabel(box2, "Strong").setStyleSheet("margin-top:6px")
box2 = gui.hBox(box)
box2.layout().setAlignment(Qt.AlignCenter)
Expand All @@ -58,7 +59,6 @@ def set_c(self):
self.C = self.C_s[self.C_index]
fmt = "C={}" if self.C >= 1 else "C={:.3f}"
self.c_label.setText(fmt.format(self.C))
self.settings_changed()

def create_learner(self):
penalty = ["l1", "l2"][self.penalty_type]
Expand Down
1 change: 0 additions & 1 deletion Orange/widgets/regression/owlinearregression.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ def add_bottom_buttons(self):
self.layout().setSizeConstraint(QLayout.SetFixedSize)
self.alpha_slider.setEnabled(self.reg_type != self.OLS)
self.l1_ratio_slider.setEnabled(self.reg_type == self.Elastic)
self.commit()

def handleNewSignals(self):
self.commit()
Expand Down