Skip to content

Commit

Permalink
Fix temporary directory cleanup in test_callbacks.py
Browse files Browse the repository at this point in the history
  • Loading branch information
qgallouedec committed Nov 21, 2024
1 parent 7fe26d5 commit a57d88a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def setUp(self):
self.dataset = load_dataset("trl-internal-testing/zen", "standard_preference", split="train")

def test_callback(self):
with tempfile.TemporaryDirectory() as tmp_dir:
with tempfile.TemporaryDirectory(ignore_cleanup_errors=True) as tmp_dir:
training_args = DPOConfig(
output_dir=tmp_dir,
num_train_epochs=1,
Expand All @@ -305,7 +305,7 @@ def test_callback(self):
pass

def test_every_checkpoint(self):
with tempfile.TemporaryDirectory() as tmp_dir:
with tempfile.TemporaryDirectory(ignore_cleanup_errors=True) as tmp_dir:
training_args = DPOConfig(
output_dir=tmp_dir,
num_train_epochs=1,
Expand Down

0 comments on commit a57d88a

Please sign in to comment.