mirror of
https://gitee.com/fastnlp/fastNLP.git
synced 2024-12-03 04:37:37 +08:00
fix test path to pass py.test
This commit is contained in:
parent
f2fc98b5e6
commit
ad044ef4c7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user