Skip to content

Commit

Permalink
add traceback to errors report (#252)
Browse files Browse the repository at this point in the history
  • Loading branch information
pplonski committed Nov 27, 2020
1 parent 9ee7554 commit 6abf58d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions supervised/base_automl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 6abf58d

Please sign in to comment.