Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
echarlaix committed Feb 12, 2025
1 parent 613ed02 commit d73c6a0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions optimum/utils/file_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,7 @@ def find_files_matching_pattern(


if not files:
raise ValueError(f"model_path {model_path}, glob_pattern {glob_pattern}, Path(model_path).glob(glob_pattern) {[p for p in Path(model_path).glob(glob_pattern) ]}, pattern {pattern}")


raise ValueError(f"model_path {model_path}, glob_pattern {glob_pattern}, Path(model_path).glob(glob_pattern) {[str(p) for p in Path(model_path).glob(glob_pattern) ]}, pattern {pattern}, finale {[p for p in Path(model_path).glob(glob_pattern) if re.search(pattern, str(p))]}")
else:
repo_files = huggingface_hub.list_repo_files(model_path, revision=revision, token=token)
files = [Path(p) for p in repo_files if re.match(pattern, p)]
Expand Down

0 comments on commit d73c6a0

Please sign in to comment.