def test_predict_nlu_bert_for_tok_cls_1_example(): config = NestedNamespace() config.checkpoint_path = "./logs/test/tok_cls/bert/checkpoint/model_1.pkl" config.cude_devices = None config.interactive = False set_gpu_env(config) config.sequence = "hi, how are you?" experiment = Experiment(Mode.PREDICT, config) experiment()
def test_qa_predict_squad_bert_long_1_example(): config = NestedNamespace() config.checkpoint_path = "./logs/test/bert_for_qa/checkpoint/model_1.pkl" config.cude_devices = None config.interactive = False set_gpu_env(config) config.context = "hi ho hi ho 1 hi ho hi ho 2 hi ho hi ho 3 hi ho hi ho 4 hi ho hi ho 5 hi ho hi ho 6 hi ho hi ho 7 hi ho hi ho 8 hi ho hi ho hi 9 ho hi ho hi ho hi 10 ho hi ho hi ho hi ho 11 hi ho hi ho hi 12 ANSWER ho hi ho hi ho hi 13 ho hi ho hi ho hi 14 ho hi ho hi ho hi 15 ho hi ho hi ho hi 16 ho hi ho hi ho hi 17 ho hi ho hi ho hi 18 ho hi ho hi ho hi 19 ho hi ho hi ho hi 20 ho hi ho hi ho hi 21 ho hi ho hi ho hi 22 ho hi ho hi ho hi 23 ho hi ho hi ho hi 24 ho hi ho hi 25 ho hi ho hi ho 1 hi ho hi ho 2 hi ho hi ho 3 hi ho hi ho 4 hi ho hi ho 5 hi ho hi ho 6 hi ho hi ho 7 hi ho hi ho 8 hi ho hi ho hi 9 ho hi ho hi ho hi 10 ho hi ho hi ho hi ho 11 hi ho hi ho hi 12 ho hi ho hi ho hi 13 ho hi ho hi ho hi 14 ho hi ho hi ho hi 15 ho hi ho hi ho hi 16 ho hi ho hi ho hi 17 ho hi ho hi ho hi 18 ho hi ho hi ho hi 19 ho hi ho hi ho hi 20 ho hi ho hi ho hi 21 ho hi ho hi ho hi 22 ho hi ho hi ho hi 23 ho hi ho hi ho hi 24 ho hi ho hi 25 ho hi ho hi ho 1 hi ho hi ho 2 hi ho hi ho 3 hi ho hi ho 4 hi ho hi ho 5 hi ho hi ho 6 hi ho hi ho 7 hi ho hi ho 8 hi ho hi ho hi 9 ho hi ho hi ho hi 10 ho hi ho hi ho hi ho 11 hi ho hi ho hi 12 ho hi ho hi ho hi 13 ho hi ho hi ho hi 14 ho hi ho hi ho hi 15 ho hi ho hi ho hi 16 ho hi ho hi ho hi 17 ho hi ho hi ho hi 18 ho hi ho hi ho hi 19 ho hi ho hi ho hi 20 ho hi ho hi ho hi 21 ho hi ho hi ho hi 22 ho hi ho hi ho hi 23 ho hi ho hi ho hi 24 ho hi ho hi 25 ho hi ho hi ho 1 hi ho hi ho 2 hi ho hi ho 3 hi ho hi ho 4 hi ho hi ho 5 hi ho hi ho 6 hi ho hi ho 7 hi ho hi ho 8 hi ho hi ho hi 9 ho hi ho hi ho hi 10 ho hi ho hi ho hi ho 11 hi ho hi ho hi 12 ho hi ho hi ho hi 13 ho hi ho hi ho hi 14 ho hi ho hi ho hi 15 ho hi ho hi ho hi 16 ho hi ho hi ho hi 17 ho hi ho hi ho hi 18 ho hi ho hi ho hi 19 ho hi ho hi ho hi 20 ho hi ho hi ho hi 21 ho hi ho hi ho hi 22 ho hi ho hi ho hi 23 ho hi ho hi ho hi 24 ho hi ho hi 25 ho" config.question = "good hi ho hi ho hi good hi ho hi ho hi good hi ho hi ho hi good hi ho hi ho hi good hi ho hi ho hi" experiment = Experiment(Mode.PREDICT, config) experiment()
def test_qa_predict_squad_bert_short_1_example(): config = NestedNamespace() config.checkpoint_path = "./logs/test/bert_for_qa/checkpoint/model_1.pkl" config.cude_devices = None config.interactive = False set_gpu_env(config) config.context = "Westwood One will carry the game throughout North America, with Kevin Harlan as play-by-play announcer, Boomer Esiason and Dan Fouts as color analysts, and James Lofton and Mark Malone as sideline reporters. Jim Gray will anchor the pre-game and halftime coverage." config.question = "What radio network carried the Super Bowl?" experiment = Experiment(Mode.PREDICT, config) experiment()
def test_qa_predict_wikisql_sqlnet_1_example(): config = NestedNamespace() config.checkpoint_path = "./logs/test/sqlnet/checkpoint/model_1.pkl" config.cude_devices = None config.interactive = False set_gpu_env(config) config.column = [ "Player", "No.", "Nationality", "Position", "Years in Toronto", "School/Club Team" ] config.db_path = "data/wikisql/dev.db" config.table_id = "1-10015132-11" config.question = "What position does the player who played for butler cc (ks) play?" experiment = Experiment(Mode.PREDICT, config) experiment()