Skip to content

Commit

Permalink
type
Browse files Browse the repository at this point in the history
  • Loading branch information
soldni committed Oct 31, 2024
1 parent 6d1e26d commit 6467504
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion hf_olmo/convert_olmo_to_hf.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

def walk_local_path(path: PathOrStr, top_down=True, on_error=None, follow_symlinks=False):
"""Necessary because Path.walk() was only added in python 3.12"""
for root, dirs, files in os.walk(path, topdown=top_down, onerror=on_error, followlinks=follow_symlinks):
for root, dirs, files in os.walk(str(path), topdown=top_down, onerror=on_error, followlinks=follow_symlinks):
yield Path(root), dirs, files


Expand Down
6 changes: 0 additions & 6 deletions olmo/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,12 +313,6 @@ def get_progress_bar() -> Progress:
return get_download_progress()


def walk_local_path(path: PathOrStr, top_down=True, on_error=None, follow_symlinks=False):
"""Necessary because Path.walk() was only added in python 3.12"""
for root, dirs, files in os.walk(path, topdown=top_down, onerror=on_error, followlinks=follow_symlinks):
yield Path(root), dirs, files


def resource_path(
folder: PathOrStr, fname: str, local_cache: Optional[PathOrStr] = None, progress: Optional[Progress] = None
) -> Path:
Expand Down

0 comments on commit 6467504

Please sign in to comment.