コード例 #1
0
    def setUp(self):
        opts = MockOpt()
        opts.nsp_models_dir = TTAD_MODEL_DIR
        opts.nsp_data_dir = TTAD_BERT_DATA_DIR
        super().setUp(agent_opts=opts)

        self.cube_right = self.add_object(shapes.cube(bid=(42, 0)), (9, 63, 4))
        self.cube_left = self.add_object(shapes.cube(), (9, 63, 10))
        self.set_looking_at(list(self.cube_right.blocks.keys())[0])
コード例 #2
0
 def __init__(self, *args, **kwargs):
     super(TestDialogueManager, self).__init__(*args, **kwargs)
     opts = MockOpt()
     opts.nsp_data_dir = TTAD_BERT_DATA_DIR
     opts.ground_truth_data_dir = GROUND_TRUTH_DATA_DIR
     opts.nsp_models_dir = TTAD_MODEL_DIR
     opts.no_ground_truth = False
     self.agent = FakeAgent(opts)
コード例 #3
0
 def __init__(self, *args, **kwargs):
     super(TestDialogueManager, self).__init__(*args, **kwargs)
     opts = MockOpt()
     opts.nsp_data_dir = TTAD_BERT_DATA_DIR
     opts.ground_truth_data_dir = GROUND_TRUTH_DATA_DIR
     opts.nsp_models_dir = TTAD_MODEL_DIR
     opts.no_ground_truth = False
     self.agent = FakeAgent(opts)
     self.ground_truth_actions = {}
     print("fetching data from ground truth, from directory: %r" %
           (opts.ground_truth_data_dir))
     if not opts.no_ground_truth:
         if os.path.isdir(opts.ground_truth_data_dir):
             dataset = opts.ground_truth_data_dir + "datasets/high_pri_commands.txt"
             with open(dataset) as f:
                 for line in f.readlines():
                     text, logical_form = line.strip().split("|")
                     clean_text = text.strip('"').lower()
                     self.ground_truth_actions[clean_text] = json.loads(
                         logical_form)
コード例 #4
0
ファイル: test_safety.py プロジェクト: qingqing01/droidlet
 def setUp(self):
     opts = MockOpt()
     opts.ground_truth_data_dir = GROUND_TRUTH_DATA_DIR
     opts.no_ground_truth = False
     super().setUp(agent_opts=opts)
コード例 #5
0
ファイル: test_agent.py プロジェクト: qingqing01/droidlet
 def test_init_agent(self):
     opts = MockOpt()
     CraftAssistAgent(opts)