Skip to content

Commit 94eaef6

Browse files
kandluisSeanNaren
authored andcommitted
fix exception raising (#6901)
(cherry picked from commit 90e37ba)
1 parent 78a6ad5 commit 94eaef6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pytorch_lightning/loggers/tensorboard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def log_metrics(self, metrics: Dict[str, float], step: Optional[int] = None) ->
204204
# todo: specify the possible exception
205205
except Exception as ex:
206206
m = f'\n you tried to log {v} which is not currently supported. Try a dict or a scalar/tensor.'
207-
type(ex)(ex.message + m)
207+
raise ValueError(m) from ex
208208

209209
@rank_zero_only
210210
def log_graph(self, model: LightningModule, input_array=None):

0 commit comments

Comments
 (0)