Error with tuning the non-tunable models (e.g. PCA) fixed
Now, if the fine_tune method of the model in node returns None (e.g PCA, it means that the model can not be tuned), the whole chain tuning fails.
Example:
Traceback (most recent call last): File "C:\Program Files\JetBrains\PyCharm 2019.3.1\plugins\python\helpers\pydev\pydevd.py", line 1434, in _exec pydev_imports.execfile(file, globals, locals) # execute the script File "C:\Program Files\JetBrains\PyCharm 2019.3.1\plugins\python\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "D:\PycharmProjects\new fed\FEDOT\cases\credit_scoring_problem_multiobj.py", line 102, in run_credit_scoring_problem(full_path_train, full_path_test, is_visualise=True) File "D:\PycharmProjects\new fed\FEDOT\cases\credit_scoring_problem_multiobj.py", line 74, in run_credit_scoring_problem iterations=50) File "D:\PycharmProjects\new fed\FEDOT\fedot\core\composer\chain.py", line 122, in fine_tune_primary_nodes node.fine_tune(input_data, max_lead_time=max_lead_time, iterations=iterations) File "D:\PycharmProjects\new fed\FEDOT\fedot\core\composer\node.py", line 157, in fine_tune iterations=iterations) File "D:\PycharmProjects\new fed\FEDOT\fedot\core\models\model.py", line 135, in fine_tune predict_train = self.predict(fitted_model, data) File "D:\PycharmProjects\new fed\FEDOT\fedot\core\models\model.py", line 104, in predict predict_data=prepared_data) File "D:\PycharmProjects\new fed\FEDOT\fedot\core\models\evaluation\data_evaluation.py", line 97, in predict return self._model_specific_predict(trained_model, predict_data) File "D:\PycharmProjects\new fed\FEDOT\fedot\core\models\evaluation\data_evaluation.py", line 74, in predict_pca return pca_model.transform(predict_data.features)[:, :(pca_model.last_component_ind + 1)] AttributeError: 'NoneType' object has no attribute 'transform'
Fixed by raising of intermediate exception. Also, the stability of the tuning test is improved.