protectai / modelscan

Protection against Model Serialization Attacks
http://modelscan.ai
Apache License 2.0
268 stars 54 forks source link

Bert tf_model.h5 was skipped during a hdf5 scan: Model Config not found #181

Open rmtuckerphx opened 1 month ago

rmtuckerphx commented 1 month ago

Describe the bug Downloaded https://huggingface.co/google-bert/bert-base-uncased/blob/main/tf_model.h5 to local machine and ran modelscan --show-skipped -p ./models/bert-base-uncased/tf_model.h5 and model file is skipped.

To Reproduce Steps to reproduce the behavior:

  1. Download to local machine: https://huggingface.co/google-bert/bert-base-uncased/blob/main/tf_model.h5
  2. Execute: modelscan --show-skipped -p ./models/bert-base-uncased/tf_model.h5
  3. Output is:

No settings file detected at /myproj/modelscan-settings.toml. Using defaults. Model Config not found in: /myproj/models/bert-base-uncased/tf_model.h5 Scanning /myproj/models/bert-base-uncased/tf_model.h5 using modelscan.scanners.H5LambdaDetectScan model scan --- Summary --- No issues found! 🎉 --- Skipped --- Total skipped: 1 - run with --show-skipped to see the full list. Skipped files list: The following file /myproj/models/bert-base-uncased/tf_model.h5 was skipped during a hdf5 scan: Model Config not found

Expected behavior The h5 file to be scanned not skipped.

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

Additional context Maybe all that is needed is clarification that this scenario is OK to skip.

newverma276 commented 1 month ago

same for me

nandy6666 commented 1 month ago

same for me as well, it's not scanning the Mistral7B bin file

No settings file detected at /Users/nandy/Downloads/ModelScan/modelscan-settings.toml. Using defaults.

Scanning /Users/nandy/Downloads/ModelScan/t5-small-lm-adapt/pytorch_model.bin:archive/data.pkl using modelscan.scanners.PickleUnsafeOpScan model scan

--- Summary ---

No issues found! 🎉

--- Skipped ---

Total skipped: 191 - run with --show-skipped to see the full list.