Testing success, remove debug block

This commit is contained in:
Matt 2025-01-14 18:24:57 +00:00
parent edda0c1390
commit cc6f662a54

View file

@ -580,12 +580,6 @@ def set_initialized_submodules(model, state_dict_keys):
# Iterate until we reach the end of the keys with this prefix
loaded_keys.add(state_dict_keys[i].removeprefix(prefix))
i += 1
# This next block is just for debug testing and should be removed before merging
old_loaded_keys = {
k.removeprefix(f"{module_name}.") for k in state_dict_keys if k.startswith(f"{module_name}.")
}
if not old_loaded_keys == loaded_keys:
breakpoint()
# When checking if the root module is loaded all state_dict_keys must be used.
if module_name == "":
loaded_keys = set(state_dict_keys)