Skip to content

Commit 90e37ba

Browse files
authored
fix exception raising (#6901)
1 parent 742c48e commit 90e37ba

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
@@ -207,7 +207,7 @@ def log_metrics(self, metrics: Dict[str, float], step: Optional[int] = None) ->
207207
# todo: specify the possible exception
208208
except Exception as ex:
209209
m = f'\n you tried to log {v} which is not currently supported. Try a dict or a scalar/tensor.'
210-
type(ex)(ex.message + m)
210+
raise ValueError(m) from ex
211211

212212
@rank_zero_only
213213
def log_graph(self, model: LightningModule, input_array=None):

0 commit comments

Comments
 (0)