MCPcopy Index your code
hub / github.com/deepspeedai/DeepSpeedExamples / split_s3_path

Function split_s3_path

bing_bert/turing/file_utils.py:113–123  ·  view source on GitHub ↗

Split a full s3 path into the bucket name and path.

(url)

Source from the content-addressed store, hash-verified

111
112
113def split_s3_path(url):
114 """Split a full s3 path into the bucket name and path."""
115 parsed = urlparse(url)
116 if not parsed.netloc or not parsed.path:
117 raise ValueError("bad s3 path {}".format(url))
118 bucket_name = parsed.netloc
119 s3_path = parsed.path
120 # Remove '/' at beginning of path.
121 if s3_path.startswith("/"):
122 s3_path = s3_path[1:]
123 return bucket_name, s3_path
124
125
126def s3_request(func):

Callers 2

s3_etagFunction · 0.70
s3_getFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected