safetensors
safetensors copied to clipboard
Update fuzz.py
Opened Temporary File in Binary Mode: The NamedTemporaryFile is now opened in binary mode ("wb") to ensure compatibility when writing binary data. Using time.time() for Time Comparison: time.time() is used instead of datetime.datetime.now() for more accurate time comparison. Thread-Safe Counter: Replaced defaultdict with Counter for EXCEPTIONS to ensure thread safety. Added a LOCK to synchronize access to the EXCEPTIONS counter. With these changes, the script should handle temporary file operations and time comparisons more reliably, while ensuring thread safety for updating the exceptions counter.
What does this PR do?
Fixes # (issue) or description of the problem this PR solves.