From 6abf58d96d503adc80769a9bda7c3199c318ea31 Mon Sep 17 00:00:00 2001 From: Piotrek Date: Fri, 27 Nov 2020 12:47:05 +0100 Subject: [PATCH] add traceback to errors report (#252) --- supervised/base_automl.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/supervised/base_automl.py b/supervised/base_automl.py index c6bc3748..e91052d8 100644 --- a/supervised/base_automl.py +++ b/supervised/base_automl.py @@ -6,6 +6,7 @@ import numpy as np import pandas as pd import logging +import traceback from tabulate import tabulate from abc import ABC from copy import deepcopy @@ -613,7 +614,7 @@ def _apply_constraints(self): self._validation_strategy = { "validation_type": "split", "train_ratio": 0.9, - "shuffle": True + "shuffle": True, } if self._get_ml_task() != REGRESSION: self._validation_strategy["stratify"] = True @@ -811,7 +812,9 @@ def _fit(self, X, y): params["final_loss"] = self._models[-1].get_final_loss() params["train_time"] = self._models[-1].get_train_time() except Exception as e: - self._update_errors_report(params.get("name"), str(e)) + self._update_errors_report( + params.get("name"), str(e) + "\n" + traceback.format_exc() + ) params["status"] = "error" self.save_progress(step, generated_params)