Add data/utils.py to tests (#4363)

This commit is contained in:
Glenn Jocher
2023-08-15 01:25:48 +02:00
committed by GitHub
parent 834f94f899
commit 4093c1fd64
3 changed files with 21 additions and 16 deletions

View File

@ -125,12 +125,12 @@ def unzip_file(file, path=None, exclude=('.DS_Store', '__MACOSX'), exist_ok=Fals
if extract_path.exists() and any(extract_path.iterdir()) and not exist_ok:
# If it exists and is not empty, return the path without unzipping
LOGGER.info(f'Skipping {file} unzip (already unzipped)')
return path
return extract_path
for f in tqdm(files, desc=f'Unzipping {file} to {Path(path).resolve()}...', unit='file', disable=not progress):
zipObj.extract(f, path=path)
return path # return unzip dir
return extract_path # return unzip dir
def check_disk_space(url='https://ultralytics.com/assets/coco128.zip', sf=1.5, hard=True):