Skip to content

Commit

Permalink
no need for check_path_is_s3 anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
eliebak authored Aug 23, 2024
1 parent a62daad commit 17468b2
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/nanotron/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,3 @@ def find_free_port(min_port: int = 2000, max_port: int = 65000) -> int:
return port
except OSError:
continue

def check_path_is_s3(path:str) -> bool:
#TODO maybe replace by a better method ?
s3_pattern = r'^s3://|^https?://[\w\-\.]+\.s3\.amazonaws\.com/|^https?://s3\.amazonaws\.com/[\w\-\.]+'
return bool(re.match(s3_pattern, path))

0 comments on commit 17468b2

Please sign in to comment.