Skip to content

Commit 64d474d

Browse files
Peter JohnsonPeter Johnson
authored andcommitted
Use /tmp/ for pkl file
1 parent a4613a2 commit 64d474d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

evaluation_function/models/shannon_words_ngram.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from lf_toolkit.evaluation import Result, Params
55
import random, pickle, os
66
import os
7+
import tempfile
78
from pathlib import Path
89
from io import StringIO
910
import re
@@ -27,7 +28,7 @@ def corpus_sents(): # CHANGE
2728
MODEL_DIR = Path(os.environ.get("MODEL_DIR", BASE_DIR / "storage"))
2829
MODEL_DIR.mkdir(parents=True, exist_ok=True)
2930
WORD_LENGTHS_PATH = MODEL_DIR / "norvig_word_length_frequencies.csv"
30-
FILE = MODEL_DIR / "ngram_counts.pkl"
31+
FILE = Path(tempfile.gettempdir()) / "ngram_counts.pkl"
3132

3233
# If not cache:
3334
def corpus_sents(): # CHANGE

0 commit comments

Comments
 (0)