Skip to content

Commit

Permalink
fix cosmetic
Browse files Browse the repository at this point in the history
  • Loading branch information
jamartinh committed Jan 7, 2016
1 parent 99cf109 commit fa1cf42
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions orangecontrib/spark/base/spark_ml_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class OWSparkTransformer(SharedSparkContext):
box_text = None
get_modules = get_transformers
saved_gui_params = Setting(OrderedDict())
var_cache_check = Setting(False)

def __init__(self):
super().__init__()
Expand Down Expand Up @@ -79,6 +80,7 @@ def __init__(self):
self.refresh_method(self.gui_parameters['method'].get_value())

self.action_box = gui.widgetBox(self.box)
self.cache_check = gui.checkBox(self.action_box, self, value = 'var_cache_check', label = 'cache output DataFrame?')
# Action Button
self.create_sc_btn = gui.button(self.action_box, self, label = 'Apply', callback = self.apply)

Expand Down Expand Up @@ -129,6 +131,9 @@ def apply(self):
paramMap = self.build_param_map(method_instance)

self.out_df = method_instance.transform(self.in_df, params = paramMap)
if self.var_cache_check:
self.out_df = self.out_df.cache()

self.send("DataFrame", self.out_df)
self.update_saved_gui_parameters()
self.hide()

0 comments on commit fa1cf42

Please sign in to comment.