From 2e084c0581d7756ef977d9fb65d922590e4453ea Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sat, 5 Oct 2024 00:53:19 +0200 Subject: [PATCH] Fix validator model=None (#16699) --- ultralytics/engine/validator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ultralytics/engine/validator.py b/ultralytics/engine/validator.py index ff04a85135..daa058a9de 100644 --- a/ultralytics/engine/validator.py +++ b/ultralytics/engine/validator.py @@ -119,7 +119,7 @@ class BaseValidator: self.args.plots &= trainer.stopper.possible_stop or (trainer.epoch == trainer.epochs - 1) model.eval() else: - if Path(self.args.model).suffix == ".yaml": + if str(self.args.model).endswith(".yaml"): LOGGER.warning("WARNING ⚠️ validating an untrained model YAML will result in 0 mAP.") callbacks.add_integration_callbacks(self) model = AutoBackend(