Remove dill package from Ultralytics (#16574)

Signed-off-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
Glenn Jocher 2024-10-01 10:10:26 +02:00 committed by GitHub
parent 060214d066
commit c327b0aae1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 5 additions and 18 deletions

View file

@ -595,7 +595,7 @@ def strip_optimizer(f: Union[str, Path] = "best.pt", s: str = "", updates: dict
# Save
combined = {**metadata, **x, **(updates or {})}
torch.save(combined, s or f, use_dill=False) # combine dicts (prefer to the right)
torch.save(combined, s or f) # combine dicts (prefer to the right)
mb = os.path.getsize(s or f) / 1e6 # file size
LOGGER.info(f"Optimizer stripped from {f},{f' saved as {s},' if s else ''} {mb:.1f}MB")
return combined