Spaces:
Running
on
Zero
Running
on
Zero
File size: 370 Bytes
f1ea451 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
import shutil
import os
from dist_utils import *
def use_cached_dataset_path(source_path, cache_path):
if get_rank() == 0:
if not os.path.exists(cache_path):
# shutil.rmtree(cache_path)
print(f'copying the data: {source_path} to {cache_path}')
shutil.copytree(source_path, cache_path)
barrier()
return cache_path |