PyUpgrade 3.8 updates (#15941)

Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
Glenn Jocher 2024-09-01 17:45:38 +02:00 committed by GitHub
parent ea13dc6208
commit 9ec8e9acbf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 25 additions and 25 deletions

View file

@ -202,8 +202,9 @@ class BaseValidator:
return {k: round(float(v), 5) for k, v in results.items()} # return results as 5 decimal place floats
else:
LOGGER.info(
"Speed: %.1fms preprocess, %.1fms inference, %.1fms loss, %.1fms postprocess per image"
% tuple(self.speed.values())
"Speed: {:.1f}ms preprocess, {:.1f}ms inference, {:.1f}ms loss, {:.1f}ms postprocess per image".format(
*tuple(self.speed.values())
)
)
if self.args.save_json and self.jdict:
with open(str(self.save_dir / "predictions.json"), "w") as f: