Closed ctsan closed 1 year ago
I also noticed that actually load_pruned_model sometimes is called with model_path, and model_class arguments and sometimes is called with model and weights arguments. Maybe this was changed but some things were not updated?
Hi,
Sorry for the late reply!!
For the first issue, I think load_model
is always used for loading a model along with the masks zs
. If zs
is not provided, as you said, the program crashes. I updated the function to remove the second path, which is never triggered in the codebase. Sorry for the confusion!
For the second issue, yes! I think only in test.py
file, load_pruned_model
is called with model_path and model_class, which is a deprecated use.
Let me know if you have more questions and I am happy to help!
load_pruned_model in the cofi_utils file seems to take a model as a first argument, however load_model(..) calls load_pruned_model by passing a string. In this case the program crashes as the string doesn't have a "config" property for example