Skip to content

Commit

Permalink
another race
Browse files Browse the repository at this point in the history
  • Loading branch information
dakinggg committed Oct 22, 2023
1 parent b3d5d87 commit eaf66a9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_hf_conversion_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ def check_hf_model_equivalence(model1: PreTrainedModel,


def delete_transformers_cache():
# Only delete the files on local rank 0, otherwise race conditions are created
if not dist.get_local_rank() == 0:
return

hf_cache_home = os.path.expanduser(
os.getenv(
'HF_HOME',
Expand Down

0 comments on commit eaf66a9

Please sign in to comment.