Skip to content

Commit c056d63

Browse files
pwilkinCISC
andauthored
Update convert_hf_to_gguf_update.py - merge catch blocks
Co-authored-by: Sigbjørn Skjæret <[email protected]>
1 parent 415a2fc commit c056d63

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

convert_hf_to_gguf_update.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -436,10 +436,7 @@ def get_vocab_base_pre(self, tokenizer) -> str:
436436
tokenizer = AutoTokenizer.from_pretrained(f"models/tokenizers/{name}", use_fast=False)
437437
else:
438438
tokenizer = AutoTokenizer.from_pretrained(f"models/tokenizers/{name}")
439-
except OSError as e:
440-
logger.error(f"Failed to load tokenizer for model {name}. Error: {e}")
441-
continue # Skip this model and continue with the next one in the loop
442-
except TypeError as e:
439+
except (OSError, TypeError) as e:
443440
logger.error(f"Failed to load tokenizer for model {name}. Error: {e}")
444441
continue # Skip this model and continue with the next one in the loop
445442

0 commit comments

Comments
 (0)