safetensors icon indicating copy to clipboard operation
safetensors copied to clipboard

Update fuzz.py

Open tejhande opened this issue 11 months ago • 0 comments

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.

tejhande avatar Mar 16 '24 19:03 tejhande