@@ -122,7 +122,7 @@ def __init__(self, project,
122122 raise MljarException ('Wrong validation_train_split parameter value, it should be in (0.05, 0.95) range.' )
123123
124124
125- def fit (self , X , y , validation_data = None , wait_till_all_done = True ):
125+ def fit (self , X , y , validation_data = None , wait_till_all_done = True , dataset_title = None ):
126126 '''
127127 Fit models with MLJAR engine.
128128 Args:
@@ -132,6 +132,8 @@ def fit(self, X, y, validation_data = None, wait_till_all_done = True):
132132 the k-fold CV or train split validation will be used.
133133 wait_till_all_done: The flag which decides if fit function will wait
134134 till experiment is done.
135+ dataset_title: The title of your dataset. It is optional. If missing the
136+ random title will be generated.
135137 '''
136138 self .wait_till_all_done = wait_till_all_done
137139 # check input data dimensions
@@ -141,12 +143,12 @@ def fit(self, X, y, validation_data = None, wait_till_all_done = True):
141143 raise IncorrectInputDataException ('Sorry, there is a missmatch between X and y matrices shapes' )
142144
143145 try :
144- self ._start_experiment (X , y , validation_data )
146+ self ._start_experiment (X , y , validation_data , dataset_title )
145147 except Exception as e :
146148 print 'Ups, %s' % str (e )
147149
148150
149- def _start_experiment (self , X , y , validation_data = None ):
151+ def _start_experiment (self , X , y , validation_data = None , dataset_title = None ):
150152
151153 # define project task
152154 self .project_task = 'bin_class' if len (np .unique (y )) == 2 else 'reg'
@@ -159,7 +161,7 @@ def _start_experiment(self, X, y, validation_data = None):
159161 # add a dataset to project
160162 #
161163 logger .info ('MLJAR: add training dataset' )
162- self .dataset = DatasetClient (self .project .hid ).add_dataset_if_not_exists (X , y , title_prefix = 'Training-' )
164+ self .dataset = DatasetClient (self .project .hid ).add_dataset_if_not_exists (X , y , title_prefix = 'Training-' , dataset_title = dataset_title )
163165
164166 self .dataset_vald = None
165167 if validation_data is not None :
0 commit comments