https://promptfoo.dev/ logo
maximum recursion depth exceeded
# questions
a
When running 'modelaudit model.safetensors' I'm recieving this error: πŸ” SECURITY FINDINGS ──────────────────────────────────────────────────────────── 🚨 1 Critical 🚨 Critical Issues ──────────────────────────────────────── └─ 🚨 [model.safetensors] Error scanning SafeTensors file: maximum recursion depth exceeded Why: Scanning errors may indicate corrupted files, unsupported formats, or malicious content designed to crash security tools. exception: maximum recursion depth exceeded exception_type: RecursionError
t
Have you tried setting a recursion limit?
a
I did and it still failed. Just took longer to fail lol
The percentage for the scan never increased
t
@shuo0446 got an idea?
a
I assumed it was an issue with python so raised the recursion limit with the function setrecursionlimit. Since that didn’t work, wanted to reach out to you all to see if it was a bug. It has happened to any safetensors model that I try to scan locally.
s
@michael.michael.michael
i
yeah michael is the guy for this
m
@AWilborn would you mind sharing which model (or family of models) you are scanning?
a
The most recent one I tried was https://huggingface.co/google-bert/bert-base-uncased/tree/main but the .safetensors format has failed with multiple that I’ve scanned
It seems like if I scan the whole model directly from hugging face it works but whenever I download a .safetensors model locally to scan it doesn’t.
Which makes me wonder if scanning directly from hugging face is just returning with no error for .safetensors
m
Looking into it now, thank you
a
No problem! If you need better screenshots and a walkthrough of what I did I can send that in like 30 minutes or so. But basically I want to use modelaudit locally to scan models. Noticed it wasn’t working with .safetensors
m
I just cut a new release. Please pull the latest version and give it another try. If you encounter any other issues please feel free to grab some time on my calendar: https://cal.com/michael-dangelo/30min
a
python 3.12.11 modelaudit==0.2.1
If that's the correct version I can schedule some time on your calendar maybe next week to look at it
i
that is the correct version. @michael.michael.michael