Skip to content

Commit

Permalink
Unit-test: link to the default downloading dir. #131
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolay-r committed Jan 8, 2024
1 parent 394a6f5 commit a8a28e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/test_opennre_bert_infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from arelight.predict.writer_csv import TsvPredictWriter
from arelight.run.utils import OPENNRE_CHECKPOINTS
from arelight.third_party.torch import sentence_re_loader
from arelight.utils import get_default_download_dir


class TestLoadModel(unittest.TestCase):
Expand Down Expand Up @@ -44,7 +45,7 @@ def infer_bert(pretrain_path, labels_scaler, output_file_gzip, predefined, ckpt_
model = BertOpenNREInferencePipelineItem.init_bert_model(
pretrain_path=pretrain_path, labels_scaler=labels_scaler, ckpt_path=ckpt_path,
device_type="cpu", max_length=max_length, mask_entity=mask_entity,
dir_to_donwload=os.getcwd(), pooler=pooler, predefined=predefined)
dir_to_donwload=get_default_download_dir(), pooler=pooler, predefined=predefined)

eval_loader = sentence_re_loader(path=test_data_file,
table_name="contents",
Expand Down

0 comments on commit a8a28e6

Please sign in to comment.