Skip to content

Commit ce91956

Browse files
committed
attempt to fix windows permission error
1 parent 9c0c7c5 commit ce91956

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/modules/scoring/test_bert.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import gc
12
import shutil
23
import tempfile
34
from pathlib import Path
@@ -51,6 +52,7 @@ def test_bert_scorer_dump_load(dataset):
5152

5253
finally:
5354
# Clean up
55+
gc.collect() # try to fix windows permission error, i suppose this statement will close all file handlers
5456
shutil.rmtree(temp_dir_path)
5557

5658

0 commit comments

Comments
 (0)