Skip to content

Commit

Permalink
Merge branch 'main' into tr34-flash2
Browse files Browse the repository at this point in the history
  • Loading branch information
dakinggg authored Oct 23, 2023
2 parents 317cb1a + 091ddca commit 5ec9cea
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_hf_conversion_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,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 Expand Up @@ -477,6 +481,7 @@ def test_huggingface_conversion_callback(model: str, tmp_path: pathlib.Path,
loaded_model)
check_hf_tokenizer_equivalence(tokenizer, loaded_tokenizer)

dist.barrier()
delete_transformers_cache()


Expand Down

0 comments on commit 5ec9cea

Please sign in to comment.