diff --git a/scripts/train/train.py b/scripts/train/train.py index f2a70b526d..3799a3eb7f 100644 --- a/scripts/train/train.py +++ b/scripts/train/train.py @@ -394,9 +394,7 @@ def main(cfg: DictConfig) -> Trainer: train_cfg.device_train_batch_size, ) except BaseContextualError as e: - if mosaicml_logger is not None: - e.location = TrainDataLoaderLocation - mosaicml_logger.log_exception(e) + e.location = TrainDataLoaderLocation raise e if mosaicml_logger is not None: @@ -427,9 +425,7 @@ def main(cfg: DictConfig) -> Trainer: if eval_gauntlet_callback is not None: callbacks.append(eval_gauntlet_callback) except BaseContextualError as e: - if mosaicml_logger is not None: - e.location = EvalDataLoaderLocation - mosaicml_logger.log_exception(e) + e.location = EvalDataLoaderLocation raise e if mosaicml_logger is not None: