From ad044ef4c76c2c52da6e732a67ff2001e7a677d5 Mon Sep 17 00:00:00 2001 From: FengZiYjun Date: Sun, 16 Sep 2018 14:16:04 +0800 Subject: [PATCH] fix test path to pass py.test --- test/model/test_seq_label.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/model/test_seq_label.py b/test/model/test_seq_label.py index 9a0c46cd..0d1f9e89 100644 --- a/test/model/test_seq_label.py +++ b/test/model/test_seq_label.py @@ -13,11 +13,11 @@ from fastNLP.saver.model_saver import ModelSaver parser = argparse.ArgumentParser() parser.add_argument("-s", "--save", type=str, default="./seq_label/", help="path to save pickle files") -parser.add_argument("-t", "--train", type=str, default="../data_for_tests/people.txt", +parser.add_argument("-t", "--train", type=str, default="test/data_for_tests/people.txt", help="path to the training data") -parser.add_argument("-c", "--config", type=str, default="../data_for_tests/config", help="path to the config file") +parser.add_argument("-c", "--config", type=str, default="test/data_for_tests/config", help="path to the config file") parser.add_argument("-m", "--model_name", type=str, default="seq_label_model.pkl", help="the name of the model") -parser.add_argument("-i", "--infer", type=str, default="../data_for_tests/people_infer.txt", +parser.add_argument("-i", "--infer", type=str, default="test/data_for_tests/people_infer.txt", help="data used for inference") args = parser.parse_args() @@ -32,7 +32,7 @@ def test_training(): # Config Loader trainer_args = ConfigSection() model_args = ConfigSection() - ConfigLoader("config.cfg").load_config(config_dir, { + ConfigLoader("_").load_config(config_dir, { "test_seq_label_trainer": trainer_args, "test_seq_label_model": model_args}) # Data Loader