Skip to content

Commit

Permalink
improve error handling in data container for explainer at training
Browse files Browse the repository at this point in the history
  • Loading branch information
diegomarvid committed Apr 5, 2024
1 parent 01b0fb1 commit 25d2ca3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pipeline_lib/core/data_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,11 @@ def explainer(self) -> Any:
Any
The explainer stored in the DataContainer.
"""
if self.is_train:
raise ValueError(
"Explainer is only available for prediction. Pipeline was executed on training"
" mode."
)
return self["explainer"]

@explainer.setter
Expand Down

0 comments on commit 25d2ca3

Please sign in to comment.