Zero mAP warning on YAML val (#16698)

This commit is contained in:
Glenn Jocher 2024-10-05 00:15:48 +02:00 committed by GitHub
parent c6371ba8c4
commit e5d3427a52
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -119,6 +119,8 @@ 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":
LOGGER.warning("WARNING ⚠️ validating an untrained model YAML will result in 0 mAP.")
callbacks.add_integration_callbacks(self)
model = AutoBackend(
weights=model or self.args.model,