NEW: 推送向量数据库检索增强代码,含造数据集、获取embedding、测试向量数据库,不含模型.bin文件

This commit is contained in:
wuziji 2023-11-24 22:10:58 +08:00
parent d36496304f
commit 8b860fb9cd
35 changed files with 971 additions and 26158 deletions

View File

@ -1,4 +0,0 @@
pip install gdown
gdown 1IYNAkwawfCDiBL27BlBqGssxFQH9vOux
unzip enwiki_2020_intro_only.zip
rm enwiki_2020_intro_only.zip

View File

@ -1,731 +0,0 @@
#!/usr/bin/env python
# coding=utf-8
import argparse
import logging
import math
import os
import random
import datasets
import torch
import copy
from functools import partial
from accelerate import Accelerator
from accelerate.logging import get_logger
from accelerate.utils import set_seed
from datasets import load_dataset
from torch.utils.data import DataLoader
from tqdm.auto import tqdm
from typing import Optional, Dict, Sequence
import json
import transformers
from transformers import (
AutoConfig,
AutoModelForCausalLM,
AutoTokenizer,
LlamaTokenizer,
LlamaTokenizerFast,
SchedulerType,
DataCollatorForSeq2Seq,
get_scheduler,
GPTNeoXTokenizerFast,
GPT2Tokenizer,
OPTForCausalLM
)
from peft import LoraConfig, TaskType, get_peft_model
logger = get_logger(__name__)
PROMPT_DICT = {
"prompt_input": (
"### Instruction:\n{instruction}\n\n### Input:\n{input}\n\n### Response:\n"
),
"prompt_no_input": (
"### Instruction:\n{instruction}\n\n### Response:\n"
),
}
def parse_args():
parser = argparse.ArgumentParser(description="Finetune a transformers model on a causal language modeling task")
parser.add_argument(
"--dataset_name",
type=str,
default=None,
help="The name of the dataset to use (via the datasets library).",
)
parser.add_argument(
"--dataset_config_name",
type=str,
default=None,
help="The configuration name of the dataset to use (via the datasets library).",
)
parser.add_argument(
"--train_file", type=str, default=None, help="A csv or a json file containing the training data."
)
parser.add_argument(
"--model_name_or_path",
type=str,
help="Path to pretrained model or model identifier from huggingface.co/models.",
required=False,
)
parser.add_argument(
"--config_name",
type=str,
default=None,
help="Pretrained config name or path if not the same as model_name",
)
parser.add_argument(
"--use_lora",
action="store_true",
help="If passed, will use LORA (low-rank parameter-efficient training) to train the model.",
)
parser.add_argument(
"--lora_rank",
type=int,
default=64,
help="The rank of lora.",
)
parser.add_argument(
"--lora_alpha",
type=float,
default=16,
help="The alpha parameter of lora.",
)
parser.add_argument(
"--lora_dropout",
type=float,
default=0.1,
help="The dropout rate of lora modules.",
)
parser.add_argument(
"--save_merged_lora_model",
action="store_true",
help="If passed, will merge the lora modules and save the entire model.",
)
parser.add_argument(
"--use_flash_attn",
action="store_true",
help="If passed, will use flash attention to train the model.",
)
parser.add_argument(
"--tokenizer_name",
type=str,
default=None,
help="Pretrained tokenizer name or path if not the same as model_name",
)
parser.add_argument(
"--use_slow_tokenizer",
action="store_true",
help="If passed, will use a slow tokenizer (not backed by the 🤗 Tokenizers library).",
)
parser.add_argument(
"--max_seq_length",
type=int,
default=512,
help="The maximum total sequence length (prompt+completion) of each training example.",
)
parser.add_argument(
"--per_device_train_batch_size",
type=int,
default=8,
help="Batch size (per device) for the training dataloader.",
)
parser.add_argument(
"--learning_rate",
type=float,
default=5e-5,
help="Initial learning rate (after the potential warmup period) to use.",
)
parser.add_argument("--weight_decay", type=float, default=0.0, help="Weight decay to use.")
parser.add_argument("--num_train_epochs", type=int, default=3, help="Total number of training epochs to perform.")
parser.add_argument(
"--max_train_steps",
type=int,
default=None,
help="Total number of training steps to perform. If provided, overrides num_train_epochs.",
)
parser.add_argument(
"--gradient_accumulation_steps",
type=int,
default=1,
help="Number of updates steps to accumulate before performing a backward/update pass.",
)
parser.add_argument(
"--lr_scheduler_type",
type=SchedulerType,
default="linear",
help="The scheduler type to use.",
choices=["linear", "cosine", "cosine_with_restarts", "polynomial", "constant", "constant_with_warmup"],
)
parser.add_argument(
"--warmup_ratio", type=float, default=0, help="Ratio of total training steps used for warmup."
)
parser.add_argument("--output_dir", type=str, default=None, help="Where to store the final model.")
parser.add_argument("--seed", type=int, default=None, help="A seed for reproducible training.")
parser.add_argument(
"--preprocessing_num_workers",
type=int,
default=None,
help="The number of processes to use for the preprocessing.",
)
parser.add_argument(
"--overwrite_cache", action="store_true", help="Overwrite the cached training and evaluation sets"
)
parser.add_argument(
"--checkpointing_steps",
type=str,
default=None,
help="Whether the various states should be saved at the end of every n steps, or 'epoch' for each epoch.",
)
parser.add_argument(
"--logging_steps",
type=int,
default=None,
help="Log the training loss and learning rate every logging_steps steps.",
)
parser.add_argument(
"--resume_from_checkpoint",
type=str,
default=None,
help="If the training should continue from a checkpoint folder.",
)
parser.add_argument(
"--with_tracking",
action="store_true",
help="Whether to enable experiment trackers for logging.",
)
parser.add_argument(
"--report_to",
type=str,
default="all",
help=(
'The integration to report the results and logs to. Supported platforms are `"tensorboard"`,'
' `"wandb"`, `"comet_ml"` and `"clearml"`. Use `"all"` (default) to report to all integrations.'
"Only applicable when `--with_tracking` is passed."
),
)
parser.add_argument(
"--low_cpu_mem_usage",
action="store_true",
help=(
"It is an option to create the model as an empty shell, then only materialize its parameters when the pretrained weights are loaded."
"If passed, LLM loading time and RAM consumption will be benefited."
),
)
parser.add_argument(
"--use_special_tokens",
action="store_true",
help=(
"Use special tokens."
),
)
args = parser.parse_args()
# Sanity checks
if args.dataset_name is None and args.train_file is None:
raise ValueError("Need either a dataset name or a training file.")
else:
if args.train_file is not None:
extension = args.train_file.split(".")[-1]
assert extension in ["json", "jsonl"], "`train_file` should be a json/jsonl file."
return args
def _tokenize_fn(text: str, tokenizer: transformers.PreTrainedTokenizer, max_seq_length: int) -> Dict:
"""Tokenize a list of strings."""
input_ids = labels = tokenizer(
text,
return_tensors="pt",
padding="longest",
max_length=max_seq_length,
truncation=True,
).input_ids
input_ids_lens = labels_lens = input_ids.ne(tokenizer.pad_token_id).sum().item()
print(input_ids_lens)
return dict(
input_ids=input_ids,
labels=labels,
input_ids_lens=input_ids_lens,
labels_lens=labels_lens,
)
def encode_with_prompt_completion_format(example, tokenizer, max_seq_length, context_markups=None):
'''
Here we assume each example has 'prompt' and 'completion' fields.
We concatenate prompt and completion and tokenize them together because otherwise prompt will be padded/trancated
and it doesn't make sense to follow directly with the completion.
'''
# if prompt doesn't end with space and completion doesn't start with space, add space
prompt_input, prompt_no_input = PROMPT_DICT["prompt_input"], PROMPT_DICT["prompt_no_input"]
source_text = prompt_input.format_map(example) if example.get("input", "") != "" else prompt_no_input.format_map(example)
target_text = example['output'] + tokenizer.eos_token
examples_tokenized = _tokenize_fn(source_text + target_text, tokenizer, max_seq_length)
sources_tokenized = _tokenize_fn(source_text, tokenizer, max_seq_length)
input_ids = examples_tokenized["input_ids"].flatten()
source_len = sources_tokenized["input_ids_lens"]
labels = copy.deepcopy(input_ids)
labels[ :source_len-1] = -100
if context_markups is not None:
context_start = False
for j, orig_token in enumerate(labels[source_len:]):
if context_start is False and orig_token == context_markups[0]:
context_start = True
assert labels[source_len+j] == context_markups[0]
start_idx = j+source_len
end_idx = None
for k, orig_token_2 in enumerate(labels[start_idx:]):
if orig_token_2 == context_markups[1]:
end_idx = start_idx + k
if end_idx is None:
end_idx = start_idx + k
else:
assert labels[end_idx] == context_markups[1]
labels[start_idx+1:end_idx] = -100
context_start = False
attention_mask = torch.ones_like(input_ids)
return {
'input_ids': input_ids.flatten(),
'labels': labels.flatten(),
'attention_mask': attention_mask.flatten()
}
def encode_with_messages_format(example, tokenizer, max_seq_length):
'''
Here we assume each example has a 'messages' field Each message is a dict with 'role' and 'content' fields.
We concatenate all messages with the roles as delimiters and tokenize them together.
'''
messages = example['messages']
if len(messages) == 0:
raise ValueError('messages field is empty.')
def _concat_messages(messages):
message_text = ""
for message in messages:
if message["role"] == "system":
message_text += "<|system|>\n" + message["content"].strip() + "\n"
elif message["role"] == "user":
message_text += "<|user|>\n" + message["content"].strip() + "\n"
elif message["role"] == "assistant":
message_text += "<|assistant|>\n" + message["content"].strip() + tokenizer.eos_token + "\n"
else:
raise ValueError("Invalid role: {}".format(message["role"]))
return message_text
example_text = _concat_messages(messages).strip()
tokenized_example = tokenizer(example_text, return_tensors='pt', max_length=max_seq_length, truncation=True)
input_ids = tokenized_example.input_ids
labels = input_ids.clone()
# mask the non-assistant part for avoiding loss
for message_idx, message in enumerate(messages):
if message["role"] != "assistant":
if message_idx == 0:
message_start_idx = 0
else:
message_start_idx = tokenizer(
_concat_messages(messages[:message_idx]), return_tensors='pt', max_length=max_seq_length, truncation=True
).input_ids.shape[1]
if message_idx < len(messages) - 1 and messages[message_idx+1]["role"] == "assistant":
# here we also ignore the role of the assistant
messages_so_far = _concat_messages(messages[:message_idx+1]) + "<|assistant|>\n"
else:
messages_so_far = _concat_messages(messages[:message_idx+1])
message_end_idx = tokenizer(
messages_so_far,
return_tensors='pt',
max_length=max_seq_length,
truncation=True
).input_ids.shape[1]
labels[:, message_start_idx:message_end_idx] = -100
if message_end_idx >= max_seq_length:
break
attention_mask = torch.ones_like(input_ids)
return {
'input_ids': input_ids.flatten(),
'labels': labels.flatten(),
'attention_mask': attention_mask.flatten(),
}
def main():
args = parse_args()
# A hacky way to make llama work with flash attention
if args.use_flash_attn:
from llama_flash_attn_monkey_patch import replace_llama_attn_with_flash_attn
replace_llama_attn_with_flash_attn()
# Initialize the accelerator. We will let the accelerator handle device placement for us in this example.
# If we're using tracking, we also need to initialize it here and it will by default pick up all supported trackers
# in the environment
accelerator_log_kwargs = {}
if args.with_tracking:
accelerator_log_kwargs["log_with"] = args.report_to
accelerator_log_kwargs["project_dir"] = args.output_dir
accelerator = Accelerator(gradient_accumulation_steps=args.gradient_accumulation_steps, **accelerator_log_kwargs)
# Make one log on every process with the configuration for debugging.
logging.basicConfig(
format="%(asctime)s - %(levelname)s - %(name)s - %(message)s",
datefmt="%m/%d/%Y %H:%M:%S",
level=logging.INFO,
)
logger.info(accelerator.state, main_process_only=False)
if accelerator.is_local_main_process:
datasets.utils.logging.set_verbosity_warning()
transformers.utils.logging.set_verbosity_info()
else:
datasets.utils.logging.set_verbosity_error()
transformers.utils.logging.set_verbosity_error()
# If passed along, set the training seed now.
if args.seed is not None:
set_seed(args.seed)
if accelerator.is_main_process:
if args.output_dir is not None:
os.makedirs(args.output_dir, exist_ok=True)
accelerator.wait_for_everyone()
if args.dataset_name is not None:
# Downloading and loading a dataset from the hub.
raw_datasets = load_dataset(
args.dataset_name,
args.dataset_config_name,
)
else:
data_files = {}
dataset_args = {}
if args.train_file is not None:
data_files["train"] = args.train_file
raw_datasets = load_dataset(
"json",
data_files=data_files,
**dataset_args,
)
# Load pretrained model and tokenizer
if args.config_name:
config = AutoConfig.from_pretrained(args.config_name)
elif args.model_name_or_path:
config = AutoConfig.from_pretrained(args.model_name_or_path)
else:
raise ValueError(
"You are instantiating a new config instance from scratch. This is not supported by this script."
)
if args.tokenizer_name:
tokenizer = AutoTokenizer.from_pretrained(args.tokenizer_name, use_fast=not args.use_slow_tokenizer)
elif args.model_name_or_path:
tokenizer = AutoTokenizer.from_pretrained(args.model_name_or_path, use_fast=not args.use_slow_tokenizer)
else:
raise ValueError(
"You are instantiating a new tokenizer from scratch. This is not supported by this script."
"You can do it from another script, save it, and load it from here, using --tokenizer_name."
)
if args.model_name_or_path:
model = AutoModelForCausalLM.from_pretrained(
args.model_name_or_path,
from_tf=bool(".ckpt" in args.model_name_or_path),
config=config,
low_cpu_mem_usage=args.low_cpu_mem_usage,
)
else:
logger.info("Training new model from scratch")
model = AutoModelForCausalLM.from_config(config)
# no default pad token for llama!
# here we add all special tokens again, because the default ones are not in the special_tokens_map
if isinstance(tokenizer, LlamaTokenizer) or isinstance(tokenizer, LlamaTokenizerFast):
if args.use_special_tokens is True:
special_token_dict = {"additional_special_tokens": ["[No Retrieval]", "[Retrieval]", "[Continue to Use Evidence]", "[Irrelevant]", "[Relevant]", "<paragraph>", "</paragraph>", "[Utility:1]", "[Utility:2]", "[Utility:3]", "[Utility:4]", "[Utility:5]", "[Fully supported]", "[Partially supported]", "[No support / Contradictory]"]}
special_token_dict["bos_token"] = "<s>"
special_token_dict["eos_token"] = "</s>"
special_token_dict["unk_token"] = "<unk>"
special_token_dict["pad_token"] = "<pad>"
num_added_tokens = tokenizer.add_special_tokens(special_token_dict)
context_markups = []
for token in ["<paragraph>", "</paragraph>"]:
context_markups.append(tokenizer.convert_tokens_to_ids(token))
if args.use_special_tokens is False:
assert num_added_tokens in [0, 1], "LlamaTokenizer should only add one special token - the pad_token, or no tokens if pad token present."
else:
assert num_added_tokens > 10, "special tokens must be added to the original tokenizers."
elif isinstance(tokenizer, GPTNeoXTokenizerFast):
num_added_tokens = tokenizer.add_special_tokens({
"pad_token": "<pad>",
})
assert num_added_tokens == 1, "GPTNeoXTokenizer should only add one special token - the pad_token."
elif isinstance(tokenizer, GPT2Tokenizer) and isinstance(model, OPTForCausalLM):
num_added_tokens = tokenizer.add_special_tokens({'unk_token': '<unk>'})
# We resize the embeddings only when necessary to avoid index errors. If you are creating a model from scratch
# on a small vocab and want a smaller embedding size, remove this test.
embedding_size = model.get_input_embeddings().weight.shape[0]
if len(tokenizer) > embedding_size:
model.resize_token_embeddings(len(tokenizer))
if args.use_lora:
logger.info("Initializing LORA model...")
modules_to_save = ["embed_tokens"]
peft_config = LoraConfig(
task_type=TaskType.CAUSAL_LM,
inference_mode=False,
r=args.lora_rank,
#modules_to_save=modules_to_save,
lora_alpha=args.lora_alpha,
lora_dropout=args.lora_dropout
)
model = get_peft_model(model, peft_config)
model.print_trainable_parameters()
encode_function = partial(
encode_with_prompt_completion_format,
tokenizer=tokenizer,
max_seq_length=args.max_seq_length,
context_markups=context_markups if args.use_special_tokens is True else None
)
# elif "messages" in raw_datasets["train"].column_names:
# encode_function = partial(
# encode_with_messages_format,
# tokenizer=tokenizer,
# max_seq_length=args.max_seq_length,
# )
with accelerator.main_process_first():
lm_datasets = raw_datasets.map(
encode_function,
batched=False,
num_proc=args.preprocessing_num_workers,
load_from_cache_file=not args.overwrite_cache,
remove_columns=[name for name in raw_datasets["train"].column_names if name not in ["input_ids", "labels", "attention_mask"]],
desc="Tokenizing and reformatting instruction data",
)
lm_datasets.set_format(type="pt")
lm_datasets = lm_datasets.filter(lambda example: (example['labels'] != -100).any())
train_dataset = lm_datasets["train"]
#print(train_dataset[0])
#print(train_dataset[1000])
#print(train_dataset[500])
#print(train_dataset[2000])
#print(train_dataset[10000])
with open("processed.json", "w") as outfile:
new_data = []
for item in train_dataset:
print(item)
labels = [int(i) for i in item["labels"]]
input_ids = [int(i) for i in item["input_ids"]]
new_data.append({"labels": labels, "input_ids": input_ids})
json.dump(new_data, outfile)
# Log a few random samples from the training set:
for index in random.sample(range(len(train_dataset)), 3):
logger.info(f"Sample {index} of the training set: {train_dataset[index]}.")
# DataLoaders creation:
train_dataloader = DataLoader(
train_dataset,
shuffle=True,
collate_fn=DataCollatorForSeq2Seq(tokenizer=tokenizer, model=model, padding="longest"),
batch_size=args.per_device_train_batch_size
)
# Optimizer
# Split weights in two groups, one with weight decay and the other not.
no_decay = ["bias", "layer_norm.weight"]
optimizer_grouped_parameters = [
{
"params": [p for n, p in model.named_parameters() if not any(nd in n for nd in no_decay)],
"weight_decay": args.weight_decay,
},
{
"params": [p for n, p in model.named_parameters() if any(nd in n for nd in no_decay)],
"weight_decay": 0.0,
},
]
optimizer = torch.optim.AdamW(optimizer_grouped_parameters, lr=args.learning_rate)
# Scheduler and math around the number of training steps.
overrode_max_train_steps = False
num_update_steps_per_epoch = math.ceil(len(train_dataloader) / args.gradient_accumulation_steps)
if args.max_train_steps is None:
args.max_train_steps = args.num_train_epochs * num_update_steps_per_epoch
overrode_max_train_steps = True
# Create the learning rate scheduler.
# Note: the current accelerator.step() calls the .step() of the real scheduler for the `num_processes` times. This is because they assume
# the user initialize the scheduler with the entire training set. In the case of data parallel training, each process only
# sees a subset (1/num_processes) of the training set. So each time the process needs to update the lr multiple times so that the total
# number of updates in the end matches the num_training_steps here.
# Here we need to set the num_training_steps to either using the entire training set (when epochs is specified) or we need to multiply the
# num_training_steps by num_processes so that the total number of updates matches the num_training_steps.
num_training_steps_for_scheduler = args.max_train_steps if overrode_max_train_steps else args.max_train_steps * accelerator.num_processes
lr_scheduler = get_scheduler(
name=args.lr_scheduler_type,
optimizer=optimizer,
num_training_steps=num_training_steps_for_scheduler,
num_warmup_steps=int(num_training_steps_for_scheduler * args.warmup_ratio),
)
# Prepare everything with `accelerator`.
model, optimizer, train_dataloader, lr_scheduler = accelerator.prepare(
model, optimizer, train_dataloader, lr_scheduler
)
# We need to recalculate our total training steps as the size of the training dataloader may have changed.
num_update_steps_per_epoch = math.ceil(len(train_dataloader) / args.gradient_accumulation_steps)
if overrode_max_train_steps:
args.max_train_steps = args.num_train_epochs * num_update_steps_per_epoch
# Afterwards we recalculate our number of training epochs
args.num_train_epochs = math.ceil(args.max_train_steps / num_update_steps_per_epoch)
# Figure out how many steps we should save the Accelerator states
checkpointing_steps = args.checkpointing_steps
if checkpointing_steps is not None and checkpointing_steps.isdigit():
checkpointing_steps = int(checkpointing_steps)
# We need to initialize the trackers we use, and also store our configuration.
# The trackers initializes automatically on the main process.
if args.with_tracking:
experiment_config = vars(args)
# TensorBoard cannot log Enums, need the raw value
experiment_config["lr_scheduler_type"] = experiment_config["lr_scheduler_type"].value
accelerator.init_trackers("open_instruct", experiment_config)
# Train!
total_batch_size = args.per_device_train_batch_size * accelerator.num_processes * args.gradient_accumulation_steps
logger.info("***** Running training *****")
logger.info(f" Num examples = {len(train_dataset)}")
logger.info(f" Num Epochs = {args.num_train_epochs}")
logger.info(f" Instantaneous batch size per device = {args.per_device_train_batch_size}")
logger.info(f" Total train batch size (w. parallel, distributed & accumulation) = {total_batch_size}")
logger.info(f" Gradient Accumulation steps = {args.gradient_accumulation_steps}")
logger.info(f" Total optimization steps = {args.max_train_steps}")
# Only show the progress bar once on each machine.
progress_bar = tqdm(range(args.max_train_steps), disable=not accelerator.is_local_main_process)
completed_steps = 0
starting_epoch = 0
# Potentially load in the weights and states from a previous save
if args.resume_from_checkpoint:
if args.resume_from_checkpoint is not None or args.resume_from_checkpoint != "":
accelerator.print(f"Resumed from checkpoint: {args.resume_from_checkpoint}")
accelerator.load_state(args.resume_from_checkpoint)
path = os.path.basename(args.resume_from_checkpoint)
else:
# Get the most recent checkpoint
dirs = [f.name for f in os.scandir(os.getcwd()) if f.is_dir()]
dirs.sort(key=os.path.getctime)
path = dirs[-1] # Sorts folders by date modified, most recent checkpoint is the last
# Extract `epoch_{i}` or `step_{i}`
training_difference = os.path.splitext(path)[0]
if "epoch" in training_difference:
starting_epoch = int(training_difference.replace("epoch_", "")) + 1
resume_step = None
else:
# need to multiply `gradient_accumulation_steps` to reflect real steps
resume_step = int(training_difference.replace("step_", "")) * args.gradient_accumulation_steps
starting_epoch = resume_step // len(train_dataloader)
resume_step -= starting_epoch * len(train_dataloader)
# update the progress_bar if load from checkpoint
progress_bar.update(starting_epoch * num_update_steps_per_epoch)
completed_steps = starting_epoch * num_update_steps_per_epoch
for epoch in range(starting_epoch, args.num_train_epochs):
model.train()
total_loss = 0
for step, batch in enumerate(train_dataloader):
# We need to skip steps until we reach the resumed step
if args.resume_from_checkpoint and epoch == starting_epoch:
if resume_step is not None and completed_steps < resume_step:
if step % args.gradient_accumulation_steps == 0:
progress_bar.update(1)
completed_steps += 1
continue
with accelerator.accumulate(model):
outputs = model(**batch, use_cache=False)
loss = outputs.loss
# We keep track of the loss at each logged step
total_loss += loss.detach().float()
accelerator.backward(loss)
optimizer.step()
optimizer.zero_grad()
lr_scheduler.step()
# # Checks if the accelerator has performed an optimization step behind the scenes
if accelerator.sync_gradients:
progress_bar.update(1)
completed_steps += 1
if args.logging_steps and completed_steps % args.logging_steps == 0:
avg_loss = accelerator.gather(total_loss).mean().item() / args.gradient_accumulation_steps / args.logging_steps
logger.info(f" Step: {completed_steps}, LR: {lr_scheduler.get_last_lr()[0]}, Loss: {avg_loss}")
if args.with_tracking:
accelerator.log(
{
"learning_rate": lr_scheduler.get_last_lr()[0],
"train_loss": avg_loss,
},
step=completed_steps,
)
total_loss = 0
if isinstance(checkpointing_steps, int):
if completed_steps % checkpointing_steps == 0:
output_dir = f"step_{completed_steps}"
if args.output_dir is not None:
output_dir = os.path.join(args.output_dir, output_dir)
accelerator.save_state(output_dir)
if completed_steps >= args.max_train_steps:
break
if args.checkpointing_steps == "epoch":
output_dir = f"epoch_{epoch}"
if args.output_dir is not None:
output_dir = os.path.join(args.output_dir, output_dir)
accelerator.save_state(output_dir)
if args.with_tracking:
accelerator.end_training()
if args.output_dir is not None:
accelerator.wait_for_everyone()
if accelerator.is_main_process:
tokenizer.save_pretrained(args.output_dir)
unwrapped_model = accelerator.unwrap_model(model)
# When doing multi-gpu training, we need to use accelerator.get_state_dict(model) to get the state_dict.
# Otherwise, sometimes the model will be saved with only part of the parameters.
# Also, accelerator needs to use the wrapped model to get the state_dict.
state_dict = accelerator.get_state_dict(model)
if args.use_lora:
# When using lora, the unwrapped model is a PeftModel, which doesn't support the is_main_process
# and has its own save_pretrained function for only saving lora modules.
# We have to mannually specify the is_main_process outside the save_pretrained function.
if accelerator.is_main_process:
unwrapped_model.save_pretrained(args.output_dir, state_dict=state_dict)
else:
unwrapped_model.save_pretrained(
args.output_dir, is_main_process=accelerator.is_main_process, save_function=accelerator.save, state_dict=state_dict
)
if __name__ == "__main__":
main()

View File

@ -7,10 +7,21 @@
import os
import argparse
import csv
import logging
import pickle
import numpy as np
import torch
import transformers
import src.slurm
import src.contriever
import src.utils
import src.data
import src.normalize_text
def embed_passages(args, passages, model, tokenizer):
total = 0
@ -20,15 +31,15 @@ def embed_passages(args, passages, model, tokenizer):
for k, p in enumerate(passages):
batch_ids.append(p["id"])
"""if args.no_title or not "title" in p:
if args.no_title or not "title" in p:
text = p["text"]
else:
text = p["title"] + " " + p["text"]"""
text = p["title"] + " " + p["text"]
text = p["title"]
if args.lowercase:
text = text.lower()
if args.normalize_text:
text = robowaiter.llm_client.retrieval_lm.src.normalize_text.normalize(text)
text = src.normalize_text.normalize(text)
batch_text.append(text)
if len(batch_text) == args.per_gpu_batch_size or k == len(passages) - 1:
@ -41,7 +52,7 @@ def embed_passages(args, passages, model, tokenizer):
truncation=True,
)
encoded_batch = {k: v.cuda() for k, v in encoded_batch.items()}
encoded_batch = {k: v for k, v in encoded_batch.items()}
embeddings = model(**encoded_batch)
embeddings = embeddings.cpu()
@ -59,14 +70,14 @@ def embed_passages(args, passages, model, tokenizer):
def main(args):
model, tokenizer, _ = robowaiter.llm_client.retrieval_lm.src.contriever.load_retriever(args.model_name_or_path)
model, tokenizer, _ = src.contriever.load_retriever(args.model_name_or_path)
print(f"Model loaded from {args.model_name_or_path}.", flush=True)
model.eval()
model = model.cuda()
#model = model.cuda()
if not args.no_fp16:
model = model.half()
passages = robowaiter.llm_client.retrieval_lm.src.data.load_passages(args.passages)
passages = src.data.load_passages(args.passages)
shard_size = len(passages) // args.num_shards
start_idx = args.shard_id * shard_size
@ -110,6 +121,6 @@ if __name__ == "__main__":
args = parser.parse_args()
robowaiter.llm_client.retrieval_lm.src.slurm.init_distributed_mode(args)
#src.slurm.init_distributed_mode(args)
main(args)

View File

@ -0,0 +1,11 @@
#export CUDA_VISIBLE_DEVICES=0
python ../generate_passage_embeddings.py \
--model_name_or_path ../../model/contriever-msmarco \
--passages train_robot.jsonl \
--output_dir robot_embeddings \
--shard_id 0 \
--num_shards 1 \
--per_gpu_batch_size 500
python generate_passage_embeddings.py --model_name_or_path ../contriever-msmarco --passages train_robot.jsonl --output_dir robot_embeddings --shard_id 0 --num_shards 1 --per_gpu_batch_size 500 --no_fp16

View File

@ -50,7 +50,7 @@ def embed_queries(args, queries, model, tokenizer):
padding=True,
truncation=True,
)
encoded_batch = {k: v.cuda() for k, v in encoded_batch.items()}
encoded_batch = {k: v for k, v in encoded_batch.items()}
output = model(**encoded_batch)
embeddings.append(output.cpu())
@ -111,7 +111,6 @@ def add_passages(data, passages, top_passages_and_scores):
assert len(data) == len(top_passages_and_scores)
for i, d in enumerate(data):
results_and_scores = top_passages_and_scores[i]
#print(passages[2393])
docs = [passages[int(doc_id)] for doc_id in results_and_scores[0]]
scores = [str(score) for score in results_and_scores[1]]
ctxs_num = len(docs)
@ -139,7 +138,7 @@ def load_data(data_path):
data = json.load(fin)
elif data_path.endswith(".jsonl"):
data = []
with open(data_path, "r") as fin:
with open(data_path, "r",encoding='utf-8') as fin:
for k, example in enumerate(fin):
example = json.loads(example)
data.append(example)
@ -151,7 +150,7 @@ def main(args):
print(f"Loading model from: {args.model_name_or_path}")
model, tokenizer, _ = src.contriever.load_retriever(args.model_name_or_path)
model.eval()
model = model.cuda()
#model = model.cuda()
if not args.no_fp16:
model = model.half()
@ -194,7 +193,7 @@ def main(args):
#hasanswer = validate(data, args.validation_workers)
#add_hasanswer(data, hasanswer)
os.makedirs(os.path.dirname(output_path), exist_ok=True)
with open(output_path, "w") as fout:
with open(output_path, "w",encoding='utf-8') as fout:
for ex in data:
json.dump(ex, fout, ensure_ascii=False)
fout.write("\n")
@ -246,5 +245,5 @@ if __name__ == "__main__":
parser.add_argument("--normalize_text", action="store_true", help="normalize text")
args = parser.parse_args()
src.slurm.init_distributed_mode(args)
#src.slurm.init_distributed_mode(args)
main(args)

View File

@ -0,0 +1,69 @@
import json
import jsonlines
import argparse
def train(args):
# clear jsonl file
with open("train_robot.jsonl", "a") as file_jsonl:
file_jsonl.truncate(0)
filename = args.passages
with open(filename, 'r', encoding="utf-8") as f:
k = 0
for line in f:
data = json.loads(line)
dict = {"id": k, 'title': data['title'], 'text': data['text']}
k += 1
with jsonlines.open("train_robot.jsonl", "a") as file_jsonl:
file_jsonl.write(dict)
def test(args):
# clear
with open("test_robot.jsonl", "a") as file_jsonl:
file_jsonl.truncate(0)
filename = args.passages
with open(filename, 'r', encoding="utf-8") as f:
# k=0
for line in f:
# if k<1000:
data = json.loads(line)
dict = {"id": data['id'], 'question': data['title'], 'answers': data['text']}
# k+=1
with jsonlines.open("test_robot.jsonl", "a") as file_jsonl:
file_jsonl.write(dict)
def test(args):
# clear
with open("test_robot.jsonl", "a") as file_jsonl:
file_jsonl.truncate(0)
filename = args.passages
with open(filename, 'r', encoding="utf-8") as f:
k = 0
for line in f:
# if k<1000:
data = json.loads(line)
dict = {"id": k, 'question': data['title']}
k += 1
with jsonlines.open("test_robot.jsonl", "a") as file_jsonl:
file_jsonl.write(dict)
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--passages", type=str, default=None, help="Path to passages")
parser.add_argument("--mode", type=str, default=None, help="train or test")
args = parser.parse_args()
if args.mode == 'train':
train(args)
elif args.mode == 'test':
test(args)
else:
print("error mode!")

View File

@ -0,0 +1,193 @@
{"id": 0, "question": "你能过来一下吗?我在吧台这里。", "ctxs": [{"id": "0", "title": "你能过来一下吗?我在吧台这里。", "text": "At(Robot,Bar)", "score": "2.2210662"}, {"id": "6", "title": "你能过来一下吗?我在咖啡桌这里。", "text": "At(Robot,CoffeeTable)", "score": "2.207662"}, {"id": "3", "title": "你能过来一下吗?我在茶水桌这里。", "text": "At(Robot,WaterTable)", "score": "2.1896772"}]}
{"id": 1, "question": "麻烦你去一下吧台。", "ctxs": [{"id": "1", "title": "麻烦你去一下吧台。", "text": "At(Robot,Bar)", "score": "2.21347"}, {"id": "7", "title": "麻烦你去一下咖啡桌。", "text": "At(Robot,CoffeeTable)", "score": "2.1876833"}, {"id": "16", "title": "麻烦你去一下第二张桌子。", "text": "At(Robot,Table2)", "score": "2.1356342"}]}
{"id": 2, "question": "你能去吧台那个位置吗?", "ctxs": [{"id": "8", "title": "你能去咖啡桌那个位置吗?", "text": "At(Robot,CoffeeTable)", "score": "1.5046918"}, {"id": "2", "title": "你能去吧台那个位置吗?", "text": "At(Robot,Bar)", "score": "1.489654"}, {"id": "138", "title": "你能一直拿着瓶装饮料吗?", "text": "Holding(BottledDrink)", "score": "1.4080979"}]}
{"id": 3, "question": "你能过来一下吗?我在茶水桌这里。", "ctxs": [{"id": "3", "title": "你能过来一下吗?我在茶水桌这里。", "text": "At(Robot,WaterTable)", "score": "2.2788658"}, {"id": "0", "title": "你能过来一下吗?我在吧台这里。", "text": "At(Robot,Bar)", "score": "2.1896772"}, {"id": "6", "title": "你能过来一下吗?我在咖啡桌这里。", "text": "At(Robot,CoffeeTable)", "score": "2.1854284"}]}
{"id": 4, "question": "麻烦你去一下茶水桌。", "ctxs": [{"id": "4", "title": "麻烦你去一下茶水桌。", "text": "At(Robot,WaterTable)", "score": "2.2849789"}, {"id": "94", "title": "请你拿一下牛奶到茶水桌位置。", "text": "On(Milk,WaterTable)", "score": "2.148037"}, {"id": "52", "title": "请你拿一下酸奶到茶水桌位置。", "text": "On(Yogurt,WaterTable)", "score": "2.148037"}]}
{"id": 5, "question": "你能去茶水桌那个位置吗?", "ctxs": [{"id": "5", "title": "你能去茶水桌那个位置吗?", "text": "At(Robot,WaterTable)", "score": "1.6385493"}, {"id": "165", "title": "你能制作水并把它端到吧台这里来吗?", "text": "On(Water,Bar)", "score": "1.5464401"}, {"id": "175", "title": "你能制作水并把它端到第二张桌子这里来吗?", "text": "On(Water,Table2)", "score": "1.5391011"}]}
{"id": 6, "question": "你能过来一下吗?我在咖啡桌这里。", "ctxs": [{"id": "0", "title": "你能过来一下吗?我在吧台这里。", "text": "At(Robot,Bar)", "score": "2.207662"}, {"id": "6", "title": "你能过来一下吗?我在咖啡桌这里。", "text": "At(Robot,CoffeeTable)", "score": "2.2016313"}, {"id": "3", "title": "你能过来一下吗?我在茶水桌这里。", "text": "At(Robot,WaterTable)", "score": "2.1854277"}]}
{"id": 7, "question": "麻烦你去一下咖啡桌。", "ctxs": [{"id": "1", "title": "麻烦你去一下吧台。", "text": "At(Robot,Bar)", "score": "2.1876833"}, {"id": "7", "title": "麻烦你去一下咖啡桌。", "text": "At(Robot,CoffeeTable)", "score": "2.1852162"}, {"id": "50", "title": "请你拿一下酸奶到吧台位置。", "text": "On(Yogurt,Bar)", "score": "2.135912"}]}
{"id": 8, "question": "你能去咖啡桌那个位置吗?", "ctxs": [{"id": "8", "title": "你能去咖啡桌那个位置吗?", "text": "At(Robot,CoffeeTable)", "score": "1.5478101"}, {"id": "2", "title": "你能去吧台那个位置吗?", "text": "At(Robot,Bar)", "score": "1.5046918"}, {"id": "138", "title": "你能一直拿着瓶装饮料吗?", "text": "Holding(BottledDrink)", "score": "1.4410754"}]}
{"id": 9, "question": "你能过来一下吗?我在另一个吧台这里。", "ctxs": [{"id": "3", "title": "你能过来一下吗?我在茶水桌这里。", "text": "At(Robot,WaterTable)", "score": "2.175627"}, {"id": "0", "title": "你能过来一下吗?我在吧台这里。", "text": "At(Robot,Bar)", "score": "2.167008"}, {"id": "6", "title": "你能过来一下吗?我在咖啡桌这里。", "text": "At(Robot,CoffeeTable)", "score": "2.1638477"}]}
{"id": 10, "question": "麻烦你去一下另一个吧台。", "ctxs": [{"id": "7", "title": "麻烦你去一下咖啡桌。", "text": "At(Robot,CoffeeTable)", "score": "2.0948215"}, {"id": "1", "title": "麻烦你去一下吧台。", "text": "At(Robot,Bar)", "score": "2.0865507"}, {"id": "50", "title": "请你拿一下酸奶到吧台位置。", "text": "On(Yogurt,Bar)", "score": "2.0818815"}]}
{"id": 11, "question": "你能去另一个吧台那个位置吗?", "ctxs": [{"id": "138", "title": "你能一直拿着瓶装饮料吗?", "text": "Holding(BottledDrink)", "score": "1.5019734"}, {"id": "146", "title": "你能一直拿着牛奶吗?", "text": "Holding(Milk)", "score": "1.476924"}, {"id": "140", "title": "你能一直拿着酸奶吗?", "text": "Holding(Yogurt)", "score": "1.476924"}]}
{"id": 12, "question": "你能过来一下吗?我在第一张桌子这里。", "ctxs": [{"id": "0", "title": "你能过来一下吗?我在吧台这里。", "text": "At(Robot,Bar)", "score": "2.1593013"}, {"id": "3", "title": "你能过来一下吗?我在茶水桌这里。", "text": "At(Robot,WaterTable)", "score": "2.1536334"}, {"id": "6", "title": "你能过来一下吗?我在咖啡桌这里。", "text": "At(Robot,CoffeeTable)", "score": "2.1526577"}]}
{"id": 13, "question": "麻烦你去一下第一张桌子。", "ctxs": [{"id": "13", "title": "麻烦你去一下第一张桌子。", "text": "At(Robot,Table1)", "score": "2.175003"}, {"id": "16", "title": "麻烦你去一下第二张桌子。", "text": "At(Robot,Table2)", "score": "2.1714652"}, {"id": "1", "title": "麻烦你去一下吧台。", "text": "At(Robot,Bar)", "score": "2.1199508"}]}
{"id": 14, "question": "你能去第一张桌子那个位置吗?", "ctxs": [{"id": "130", "title": "你能把椅子打扫干净一下吗?", "text": "Is(Chairs,Off)", "score": "1.5790088"}, {"id": "14", "title": "你能去第一张桌子那个位置吗?", "text": "At(Robot,Table1)", "score": "1.5581357"}, {"id": "129", "title": "你能把椅子脏一下吗?", "text": "Is(Chairs,On)", "score": "1.5516653"}]}
{"id": 15, "question": "你能过来一下吗?我在第二张桌子这里。", "ctxs": [{"id": "3", "title": "你能过来一下吗?我在茶水桌这里。", "text": "At(Robot,WaterTable)", "score": "2.176736"}, {"id": "15", "title": "你能过来一下吗?我在第二张桌子这里。", "text": "At(Robot,Table2)", "score": "2.1763327"}, {"id": "0", "title": "你能过来一下吗?我在吧台这里。", "text": "At(Robot,Bar)", "score": "2.1637595"}]}
{"id": 16, "question": "麻烦你去一下第二张桌子。", "ctxs": [{"id": "16", "title": "麻烦你去一下第二张桌子。", "text": "At(Robot,Table2)", "score": "2.2484295"}, {"id": "13", "title": "麻烦你去一下第一张桌子。", "text": "At(Robot,Table1)", "score": "2.1714652"}, {"id": "19", "title": "麻烦你去一下第三张桌子。", "text": "At(Robot,Table3)", "score": "2.149002"}]}
{"id": 17, "question": "你能去第二张桌子那个位置吗?", "ctxs": [{"id": "17", "title": "你能去第二张桌子那个位置吗?", "text": "At(Robot,Table2)", "score": "1.6040181"}, {"id": "101", "title": "麻烦你把牛奶放到第二张桌子那个位置。", "text": "On(Milk,Table2)", "score": "1.5413499"}, {"id": "59", "title": "麻烦你把酸奶放到第二张桌子那个位置。", "text": "On(Yogurt,Table2)", "score": "1.5413499"}]}
{"id": 18, "question": "你能过来一下吗?我在第三张桌子这里。", "ctxs": [{"id": "18", "title": "你能过来一下吗?我在第三张桌子这里。", "text": "At(Robot,Table3)", "score": "2.2585113"}, {"id": "3", "title": "你能过来一下吗?我在茶水桌这里。", "text": "At(Robot,WaterTable)", "score": "2.169298"}, {"id": "15", "title": "你能过来一下吗?我在第二张桌子这里。", "text": "At(Robot,Table2)", "score": "2.1540859"}]}
{"id": 19, "question": "麻烦你去一下第三张桌子。", "ctxs": [{"id": "19", "title": "麻烦你去一下第三张桌子。", "text": "At(Robot,Table3)", "score": "2.3972979"}, {"id": "104", "title": "请你拿一下牛奶到第三张桌子位置。", "text": "On(Milk,Table3)", "score": "2.2423108"}, {"id": "62", "title": "请你拿一下酸奶到第三张桌子位置。", "text": "On(Yogurt,Table3)", "score": "2.2423108"}]}
{"id": 20, "question": "你能去第三张桌子那个位置吗?", "ctxs": [{"id": "20", "title": "你能去第三张桌子那个位置吗?", "text": "At(Robot,Table3)", "score": "1.8059924"}, {"id": "103", "title": "麻烦你把牛奶放到第三张桌子那个位置。", "text": "On(Milk,Table3)", "score": "1.7029464"}, {"id": "61", "title": "麻烦你把酸奶放到第三张桌子那个位置。", "text": "On(Yogurt,Table3)", "score": "1.7029464"}]}
{"id": 21, "question": "麻烦你把盒装冰红茶放到吧台那个位置。", "ctxs": [{"id": "91", "title": "麻烦你把牛奶放到吧台那个位置。", "text": "On(Milk,Bar)", "score": "1.874932"}, {"id": "49", "title": "麻烦你把酸奶放到吧台那个位置。", "text": "On(Yogurt,Bar)", "score": "1.874932"}, {"id": "53", "title": "麻烦你把酸奶放到咖啡桌那个位置。", "text": "On(Yogurt,CoffeeTable)", "score": "1.8504529"}]}
{"id": 22, "question": "请你拿一下盒装冰红茶到吧台位置。", "ctxs": [{"id": "7", "title": "麻烦你去一下咖啡桌。", "text": "At(Robot,CoffeeTable)", "score": "2.0240154"}, {"id": "1", "title": "麻烦你去一下吧台。", "text": "At(Robot,Bar)", "score": "2.0194452"}, {"id": "50", "title": "请你拿一下酸奶到吧台位置。", "text": "On(Yogurt,Bar)", "score": "2.0181313"}]}
{"id": 23, "question": "麻烦你把盒装冰红茶放到茶水桌那个位置。", "ctxs": [{"id": "93", "title": "麻烦你把牛奶放到茶水桌那个位置。", "text": "On(Milk,WaterTable)", "score": "1.9845532"}, {"id": "51", "title": "麻烦你把酸奶放到茶水桌那个位置。", "text": "On(Yogurt,WaterTable)", "score": "1.9845532"}, {"id": "37", "title": "麻烦你把瓶装饮料放到茶水桌那个位置。", "text": "On(BottledDrink,WaterTable)", "score": "1.9574414"}]}
{"id": 24, "question": "请你拿一下盒装冰红茶到茶水桌位置。", "ctxs": [{"id": "4", "title": "麻烦你去一下茶水桌。", "text": "At(Robot,WaterTable)", "score": "2.0689526"}, {"id": "94", "title": "请你拿一下牛奶到茶水桌位置。", "text": "On(Milk,WaterTable)", "score": "2.0470622"}, {"id": "52", "title": "请你拿一下酸奶到茶水桌位置。", "text": "On(Yogurt,WaterTable)", "score": "2.0470622"}]}
{"id": 25, "question": "麻烦你把盒装冰红茶放到咖啡桌那个位置。", "ctxs": [{"id": "91", "title": "麻烦你把牛奶放到吧台那个位置。", "text": "On(Milk,Bar)", "score": "1.8703386"}, {"id": "49", "title": "麻烦你把酸奶放到吧台那个位置。", "text": "On(Yogurt,Bar)", "score": "1.8703386"}, {"id": "53", "title": "麻烦你把酸奶放到咖啡桌那个位置。", "text": "On(Yogurt,CoffeeTable)", "score": "1.8489027"}]}
{"id": 26, "question": "请你拿一下盒装冰红茶到咖啡桌位置。", "ctxs": [{"id": "92", "title": "请你拿一下牛奶到吧台位置。", "text": "On(Milk,Bar)", "score": "2.0020492"}, {"id": "50", "title": "请你拿一下酸奶到吧台位置。", "text": "On(Yogurt,Bar)", "score": "2.0020492"}, {"id": "7", "title": "麻烦你去一下咖啡桌。", "text": "At(Robot,CoffeeTable)", "score": "2.001319"}]}
{"id": 27, "question": "麻烦你把盒装冰红茶放到另一个吧台那个位置。", "ctxs": [{"id": "29", "title": "麻烦你把盒装冰红茶放到第一张桌子那个位置。", "text": "On(Softdrink,Table1)", "score": "1.862219"}, {"id": "92", "title": "请你拿一下牛奶到吧台位置。", "text": "On(Milk,Bar)", "score": "1.853863"}, {"id": "50", "title": "请你拿一下酸奶到吧台位置。", "text": "On(Yogurt,Bar)", "score": "1.853863"}]}
{"id": 28, "question": "请你拿一下盒装冰红茶到另一个吧台位置。", "ctxs": [{"id": "92", "title": "请你拿一下牛奶到吧台位置。", "text": "On(Milk,Bar)", "score": "1.9625456"}, {"id": "50", "title": "请你拿一下酸奶到吧台位置。", "text": "On(Yogurt,Bar)", "score": "1.9625456"}, {"id": "7", "title": "麻烦你去一下咖啡桌。", "text": "At(Robot,CoffeeTable)", "score": "1.9616535"}]}
{"id": 29, "question": "麻烦你把盒装冰红茶放到第一张桌子那个位置。", "ctxs": [{"id": "29", "title": "麻烦你把盒装冰红茶放到第一张桌子那个位置。", "text": "On(Softdrink,Table1)", "score": "2.0559533"}, {"id": "99", "title": "麻烦你把牛奶放到第一张桌子那个位置。", "text": "On(Milk,Table1)", "score": "2.0393207"}, {"id": "57", "title": "麻烦你把酸奶放到第一张桌子那个位置。", "text": "On(Yogurt,Table1)", "score": "2.0393207"}]}
{"id": 30, "question": "请你拿一下盒装冰红茶到第一张桌子位置。", "ctxs": [{"id": "13", "title": "麻烦你去一下第一张桌子。", "text": "At(Robot,Table1)", "score": "2.0131223"}, {"id": "16", "title": "麻烦你去一下第二张桌子。", "text": "At(Robot,Table2)", "score": "2.012226"}, {"id": "57", "title": "麻烦你把酸奶放到第一张桌子那个位置。", "text": "On(Yogurt,Table1)", "score": "1.9932513"}]}
{"id": 31, "question": "麻烦你把盒装冰红茶放到第二张桌子那个位置。", "ctxs": [{"id": "31", "title": "麻烦你把盒装冰红茶放到第二张桌子那个位置。", "text": "On(Softdrink,Table2)", "score": "2.0659785"}, {"id": "101", "title": "麻烦你把牛奶放到第二张桌子那个位置。", "text": "On(Milk,Table2)", "score": "2.0580466"}, {"id": "59", "title": "麻烦你把酸奶放到第二张桌子那个位置。", "text": "On(Yogurt,Table2)", "score": "2.0580466"}]}
{"id": 32, "question": "请你拿一下盒装冰红茶到第二张桌子位置。", "ctxs": [{"id": "16", "title": "麻烦你去一下第二张桌子。", "text": "At(Robot,Table2)", "score": "2.0539317"}, {"id": "13", "title": "麻烦你去一下第一张桌子。", "text": "At(Robot,Table1)", "score": "2.014954"}, {"id": "46", "title": "请你拿一下瓶装饮料到第二张桌子位置。", "text": "On(BottledDrink,Table2)", "score": "2.0133667"}]}
{"id": 33, "question": "麻烦你把盒装冰红茶放到第三张桌子那个位置。", "ctxs": [{"id": "33", "title": "麻烦你把盒装冰红茶放到第三张桌子那个位置。", "text": "On(Softdrink,Table3)", "score": "2.1700723"}, {"id": "103", "title": "麻烦你把牛奶放到第三张桌子那个位置。", "text": "On(Milk,Table3)", "score": "2.165433"}, {"id": "61", "title": "麻烦你把酸奶放到第三张桌子那个位置。", "text": "On(Yogurt,Table3)", "score": "2.165433"}]}
{"id": 34, "question": "请你拿一下盒装冰红茶到第三张桌子位置。", "ctxs": [{"id": "19", "title": "麻烦你去一下第三张桌子。", "text": "At(Robot,Table3)", "score": "2.1692095"}, {"id": "104", "title": "请你拿一下牛奶到第三张桌子位置。", "text": "On(Milk,Table3)", "score": "2.1099033"}, {"id": "62", "title": "请你拿一下酸奶到第三张桌子位置。", "text": "On(Yogurt,Table3)", "score": "2.1099033"}]}
{"id": 35, "question": "麻烦你把瓶装饮料放到吧台那个位置。", "ctxs": [{"id": "91", "title": "麻烦你把牛奶放到吧台那个位置。", "text": "On(Milk,Bar)", "score": "1.9075329"}, {"id": "49", "title": "麻烦你把酸奶放到吧台那个位置。", "text": "On(Yogurt,Bar)", "score": "1.9075329"}, {"id": "53", "title": "麻烦你把酸奶放到咖啡桌那个位置。", "text": "On(Yogurt,CoffeeTable)", "score": "1.8816154"}]}
{"id": 36, "question": "请你拿一下瓶装饮料到吧台位置。", "ctxs": [{"id": "7", "title": "麻烦你去一下咖啡桌。", "text": "At(Robot,CoffeeTable)", "score": "2.0687594"}, {"id": "1", "title": "麻烦你去一下吧台。", "text": "At(Robot,Bar)", "score": "2.065325"}, {"id": "50", "title": "请你拿一下酸奶到吧台位置。", "text": "On(Yogurt,Bar)", "score": "2.0598605"}]}
{"id": 37, "question": "麻烦你把瓶装饮料放到茶水桌那个位置。", "ctxs": [{"id": "93", "title": "麻烦你把牛奶放到茶水桌那个位置。", "text": "On(Milk,WaterTable)", "score": "2.0028086"}, {"id": "51", "title": "麻烦你把酸奶放到茶水桌那个位置。", "text": "On(Yogurt,WaterTable)", "score": "2.0028086"}, {"id": "37", "title": "麻烦你把瓶装饮料放到茶水桌那个位置。", "text": "On(BottledDrink,WaterTable)", "score": "1.9745988"}]}
{"id": 38, "question": "请你拿一下瓶装饮料到茶水桌位置。", "ctxs": [{"id": "4", "title": "麻烦你去一下茶水桌。", "text": "At(Robot,WaterTable)", "score": "2.0751278"}, {"id": "94", "title": "请你拿一下牛奶到茶水桌位置。", "text": "On(Milk,WaterTable)", "score": "2.0493834"}, {"id": "52", "title": "请你拿一下酸奶到茶水桌位置。", "text": "On(Yogurt,WaterTable)", "score": "2.0493834"}]}
{"id": 39, "question": "麻烦你把瓶装饮料放到咖啡桌那个位置。", "ctxs": [{"id": "91", "title": "麻烦你把牛奶放到吧台那个位置。", "text": "On(Milk,Bar)", "score": "1.874932"}, {"id": "49", "title": "麻烦你把酸奶放到吧台那个位置。", "text": "On(Yogurt,Bar)", "score": "1.874932"}, {"id": "53", "title": "麻烦你把酸奶放到咖啡桌那个位置。", "text": "On(Yogurt,CoffeeTable)", "score": "1.8504529"}]}
{"id": 40, "question": "请你拿一下瓶装饮料到咖啡桌位置。", "ctxs": [{"id": "7", "title": "麻烦你去一下咖啡桌。", "text": "At(Robot,CoffeeTable)", "score": "2.0240154"}, {"id": "1", "title": "麻烦你去一下吧台。", "text": "At(Robot,Bar)", "score": "2.0194452"}, {"id": "50", "title": "请你拿一下酸奶到吧台位置。", "text": "On(Yogurt,Bar)", "score": "2.0181313"}]}
{"id": 41, "question": "麻烦你把瓶装饮料放到另一个吧台那个位置。", "ctxs": [{"id": "92", "title": "请你拿一下牛奶到吧台位置。", "text": "On(Milk,Bar)", "score": "1.8852437"}, {"id": "50", "title": "请你拿一下酸奶到吧台位置。", "text": "On(Yogurt,Bar)", "score": "1.8852437"}, {"id": "29", "title": "麻烦你把盒装冰红茶放到第一张桌子那个位置。", "text": "On(Softdrink,Table1)", "score": "1.8803444"}]}
{"id": 42, "question": "请你拿一下瓶装饮料到另一个吧台位置。", "ctxs": [{"id": "92", "title": "请你拿一下牛奶到吧台位置。", "text": "On(Milk,Bar)", "score": "1.9760293"}, {"id": "50", "title": "请你拿一下酸奶到吧台位置。", "text": "On(Yogurt,Bar)", "score": "1.9760293"}, {"id": "7", "title": "麻烦你去一下咖啡桌。", "text": "At(Robot,CoffeeTable)", "score": "1.9753267"}]}
{"id": 43, "question": "麻烦你把瓶装饮料放到第一张桌子那个位置。", "ctxs": [{"id": "29", "title": "麻烦你把盒装冰红茶放到第一张桌子那个位置。", "text": "On(Softdrink,Table1)", "score": "2.0273366"}, {"id": "99", "title": "麻烦你把牛奶放到第一张桌子那个位置。", "text": "On(Milk,Table1)", "score": "2.0262237"}, {"id": "57", "title": "麻烦你把酸奶放到第一张桌子那个位置。", "text": "On(Yogurt,Table1)", "score": "2.0262237"}]}
{"id": 44, "question": "请你拿一下瓶装饮料到第一张桌子位置。", "ctxs": [{"id": "16", "title": "麻烦你去一下第二张桌子。", "text": "At(Robot,Table2)", "score": "2.03044"}, {"id": "13", "title": "麻烦你去一下第一张桌子。", "text": "At(Robot,Table1)", "score": "2.0267713"}, {"id": "1", "title": "麻烦你去一下吧台。", "text": "At(Robot,Bar)", "score": "2.0052567"}]}
{"id": 45, "question": "麻烦你把瓶装饮料放到第二张桌子那个位置。", "ctxs": [{"id": "101", "title": "麻烦你把牛奶放到第二张桌子那个位置。", "text": "On(Milk,Table2)", "score": "2.0567362"}, {"id": "59", "title": "麻烦你把酸奶放到第二张桌子那个位置。", "text": "On(Yogurt,Table2)", "score": "2.0567362"}, {"id": "31", "title": "麻烦你把盒装冰红茶放到第二张桌子那个位置。", "text": "On(Softdrink,Table2)", "score": "2.0418274"}]}
{"id": 46, "question": "请你拿一下瓶装饮料到第二张桌子位置。", "ctxs": [{"id": "16", "title": "麻烦你去一下第二张桌子。", "text": "At(Robot,Table2)", "score": "2.0873504"}, {"id": "46", "title": "请你拿一下瓶装饮料到第二张桌子位置。", "text": "On(BottledDrink,Table2)", "score": "2.0418844"}, {"id": "60", "title": "请你拿一下酸奶到第二张桌子位置。", "text": "On(Yogurt,Table2)", "score": "2.0416093"}]}
{"id": 47, "question": "麻烦你把瓶装饮料放到第三张桌子那个位置。", "ctxs": [{"id": "103", "title": "麻烦你把牛奶放到第三张桌子那个位置。", "text": "On(Milk,Table3)", "score": "2.1602125"}, {"id": "61", "title": "麻烦你把酸奶放到第三张桌子那个位置。", "text": "On(Yogurt,Table3)", "score": "2.1602125"}, {"id": "33", "title": "麻烦你把盒装冰红茶放到第三张桌子那个位置。", "text": "On(Softdrink,Table3)", "score": "2.1454616"}]}
{"id": 48, "question": "请你拿一下瓶装饮料到第三张桌子位置。", "ctxs": [{"id": "19", "title": "麻烦你去一下第三张桌子。", "text": "At(Robot,Table3)", "score": "2.1836963"}, {"id": "104", "title": "请你拿一下牛奶到第三张桌子位置。", "text": "On(Milk,Table3)", "score": "2.1179862"}, {"id": "62", "title": "请你拿一下酸奶到第三张桌子位置。", "text": "On(Yogurt,Table3)", "score": "2.1179862"}]}
{"id": 49, "question": "麻烦你把酸奶放到吧台那个位置。", "ctxs": [{"id": "91", "title": "麻烦你把牛奶放到吧台那个位置。", "text": "On(Milk,Bar)", "score": "1.9675336"}, {"id": "49", "title": "麻烦你把酸奶放到吧台那个位置。", "text": "On(Yogurt,Bar)", "score": "1.9675336"}, {"id": "53", "title": "麻烦你把酸奶放到咖啡桌那个位置。", "text": "On(Yogurt,CoffeeTable)", "score": "1.9308141"}]}
{"id": 50, "question": "请你拿一下酸奶到吧台位置。", "ctxs": [{"id": "92", "title": "请你拿一下牛奶到吧台位置。", "text": "On(Milk,Bar)", "score": "2.140599"}, {"id": "50", "title": "请你拿一下酸奶到吧台位置。", "text": "On(Yogurt,Bar)", "score": "2.140599"}, {"id": "7", "title": "麻烦你去一下咖啡桌。", "text": "At(Robot,CoffeeTable)", "score": "2.135912"}]}
{"id": 51, "question": "麻烦你把酸奶放到茶水桌那个位置。", "ctxs": [{"id": "93", "title": "麻烦你把牛奶放到茶水桌那个位置。", "text": "On(Milk,WaterTable)", "score": "2.0631223"}, {"id": "51", "title": "麻烦你把酸奶放到茶水桌那个位置。", "text": "On(Yogurt,WaterTable)", "score": "2.0631223"}, {"id": "4", "title": "麻烦你去一下茶水桌。", "text": "At(Robot,WaterTable)", "score": "2.029068"}]}
{"id": 52, "question": "请你拿一下酸奶到茶水桌位置。", "ctxs": [{"id": "4", "title": "麻烦你去一下茶水桌。", "text": "At(Robot,WaterTable)", "score": "2.148037"}, {"id": "94", "title": "请你拿一下牛奶到茶水桌位置。", "text": "On(Milk,WaterTable)", "score": "2.1236286"}, {"id": "52", "title": "请你拿一下酸奶到茶水桌位置。", "text": "On(Yogurt,WaterTable)", "score": "2.1236286"}]}
{"id": 53, "question": "麻烦你把酸奶放到咖啡桌那个位置。", "ctxs": [{"id": "91", "title": "麻烦你把牛奶放到吧台那个位置。", "text": "On(Milk,Bar)", "score": "1.9308143"}, {"id": "49", "title": "麻烦你把酸奶放到吧台那个位置。", "text": "On(Yogurt,Bar)", "score": "1.9308143"}, {"id": "53", "title": "麻烦你把酸奶放到咖啡桌那个位置。", "text": "On(Yogurt,CoffeeTable)", "score": "1.9049003"}]}
{"id": 54, "question": "请你拿一下酸奶到咖啡桌位置。", "ctxs": [{"id": "7", "title": "麻烦你去一下咖啡桌。", "text": "At(Robot,CoffeeTable)", "score": "2.0845027"}, {"id": "92", "title": "请你拿一下牛奶到吧台位置。", "text": "On(Milk,Bar)", "score": "2.080674"}, {"id": "50", "title": "请你拿一下酸奶到吧台位置。", "text": "On(Yogurt,Bar)", "score": "2.080674"}]}
{"id": 55, "question": "麻烦你把酸奶放到另一个吧台那个位置。", "ctxs": [{"id": "92", "title": "请你拿一下牛奶到吧台位置。", "text": "On(Milk,Bar)", "score": "1.9284543"}, {"id": "50", "title": "请你拿一下酸奶到吧台位置。", "text": "On(Yogurt,Bar)", "score": "1.9284543"}, {"id": "7", "title": "麻烦你去一下咖啡桌。", "text": "At(Robot,CoffeeTable)", "score": "1.9125285"}]}
{"id": 56, "question": "请你拿一下酸奶到另一个吧台位置。", "ctxs": [{"id": "7", "title": "麻烦你去一下咖啡桌。", "text": "At(Robot,CoffeeTable)", "score": "2.0125577"}, {"id": "1", "title": "麻烦你去一下吧台。", "text": "At(Robot,Bar)", "score": "2.011784"}, {"id": "50", "title": "请你拿一下酸奶到吧台位置。", "text": "On(Yogurt,Bar)", "score": "2.002036"}]}
{"id": 57, "question": "麻烦你把酸奶放到第一张桌子那个位置。", "ctxs": [{"id": "99", "title": "麻烦你把牛奶放到第一张桌子那个位置。", "text": "On(Milk,Table1)", "score": "2.0622241"}, {"id": "57", "title": "麻烦你把酸奶放到第一张桌子那个位置。", "text": "On(Yogurt,Table1)", "score": "2.0622241"}, {"id": "29", "title": "麻烦你把盒装冰红茶放到第一张桌子那个位置。", "text": "On(Softdrink,Table1)", "score": "2.039321"}]}
{"id": 58, "question": "请你拿一下酸奶到第一张桌子位置。", "ctxs": [{"id": "16", "title": "麻烦你去一下第二张桌子。", "text": "At(Robot,Table2)", "score": "2.071279"}, {"id": "13", "title": "麻烦你去一下第一张桌子。", "text": "At(Robot,Table1)", "score": "2.0693932"}, {"id": "7", "title": "麻烦你去一下咖啡桌。", "text": "At(Robot,CoffeeTable)", "score": "2.0339222"}]}
{"id": 59, "question": "麻烦你把酸奶放到第二张桌子那个位置。", "ctxs": [{"id": "101", "title": "麻烦你把牛奶放到第二张桌子那个位置。", "text": "On(Milk,Table2)", "score": "2.1030464"}, {"id": "59", "title": "麻烦你把酸奶放到第二张桌子那个位置。", "text": "On(Yogurt,Table2)", "score": "2.1030464"}, {"id": "16", "title": "麻烦你去一下第二张桌子。", "text": "At(Robot,Table2)", "score": "2.0705492"}]}
{"id": 60, "question": "请你拿一下酸奶到第二张桌子位置。", "ctxs": [{"id": "16", "title": "麻烦你去一下第二张桌子。", "text": "At(Robot,Table2)", "score": "2.1219845"}, {"id": "102", "title": "请你拿一下牛奶到第二张桌子位置。", "text": "On(Milk,Table2)", "score": "2.063291"}, {"id": "60", "title": "请你拿一下酸奶到第二张桌子位置。", "text": "On(Yogurt,Table2)", "score": "2.063291"}]}
{"id": 61, "question": "麻烦你把酸奶放到第三张桌子那个位置。", "ctxs": [{"id": "103", "title": "麻烦你把牛奶放到第三张桌子那个位置。", "text": "On(Milk,Table3)", "score": "2.2029889"}, {"id": "61", "title": "麻烦你把酸奶放到第三张桌子那个位置。", "text": "On(Yogurt,Table3)", "score": "2.2029889"}, {"id": "19", "title": "麻烦你去一下第三张桌子。", "text": "At(Robot,Table3)", "score": "2.1801229"}]}
{"id": 62, "question": "请你拿一下酸奶到第三张桌子位置。", "ctxs": [{"id": "19", "title": "麻烦你去一下第三张桌子。", "text": "At(Robot,Table3)", "score": "2.2423108"}, {"id": "104", "title": "请你拿一下牛奶到第三张桌子位置。", "text": "On(Milk,Table3)", "score": "2.160471"}, {"id": "62", "title": "请你拿一下酸奶到第三张桌子位置。", "text": "On(Yogurt,Table3)", "score": "2.160471"}]}
{"id": 63, "question": "麻烦你把AD钙奶放到吧台那个位置。", "ctxs": [{"id": "63", "title": "麻烦你把AD钙奶放到吧台那个位置。", "text": "On(ADMilk,Bar)", "score": "2.1603718"}, {"id": "67", "title": "麻烦你把AD钙奶放到咖啡桌那个位置。", "text": "On(ADMilk,CoffeeTable)", "score": "2.1257758"}, {"id": "69", "title": "麻烦你把AD钙奶放到另一个吧台那个位置。", "text": "On(ADMilk,Bar2)", "score": "2.0598636"}]}
{"id": 64, "question": "请你拿一下AD钙奶到吧台位置。", "ctxs": [{"id": "64", "title": "请你拿一下AD钙奶到吧台位置。", "text": "On(ADMilk,Bar)", "score": "2.2524765"}, {"id": "68", "title": "请你拿一下AD钙奶到咖啡桌位置。", "text": "On(ADMilk,CoffeeTable)", "score": "2.2278955"}, {"id": "74", "title": "请你拿一下AD钙奶到第二张桌子位置。", "text": "On(ADMilk,Table2)", "score": "2.2105985"}]}
{"id": 65, "question": "麻烦你把AD钙奶放到茶水桌那个位置。", "ctxs": [{"id": "65", "title": "麻烦你把AD钙奶放到茶水桌那个位置。", "text": "On(ADMilk,WaterTable)", "score": "2.1773324"}, {"id": "66", "title": "请你拿一下AD钙奶到茶水桌位置。", "text": "On(ADMilk,WaterTable)", "score": "2.1188078"}, {"id": "75", "title": "麻烦你把AD钙奶放到第三张桌子那个位置。", "text": "On(ADMilk,Table3)", "score": "1.9996386"}]}
{"id": 66, "question": "请你拿一下AD钙奶到茶水桌位置。", "ctxs": [{"id": "66", "title": "请你拿一下AD钙奶到茶水桌位置。", "text": "On(ADMilk,WaterTable)", "score": "2.230469"}, {"id": "64", "title": "请你拿一下AD钙奶到吧台位置。", "text": "On(ADMilk,Bar)", "score": "2.1240602"}, {"id": "65", "title": "麻烦你把AD钙奶放到茶水桌那个位置。", "text": "On(ADMilk,WaterTable)", "score": "2.1188078"}]}
{"id": 67, "question": "麻烦你把AD钙奶放到咖啡桌那个位置。", "ctxs": [{"id": "63", "title": "麻烦你把AD钙奶放到吧台那个位置。", "text": "On(ADMilk,Bar)", "score": "2.1257756"}, {"id": "67", "title": "麻烦你把AD钙奶放到咖啡桌那个位置。", "text": "On(ADMilk,CoffeeTable)", "score": "2.1052723"}, {"id": "69", "title": "麻烦你把AD钙奶放到另一个吧台那个位置。", "text": "On(ADMilk,Bar2)", "score": "2.0288947"}]}
{"id": 68, "question": "请你拿一下AD钙奶到咖啡桌位置。", "ctxs": [{"id": "64", "title": "请你拿一下AD钙奶到吧台位置。", "text": "On(ADMilk,Bar)", "score": "2.2278955"}, {"id": "68", "title": "请你拿一下AD钙奶到咖啡桌位置。", "text": "On(ADMilk,CoffeeTable)", "score": "2.219133"}, {"id": "74", "title": "请你拿一下AD钙奶到第二张桌子位置。", "text": "On(ADMilk,Table2)", "score": "2.1923835"}]}
{"id": 69, "question": "麻烦你把AD钙奶放到另一个吧台那个位置。", "ctxs": [{"id": "71", "title": "麻烦你把AD钙奶放到第一张桌子那个位置。", "text": "On(ADMilk,Table1)", "score": "2.0902703"}, {"id": "69", "title": "麻烦你把AD钙奶放到另一个吧台那个位置。", "text": "On(ADMilk,Bar2)", "score": "2.082649"}, {"id": "64", "title": "请你拿一下AD钙奶到吧台位置。", "text": "On(ADMilk,Bar)", "score": "2.0798569"}]}
{"id": 70, "question": "请你拿一下AD钙奶到另一个吧台位置。", "ctxs": [{"id": "64", "title": "请你拿一下AD钙奶到吧台位置。", "text": "On(ADMilk,Bar)", "score": "2.181713"}, {"id": "68", "title": "请你拿一下AD钙奶到咖啡桌位置。", "text": "On(ADMilk,CoffeeTable)", "score": "2.1686869"}, {"id": "74", "title": "请你拿一下AD钙奶到第二张桌子位置。", "text": "On(ADMilk,Table2)", "score": "2.1616154"}]}
{"id": 71, "question": "麻烦你把AD钙奶放到第一张桌子那个位置。", "ctxs": [{"id": "71", "title": "麻烦你把AD钙奶放到第一张桌子那个位置。", "text": "On(ADMilk,Table1)", "score": "2.1991525"}, {"id": "73", "title": "麻烦你把AD钙奶放到第二张桌子那个位置。", "text": "On(ADMilk,Table2)", "score": "2.1822984"}, {"id": "74", "title": "请你拿一下AD钙奶到第二张桌子位置。", "text": "On(ADMilk,Table2)", "score": "2.1702695"}]}
{"id": 72, "question": "请你拿一下AD钙奶到第一张桌子位置。", "ctxs": [{"id": "74", "title": "请你拿一下AD钙奶到第二张桌子位置。", "text": "On(ADMilk,Table2)", "score": "2.212596"}, {"id": "72", "title": "请你拿一下AD钙奶到第一张桌子位置。", "text": "On(ADMilk,Table1)", "score": "2.2017393"}, {"id": "64", "title": "请你拿一下AD钙奶到吧台位置。", "text": "On(ADMilk,Bar)", "score": "2.1957486"}]}
{"id": 73, "question": "麻烦你把AD钙奶放到第二张桌子那个位置。", "ctxs": [{"id": "73", "title": "麻烦你把AD钙奶放到第二张桌子那个位置。", "text": "On(ADMilk,Table2)", "score": "2.2209718"}, {"id": "71", "title": "麻烦你把AD钙奶放到第一张桌子那个位置。", "text": "On(ADMilk,Table1)", "score": "2.1822984"}, {"id": "74", "title": "请你拿一下AD钙奶到第二张桌子位置。", "text": "On(ADMilk,Table2)", "score": "2.178676"}]}
{"id": 74, "question": "请你拿一下AD钙奶到第二张桌子位置。", "ctxs": [{"id": "74", "title": "请你拿一下AD钙奶到第二张桌子位置。", "text": "On(ADMilk,Table2)", "score": "2.2510695"}, {"id": "72", "title": "请你拿一下AD钙奶到第一张桌子位置。", "text": "On(ADMilk,Table1)", "score": "2.212596"}, {"id": "64", "title": "请你拿一下AD钙奶到吧台位置。", "text": "On(ADMilk,Bar)", "score": "2.2105985"}]}
{"id": 75, "question": "麻烦你把AD钙奶放到第三张桌子那个位置。", "ctxs": [{"id": "75", "title": "麻烦你把AD钙奶放到第三张桌子那个位置。", "text": "On(ADMilk,Table3)", "score": "2.2925487"}, {"id": "76", "title": "请你拿一下AD钙奶到第三张桌子位置。", "text": "On(ADMilk,Table3)", "score": "2.2263582"}, {"id": "73", "title": "麻烦你把AD钙奶放到第二张桌子那个位置。", "text": "On(ADMilk,Table2)", "score": "2.1785173"}]}
{"id": 76, "question": "请你拿一下AD钙奶到第三张桌子位置。", "ctxs": [{"id": "76", "title": "请你拿一下AD钙奶到第三张桌子位置。", "text": "On(ADMilk,Table3)", "score": "2.275702"}, {"id": "75", "title": "麻烦你把AD钙奶放到第三张桌子那个位置。", "text": "On(ADMilk,Table3)", "score": "2.2263582"}, {"id": "74", "title": "请你拿一下AD钙奶到第二张桌子位置。", "text": "On(ADMilk,Table2)", "score": "2.1896439"}]}
{"id": 77, "question": "麻烦你把牛奶味的饮料放到吧台那个位置。", "ctxs": [{"id": "77", "title": "麻烦你把牛奶味的饮料放到吧台那个位置。", "text": "On(MilkDrink,Bar)", "score": "2.08738"}, {"id": "81", "title": "麻烦你把牛奶味的饮料放到咖啡桌那个位置。", "text": "On(MilkDrink,CoffeeTable)", "score": "2.0718782"}, {"id": "85", "title": "麻烦你把牛奶味的饮料放到第一张桌子那个位置。", "text": "On(MilkDrink,Table1)", "score": "2.0689378"}]}
{"id": 78, "question": "请你拿一下牛奶味的饮料到吧台位置。", "ctxs": [{"id": "78", "title": "请你拿一下牛奶味的饮料到吧台位置。", "text": "On(MilkDrink,Bar)", "score": "2.10436"}, {"id": "88", "title": "请你拿一下牛奶味的饮料到第二张桌子位置。", "text": "On(MilkDrink,Table2)", "score": "2.078076"}, {"id": "82", "title": "请你拿一下牛奶味的饮料到咖啡桌位置。", "text": "On(MilkDrink,CoffeeTable)", "score": "2.0719142"}]}
{"id": 79, "question": "麻烦你把牛奶味的饮料放到茶水桌那个位置。", "ctxs": [{"id": "79", "title": "麻烦你把牛奶味的饮料放到茶水桌那个位置。", "text": "On(MilkDrink,WaterTable)", "score": "2.097409"}, {"id": "80", "title": "请你拿一下牛奶味的饮料到茶水桌位置。", "text": "On(MilkDrink,WaterTable)", "score": "2.0610876"}, {"id": "85", "title": "麻烦你把牛奶味的饮料放到第一张桌子那个位置。", "text": "On(MilkDrink,Table1)", "score": "2.0153935"}]}
{"id": 80, "question": "请你拿一下牛奶味的饮料到茶水桌位置。", "ctxs": [{"id": "80", "title": "请你拿一下牛奶味的饮料到茶水桌位置。", "text": "On(MilkDrink,WaterTable)", "score": "2.0965686"}, {"id": "79", "title": "麻烦你把牛奶味的饮料放到茶水桌那个位置。", "text": "On(MilkDrink,WaterTable)", "score": "2.0610876"}, {"id": "78", "title": "请你拿一下牛奶味的饮料到吧台位置。", "text": "On(MilkDrink,Bar)", "score": "2.0419216"}]}
{"id": 81, "question": "麻烦你把牛奶味的饮料放到咖啡桌那个位置。", "ctxs": [{"id": "77", "title": "麻烦你把牛奶味的饮料放到吧台那个位置。", "text": "On(MilkDrink,Bar)", "score": "2.0718782"}, {"id": "81", "title": "麻烦你把牛奶味的饮料放到咖啡桌那个位置。", "text": "On(MilkDrink,CoffeeTable)", "score": "2.0612564"}, {"id": "85", "title": "麻烦你把牛奶味的饮料放到第一张桌子那个位置。", "text": "On(MilkDrink,Table1)", "score": "2.055777"}]}
{"id": 82, "question": "请你拿一下牛奶味的饮料到咖啡桌位置。", "ctxs": [{"id": "78", "title": "请你拿一下牛奶味的饮料到吧台位置。", "text": "On(MilkDrink,Bar)", "score": "2.0719142"}, {"id": "88", "title": "请你拿一下牛奶味的饮料到第二张桌子位置。", "text": "On(MilkDrink,Table2)", "score": "2.0524642"}, {"id": "82", "title": "请你拿一下牛奶味的饮料到咖啡桌位置。", "text": "On(MilkDrink,CoffeeTable)", "score": "2.0507994"}]}
{"id": 83, "question": "麻烦你把牛奶味的饮料放到另一个吧台那个位置。", "ctxs": [{"id": "85", "title": "麻烦你把牛奶味的饮料放到第一张桌子那个位置。", "text": "On(MilkDrink,Table1)", "score": "2.0670314"}, {"id": "87", "title": "麻烦你把牛奶味的饮料放到第二张桌子那个位置。", "text": "On(MilkDrink,Table2)", "score": "2.0601783"}, {"id": "77", "title": "麻烦你把牛奶味的饮料放到吧台那个位置。", "text": "On(MilkDrink,Bar)", "score": "2.05937"}]}
{"id": 84, "question": "请你拿一下牛奶味的饮料到另一个吧台位置。", "ctxs": [{"id": "78", "title": "请你拿一下牛奶味的饮料到吧台位置。", "text": "On(MilkDrink,Bar)", "score": "2.0389352"}, {"id": "88", "title": "请你拿一下牛奶味的饮料到第二张桌子位置。", "text": "On(MilkDrink,Table2)", "score": "2.03348"}, {"id": "82", "title": "请你拿一下牛奶味的饮料到咖啡桌位置。", "text": "On(MilkDrink,CoffeeTable)", "score": "2.0225453"}]}
{"id": 85, "question": "麻烦你把牛奶味的饮料放到第一张桌子那个位置。", "ctxs": [{"id": "85", "title": "麻烦你把牛奶味的饮料放到第一张桌子那个位置。", "text": "On(MilkDrink,Table1)", "score": "2.105956"}, {"id": "87", "title": "麻烦你把牛奶味的饮料放到第二张桌子那个位置。", "text": "On(MilkDrink,Table2)", "score": "2.1000245"}, {"id": "89", "title": "麻烦你把牛奶味的饮料放到第三张桌子那个位置。", "text": "On(MilkDrink,Table3)", "score": "2.074893"}]}
{"id": 86, "question": "请你拿一下牛奶味的饮料到第一张桌子位置。", "ctxs": [{"id": "88", "title": "请你拿一下牛奶味的饮料到第二张桌子位置。", "text": "On(MilkDrink,Table2)", "score": "2.072627"}, {"id": "78", "title": "请你拿一下牛奶味的饮料到吧台位置。", "text": "On(MilkDrink,Bar)", "score": "2.0577803"}, {"id": "86", "title": "请你拿一下牛奶味的饮料到第一张桌子位置。", "text": "On(MilkDrink,Table1)", "score": "2.0535507"}]}
{"id": 87, "question": "麻烦你把牛奶味的饮料放到第二张桌子那个位置。", "ctxs": [{"id": "87", "title": "麻烦你把牛奶味的饮料放到第二张桌子那个位置。", "text": "On(MilkDrink,Table2)", "score": "2.1141672"}, {"id": "85", "title": "麻烦你把牛奶味的饮料放到第一张桌子那个位置。", "text": "On(MilkDrink,Table1)", "score": "2.1000245"}, {"id": "89", "title": "麻烦你把牛奶味的饮料放到第三张桌子那个位置。", "text": "On(MilkDrink,Table3)", "score": "2.0852582"}]}
{"id": 88, "question": "请你拿一下牛奶味的饮料到第二张桌子位置。", "ctxs": [{"id": "88", "title": "请你拿一下牛奶味的饮料到第二张桌子位置。", "text": "On(MilkDrink,Table2)", "score": "2.103561"}, {"id": "78", "title": "请你拿一下牛奶味的饮料到吧台位置。", "text": "On(MilkDrink,Bar)", "score": "2.078076"}, {"id": "86", "title": "请你拿一下牛奶味的饮料到第一张桌子位置。", "text": "On(MilkDrink,Table1)", "score": "2.072627"}]}
{"id": 89, "question": "麻烦你把牛奶味的饮料放到第三张桌子那个位置。", "ctxs": [{"id": "89", "title": "麻烦你把牛奶味的饮料放到第三张桌子那个位置。", "text": "On(MilkDrink,Table3)", "score": "2.1975758"}, {"id": "90", "title": "请你拿一下牛奶味的饮料到第三张桌子位置。", "text": "On(MilkDrink,Table3)", "score": "2.1483028"}, {"id": "87", "title": "麻烦你把牛奶味的饮料放到第二张桌子那个位置。", "text": "On(MilkDrink,Table2)", "score": "2.0852582"}]}
{"id": 90, "question": "请你拿一下牛奶味的饮料到第三张桌子位置。", "ctxs": [{"id": "90", "title": "请你拿一下牛奶味的饮料到第三张桌子位置。", "text": "On(MilkDrink,Table3)", "score": "2.1731162"}, {"id": "89", "title": "麻烦你把牛奶味的饮料放到第三张桌子那个位置。", "text": "On(MilkDrink,Table3)", "score": "2.1483028"}, {"id": "19", "title": "麻烦你去一下第三张桌子。", "text": "At(Robot,Table3)", "score": "2.0933735"}]}
{"id": 91, "question": "麻烦你把牛奶放到吧台那个位置。", "ctxs": [{"id": "91", "title": "麻烦你把牛奶放到吧台那个位置。", "text": "On(Milk,Bar)", "score": "1.9675336"}, {"id": "49", "title": "麻烦你把酸奶放到吧台那个位置。", "text": "On(Yogurt,Bar)", "score": "1.9675336"}, {"id": "53", "title": "麻烦你把酸奶放到咖啡桌那个位置。", "text": "On(Yogurt,CoffeeTable)", "score": "1.9308141"}]}
{"id": 92, "question": "请你拿一下牛奶到吧台位置。", "ctxs": [{"id": "92", "title": "请你拿一下牛奶到吧台位置。", "text": "On(Milk,Bar)", "score": "2.140599"}, {"id": "50", "title": "请你拿一下酸奶到吧台位置。", "text": "On(Yogurt,Bar)", "score": "2.140599"}, {"id": "7", "title": "麻烦你去一下咖啡桌。", "text": "At(Robot,CoffeeTable)", "score": "2.135912"}]}
{"id": 93, "question": "麻烦你把牛奶放到茶水桌那个位置。", "ctxs": [{"id": "93", "title": "麻烦你把牛奶放到茶水桌那个位置。", "text": "On(Milk,WaterTable)", "score": "2.0631227"}, {"id": "51", "title": "麻烦你把酸奶放到茶水桌那个位置。", "text": "On(Yogurt,WaterTable)", "score": "2.0631227"}, {"id": "4", "title": "麻烦你去一下茶水桌。", "text": "At(Robot,WaterTable)", "score": "2.029068"}]}
{"id": 94, "question": "请你拿一下牛奶到茶水桌位置。", "ctxs": [{"id": "4", "title": "麻烦你去一下茶水桌。", "text": "At(Robot,WaterTable)", "score": "2.148037"}, {"id": "94", "title": "请你拿一下牛奶到茶水桌位置。", "text": "On(Milk,WaterTable)", "score": "2.1236286"}, {"id": "52", "title": "请你拿一下酸奶到茶水桌位置。", "text": "On(Yogurt,WaterTable)", "score": "2.1236286"}]}
{"id": 95, "question": "麻烦你把牛奶放到咖啡桌那个位置。", "ctxs": [{"id": "91", "title": "麻烦你把牛奶放到吧台那个位置。", "text": "On(Milk,Bar)", "score": "1.9308141"}, {"id": "49", "title": "麻烦你把酸奶放到吧台那个位置。", "text": "On(Yogurt,Bar)", "score": "1.9308141"}, {"id": "53", "title": "麻烦你把酸奶放到咖啡桌那个位置。", "text": "On(Yogurt,CoffeeTable)", "score": "1.9049001"}]}
{"id": 96, "question": "请你拿一下牛奶到咖啡桌位置。", "ctxs": [{"id": "7", "title": "麻烦你去一下咖啡桌。", "text": "At(Robot,CoffeeTable)", "score": "2.0845027"}, {"id": "92", "title": "请你拿一下牛奶到吧台位置。", "text": "On(Milk,Bar)", "score": "2.080674"}, {"id": "50", "title": "请你拿一下酸奶到吧台位置。", "text": "On(Yogurt,Bar)", "score": "2.080674"}]}
{"id": 97, "question": "麻烦你把牛奶放到另一个吧台那个位置。", "ctxs": [{"id": "92", "title": "请你拿一下牛奶到吧台位置。", "text": "On(Milk,Bar)", "score": "1.9284544"}, {"id": "50", "title": "请你拿一下酸奶到吧台位置。", "text": "On(Yogurt,Bar)", "score": "1.9284544"}, {"id": "7", "title": "麻烦你去一下咖啡桌。", "text": "At(Robot,CoffeeTable)", "score": "1.9125285"}]}
{"id": 98, "question": "请你拿一下牛奶到另一个吧台位置。", "ctxs": [{"id": "7", "title": "麻烦你去一下咖啡桌。", "text": "At(Robot,CoffeeTable)", "score": "2.0125577"}, {"id": "1", "title": "麻烦你去一下吧台。", "text": "At(Robot,Bar)", "score": "2.011784"}, {"id": "50", "title": "请你拿一下酸奶到吧台位置。", "text": "On(Yogurt,Bar)", "score": "2.002036"}]}
{"id": 99, "question": "麻烦你把牛奶放到第一张桌子那个位置。", "ctxs": [{"id": "99", "title": "麻烦你把牛奶放到第一张桌子那个位置。", "text": "On(Milk,Table1)", "score": "2.0622244"}, {"id": "57", "title": "麻烦你把酸奶放到第一张桌子那个位置。", "text": "On(Yogurt,Table1)", "score": "2.0622244"}, {"id": "29", "title": "麻烦你把盒装冰红茶放到第一张桌子那个位置。", "text": "On(Softdrink,Table1)", "score": "2.0393207"}]}
{"id": 100, "question": "请你拿一下牛奶到第一张桌子位置。", "ctxs": [{"id": "16", "title": "麻烦你去一下第二张桌子。", "text": "At(Robot,Table2)", "score": "2.0712793"}, {"id": "13", "title": "麻烦你去一下第一张桌子。", "text": "At(Robot,Table1)", "score": "2.069393"}, {"id": "7", "title": "麻烦你去一下咖啡桌。", "text": "At(Robot,CoffeeTable)", "score": "2.0339222"}]}
{"id": 101, "question": "麻烦你把牛奶放到第二张桌子那个位置。", "ctxs": [{"id": "101", "title": "麻烦你把牛奶放到第二张桌子那个位置。", "text": "On(Milk,Table2)", "score": "2.103046"}, {"id": "59", "title": "麻烦你把酸奶放到第二张桌子那个位置。", "text": "On(Yogurt,Table2)", "score": "2.103046"}, {"id": "16", "title": "麻烦你去一下第二张桌子。", "text": "At(Robot,Table2)", "score": "2.070549"}]}
{"id": 102, "question": "请你拿一下牛奶到第二张桌子位置。", "ctxs": [{"id": "16", "title": "麻烦你去一下第二张桌子。", "text": "At(Robot,Table2)", "score": "2.1219845"}, {"id": "60", "title": "请你拿一下酸奶到第二张桌子位置。", "text": "On(Yogurt,Table2)", "score": "2.063291"}, {"id": "102", "title": "请你拿一下牛奶到第二张桌子位置。", "text": "On(Milk,Table2)", "score": "2.0632906"}]}
{"id": 103, "question": "麻烦你把牛奶放到第三张桌子那个位置。", "ctxs": [{"id": "103", "title": "麻烦你把牛奶放到第三张桌子那个位置。", "text": "On(Milk,Table3)", "score": "2.202989"}, {"id": "61", "title": "麻烦你把酸奶放到第三张桌子那个位置。", "text": "On(Yogurt,Table3)", "score": "2.202989"}, {"id": "19", "title": "麻烦你去一下第三张桌子。", "text": "At(Robot,Table3)", "score": "2.1801229"}]}
{"id": 104, "question": "请你拿一下牛奶到第三张桌子位置。", "ctxs": [{"id": "19", "title": "麻烦你去一下第三张桌子。", "text": "At(Robot,Table3)", "score": "2.2423108"}, {"id": "104", "title": "请你拿一下牛奶到第三张桌子位置。", "text": "On(Milk,Table3)", "score": "2.1604705"}, {"id": "62", "title": "请你拿一下酸奶到第三张桌子位置。", "text": "On(Yogurt,Table3)", "score": "2.1604705"}]}
{"id": 105, "question": "麻烦你把保温杯放到吧台那个位置。", "ctxs": [{"id": "105", "title": "麻烦你把保温杯放到吧台那个位置。", "text": "On(VacuumCup,Bar)", "score": "2.2429242"}, {"id": "109", "title": "麻烦你把保温杯放到咖啡桌那个位置。", "text": "On(VacuumCup,CoffeeTable)", "score": "2.2102232"}, {"id": "110", "title": "请你拿一下保温杯到咖啡桌位置。", "text": "On(VacuumCup,CoffeeTable)", "score": "2.1682682"}]}
{"id": 106, "question": "请你拿一下保温杯到吧台位置。", "ctxs": [{"id": "106", "title": "请你拿一下保温杯到吧台位置。", "text": "On(VacuumCup,Bar)", "score": "2.239095"}, {"id": "110", "title": "请你拿一下保温杯到咖啡桌位置。", "text": "On(VacuumCup,CoffeeTable)", "score": "2.2131987"}, {"id": "116", "title": "请你拿一下保温杯到第二张桌子位置。", "text": "On(VacuumCup,Table2)", "score": "2.1786466"}]}
{"id": 107, "question": "麻烦你把保温杯放到茶水桌那个位置。", "ctxs": [{"id": "107", "title": "麻烦你把保温杯放到茶水桌那个位置。", "text": "On(VacuumCup,WaterTable)", "score": "2.1722713"}, {"id": "108", "title": "请你拿一下保温杯到茶水桌位置。", "text": "On(VacuumCup,WaterTable)", "score": "2.132186"}, {"id": "105", "title": "麻烦你把保温杯放到吧台那个位置。", "text": "On(VacuumCup,Bar)", "score": "2.0848238"}]}
{"id": 108, "question": "请你拿一下保温杯到茶水桌位置。", "ctxs": [{"id": "108", "title": "请你拿一下保温杯到茶水桌位置。", "text": "On(VacuumCup,WaterTable)", "score": "2.2130556"}, {"id": "107", "title": "麻烦你把保温杯放到茶水桌那个位置。", "text": "On(VacuumCup,WaterTable)", "score": "2.1321857"}, {"id": "110", "title": "请你拿一下保温杯到咖啡桌位置。", "text": "On(VacuumCup,CoffeeTable)", "score": "2.1283102"}]}
{"id": 109, "question": "麻烦你把保温杯放到咖啡桌那个位置。", "ctxs": [{"id": "105", "title": "麻烦你把保温杯放到吧台那个位置。", "text": "On(VacuumCup,Bar)", "score": "2.2102232"}, {"id": "109", "title": "麻烦你把保温杯放到咖啡桌那个位置。", "text": "On(VacuumCup,CoffeeTable)", "score": "2.1884727"}, {"id": "110", "title": "请你拿一下保温杯到咖啡桌位置。", "text": "On(VacuumCup,CoffeeTable)", "score": "2.1315742"}]}
{"id": 110, "question": "请你拿一下保温杯到咖啡桌位置。", "ctxs": [{"id": "110", "title": "请你拿一下保温杯到咖啡桌位置。", "text": "On(VacuumCup,CoffeeTable)", "score": "2.256261"}, {"id": "106", "title": "请你拿一下保温杯到吧台位置。", "text": "On(VacuumCup,Bar)", "score": "2.2131987"}, {"id": "114", "title": "请你拿一下保温杯到第一张桌子位置。", "text": "On(VacuumCup,Table1)", "score": "2.1779022"}]}
{"id": 111, "question": "麻烦你把保温杯放到另一个吧台那个位置。", "ctxs": [{"id": "105", "title": "麻烦你把保温杯放到吧台那个位置。", "text": "On(VacuumCup,Bar)", "score": "2.1341026"}, {"id": "113", "title": "麻烦你把保温杯放到第一张桌子那个位置。", "text": "On(VacuumCup,Table1)", "score": "2.1090364"}, {"id": "109", "title": "麻烦你把保温杯放到咖啡桌那个位置。", "text": "On(VacuumCup,CoffeeTable)", "score": "2.1087642"}]}
{"id": 112, "question": "请你拿一下保温杯到另一个吧台位置。", "ctxs": [{"id": "110", "title": "请你拿一下保温杯到咖啡桌位置。", "text": "On(VacuumCup,CoffeeTable)", "score": "2.1709297"}, {"id": "106", "title": "请你拿一下保温杯到吧台位置。", "text": "On(VacuumCup,Bar)", "score": "2.1506987"}, {"id": "116", "title": "请你拿一下保温杯到第二张桌子位置。", "text": "On(VacuumCup,Table2)", "score": "2.1286242"}]}
{"id": 113, "question": "麻烦你把保温杯放到第一张桌子那个位置。", "ctxs": [{"id": "113", "title": "麻烦你把保温杯放到第一张桌子那个位置。", "text": "On(VacuumCup,Table1)", "score": "2.170017"}, {"id": "115", "title": "麻烦你把保温杯放到第二张桌子那个位置。", "text": "On(VacuumCup,Table2)", "score": "2.150376"}, {"id": "110", "title": "请你拿一下保温杯到咖啡桌位置。", "text": "On(VacuumCup,CoffeeTable)", "score": "2.14018"}]}
{"id": 114, "question": "请你拿一下保温杯到第一张桌子位置。", "ctxs": [{"id": "110", "title": "请你拿一下保温杯到咖啡桌位置。", "text": "On(VacuumCup,CoffeeTable)", "score": "2.1779022"}, {"id": "116", "title": "请你拿一下保温杯到第二张桌子位置。", "text": "On(VacuumCup,Table2)", "score": "2.1702516"}, {"id": "114", "title": "请你拿一下保温杯到第一张桌子位置。", "text": "On(VacuumCup,Table1)", "score": "2.1670852"}]}
{"id": 115, "question": "麻烦你把保温杯放到第二张桌子那个位置。", "ctxs": [{"id": "115", "title": "麻烦你把保温杯放到第二张桌子那个位置。", "text": "On(VacuumCup,Table2)", "score": "2.2006984"}, {"id": "116", "title": "请你拿一下保温杯到第二张桌子位置。", "text": "On(VacuumCup,Table2)", "score": "2.1631958"}, {"id": "113", "title": "麻烦你把保温杯放到第一张桌子那个位置。", "text": "On(VacuumCup,Table1)", "score": "2.150376"}]}
{"id": 116, "question": "请你拿一下保温杯到第二张桌子位置。", "ctxs": [{"id": "116", "title": "请你拿一下保温杯到第二张桌子位置。", "text": "On(VacuumCup,Table2)", "score": "2.2135606"}, {"id": "106", "title": "请你拿一下保温杯到吧台位置。", "text": "On(VacuumCup,Bar)", "score": "2.1786466"}, {"id": "110", "title": "请你拿一下保温杯到咖啡桌位置。", "text": "On(VacuumCup,CoffeeTable)", "score": "2.1751347"}]}
{"id": 117, "question": "麻烦你把保温杯放到第三张桌子那个位置。", "ctxs": [{"id": "117", "title": "麻烦你把保温杯放到第三张桌子那个位置。", "text": "On(VacuumCup,Table3)", "score": "2.2229888"}, {"id": "118", "title": "请你拿一下保温杯到第三张桌子位置。", "text": "On(VacuumCup,Table3)", "score": "2.1815875"}, {"id": "115", "title": "麻烦你把保温杯放到第二张桌子那个位置。", "text": "On(VacuumCup,Table2)", "score": "2.111863"}]}
{"id": 118, "question": "请你拿一下保温杯到第三张桌子位置。", "ctxs": [{"id": "118", "title": "请你拿一下保温杯到第三张桌子位置。", "text": "On(VacuumCup,Table3)", "score": "2.229765"}, {"id": "117", "title": "麻烦你把保温杯放到第三张桌子那个位置。", "text": "On(VacuumCup,Table3)", "score": "2.1815875"}, {"id": "116", "title": "请你拿一下保温杯到第二张桌子位置。", "text": "On(VacuumCup,Table2)", "score": "2.1200728"}]}
{"id": 119, "question": "你能把空调关闭一下吗?", "ctxs": [{"id": "120", "title": "你能把空调打开一下吗?", "text": "Is(AC,Off)", "score": "1.8557925"}, {"id": "119", "title": "你能把空调关闭一下吗?", "text": "Is(AC,On)", "score": "1.8557925"}, {"id": "130", "title": "你能把椅子打扫干净一下吗?", "text": "Is(Chairs,Off)", "score": "1.5832255"}]}
{"id": 120, "question": "你能把空调打开一下吗?", "ctxs": [{"id": "120", "title": "你能把空调打开一下吗?", "text": "Is(AC,Off)", "score": "1.8557925"}, {"id": "119", "title": "你能把空调关闭一下吗?", "text": "Is(AC,On)", "score": "1.8557925"}, {"id": "130", "title": "你能把椅子打扫干净一下吗?", "text": "Is(Chairs,Off)", "score": "1.5832255"}]}
{"id": 121, "question": "你能把空调Temperature调高一下吗", "ctxs": [{"id": "121", "title": "你能把空调Temperature调高一下吗", "text": "Is(ACTemperature,On)", "score": "2.0785973"}, {"id": "122", "title": "你能把空调Temperature调低一下吗", "text": "Is(ACTemperature,Off)", "score": "1.9580221"}, {"id": "120", "title": "你能把空调打开一下吗?", "text": "Is(AC,Off)", "score": "1.4784093"}]}
{"id": 122, "question": "你能把空调Temperature调低一下吗", "ctxs": [{"id": "122", "title": "你能把空调Temperature调低一下吗", "text": "Is(ACTemperature,Off)", "score": "2.0469093"}, {"id": "121", "title": "你能把空调Temperature调高一下吗", "text": "Is(ACTemperature,On)", "score": "1.9580221"}, {"id": "120", "title": "你能把空调打开一下吗?", "text": "Is(AC,Off)", "score": "1.5565805"}]}
{"id": 123, "question": "你能把大厅灯关闭一下吗?", "ctxs": [{"id": "124", "title": "你能把大厅灯打开一下吗?", "text": "Is(HallLight,Off)", "score": "1.6786524"}, {"id": "123", "title": "你能把大厅灯关闭一下吗?", "text": "Is(HallLight,On)", "score": "1.6786524"}, {"id": "130", "title": "你能把椅子打扫干净一下吗?", "text": "Is(Chairs,Off)", "score": "1.4974258"}]}
{"id": 124, "question": "你能把大厅灯打开一下吗?", "ctxs": [{"id": "124", "title": "你能把大厅灯打开一下吗?", "text": "Is(HallLight,Off)", "score": "1.6786524"}, {"id": "123", "title": "你能把大厅灯关闭一下吗?", "text": "Is(HallLight,On)", "score": "1.6786524"}, {"id": "130", "title": "你能把椅子打扫干净一下吗?", "text": "Is(Chairs,Off)", "score": "1.4974258"}]}
{"id": 125, "question": "你能把筒灯关闭一下吗?", "ctxs": [{"id": "127", "title": "你能把窗帘关闭一下吗?", "text": "Is(Curtain,On)", "score": "1.518601"}, {"id": "126", "title": "你能把筒灯打开一下吗?", "text": "Is(TubeLight,Off)", "score": "1.518601"}, {"id": "125", "title": "你能把筒灯关闭一下吗?", "text": "Is(TubeLight,On)", "score": "1.518601"}]}
{"id": 126, "question": "你能把筒灯打开一下吗?", "ctxs": [{"id": "127", "title": "你能把窗帘关闭一下吗?", "text": "Is(Curtain,On)", "score": "1.518601"}, {"id": "126", "title": "你能把筒灯打开一下吗?", "text": "Is(TubeLight,Off)", "score": "1.518601"}, {"id": "125", "title": "你能把筒灯关闭一下吗?", "text": "Is(TubeLight,On)", "score": "1.518601"}]}
{"id": 127, "question": "你能把窗帘关闭一下吗?", "ctxs": [{"id": "127", "title": "你能把窗帘关闭一下吗?", "text": "Is(Curtain,On)", "score": "1.518601"}, {"id": "126", "title": "你能把筒灯打开一下吗?", "text": "Is(TubeLight,Off)", "score": "1.518601"}, {"id": "125", "title": "你能把筒灯关闭一下吗?", "text": "Is(TubeLight,On)", "score": "1.518601"}]}
{"id": 128, "question": "你能把窗帘打开一下吗?", "ctxs": [{"id": "127", "title": "你能把窗帘关闭一下吗?", "text": "Is(Curtain,On)", "score": "1.518601"}, {"id": "126", "title": "你能把筒灯打开一下吗?", "text": "Is(TubeLight,Off)", "score": "1.518601"}, {"id": "125", "title": "你能把筒灯关闭一下吗?", "text": "Is(TubeLight,On)", "score": "1.518601"}]}
{"id": 129, "question": "你能把椅子脏一下吗?", "ctxs": [{"id": "129", "title": "你能把椅子脏一下吗?", "text": "Is(Chairs,On)", "score": "1.6899643"}, {"id": "130", "title": "你能把椅子打扫干净一下吗?", "text": "Is(Chairs,Off)", "score": "1.6565721"}, {"id": "133", "title": "你能把第一张桌子脏一下吗?", "text": "Is(Table1,On)", "score": "1.5747597"}]}
{"id": 130, "question": "你能把椅子打扫干净一下吗?", "ctxs": [{"id": "130", "title": "你能把椅子打扫干净一下吗?", "text": "Is(Chairs,Off)", "score": "1.6802522"}, {"id": "129", "title": "你能把椅子脏一下吗?", "text": "Is(Chairs,On)", "score": "1.6565721"}, {"id": "120", "title": "你能把空调打开一下吗?", "text": "Is(AC,Off)", "score": "1.5832255"}]}
{"id": 131, "question": "你能把地板脏一下吗?", "ctxs": [{"id": "131", "title": "你能把地板脏一下吗?", "text": "Is(Floor,On)", "score": "1.7037644"}, {"id": "132", "title": "你能把地板打扫干净一下吗?", "text": "Is(Floor,Off)", "score": "1.6446393"}, {"id": "129", "title": "你能把椅子脏一下吗?", "text": "Is(Chairs,On)", "score": "1.4894973"}]}
{"id": 132, "question": "你能把地板打扫干净一下吗?", "ctxs": [{"id": "131", "title": "你能把地板脏一下吗?", "text": "Is(Floor,On)", "score": "1.6446393"}, {"id": "132", "title": "你能把地板打扫干净一下吗?", "text": "Is(Floor,Off)", "score": "1.6254838"}, {"id": "130", "title": "你能把椅子打扫干净一下吗?", "text": "Is(Chairs,Off)", "score": "1.4744654"}]}
{"id": 133, "question": "你能把第一张桌子脏一下吗?", "ctxs": [{"id": "130", "title": "你能把椅子打扫干净一下吗?", "text": "Is(Chairs,Off)", "score": "1.5816782"}, {"id": "129", "title": "你能把椅子脏一下吗?", "text": "Is(Chairs,On)", "score": "1.5747597"}, {"id": "133", "title": "你能把第一张桌子脏一下吗?", "text": "Is(Table1,On)", "score": "1.5437262"}]}
{"id": 134, "question": "你能把第一张桌子打扫干净一下吗?", "ctxs": [{"id": "130", "title": "你能把椅子打扫干净一下吗?", "text": "Is(Chairs,Off)", "score": "1.5490987"}, {"id": "129", "title": "你能把椅子脏一下吗?", "text": "Is(Chairs,On)", "score": "1.5196328"}, {"id": "14", "title": "你能去第一张桌子那个位置吗?", "text": "At(Robot,Table1)", "score": "1.5141118"}]}
{"id": 135, "question": "你能把盒装冰红茶抓在手里吗?", "ctxs": [{"id": "145", "title": "你能把牛奶抓在手里吗?", "text": "Holding(Milk)", "score": "1.9838529"}, {"id": "139", "title": "你能把酸奶抓在手里吗?", "text": "Holding(Yogurt)", "score": "1.9838529"}, {"id": "137", "title": "你能把瓶装饮料抓在手里吗?", "text": "Holding(BottledDrink)", "score": "1.9531112"}]}
{"id": 136, "question": "你能一直拿着盒装冰红茶吗?", "ctxs": [{"id": "138", "title": "你能一直拿着瓶装饮料吗?", "text": "Holding(BottledDrink)", "score": "1.5285676"}, {"id": "146", "title": "你能一直拿着牛奶吗?", "text": "Holding(Milk)", "score": "1.5075642"}, {"id": "140", "title": "你能一直拿着酸奶吗?", "text": "Holding(Yogurt)", "score": "1.5075642"}]}
{"id": 137, "question": "你能把瓶装饮料抓在手里吗?", "ctxs": [{"id": "145", "title": "你能把牛奶抓在手里吗?", "text": "Holding(Milk)", "score": "2.0030432"}, {"id": "139", "title": "你能把酸奶抓在手里吗?", "text": "Holding(Yogurt)", "score": "2.0030432"}, {"id": "137", "title": "你能把瓶装饮料抓在手里吗?", "text": "Holding(BottledDrink)", "score": "1.9733583"}]}
{"id": 138, "question": "你能一直拿着瓶装饮料吗?", "ctxs": [{"id": "138", "title": "你能一直拿着瓶装饮料吗?", "text": "Holding(BottledDrink)", "score": "1.6186152"}, {"id": "146", "title": "你能一直拿着牛奶吗?", "text": "Holding(Milk)", "score": "1.570015"}, {"id": "140", "title": "你能一直拿着酸奶吗?", "text": "Holding(Yogurt)", "score": "1.570015"}]}
{"id": 139, "question": "你能把酸奶抓在手里吗?", "ctxs": [{"id": "145", "title": "你能把牛奶抓在手里吗?", "text": "Holding(Milk)", "score": "2.1061347"}, {"id": "139", "title": "你能把酸奶抓在手里吗?", "text": "Holding(Yogurt)", "score": "2.1061347"}, {"id": "137", "title": "你能把瓶装饮料抓在手里吗?", "text": "Holding(BottledDrink)", "score": "2.0030432"}]}
{"id": 140, "question": "你能一直拿着酸奶吗?", "ctxs": [{"id": "146", "title": "你能一直拿着牛奶吗?", "text": "Holding(Milk)", "score": "1.5732281"}, {"id": "140", "title": "你能一直拿着酸奶吗?", "text": "Holding(Yogurt)", "score": "1.5732281"}, {"id": "138", "title": "你能一直拿着瓶装饮料吗?", "text": "Holding(BottledDrink)", "score": "1.570015"}]}
{"id": 141, "question": "你能把AD钙奶抓在手里吗", "ctxs": [{"id": "141", "title": "你能把AD钙奶抓在手里吗", "text": "Holding(ADMilk)", "score": "2.3531027"}, {"id": "145", "title": "你能把牛奶抓在手里吗?", "text": "Holding(Milk)", "score": "1.9101474"}, {"id": "139", "title": "你能把酸奶抓在手里吗?", "text": "Holding(Yogurt)", "score": "1.9101474"}]}
{"id": 142, "question": "你能一直拿着AD钙奶吗", "ctxs": [{"id": "142", "title": "你能一直拿着AD钙奶吗", "text": "Holding(ADMilk)", "score": "1.8908589"}, {"id": "64", "title": "请你拿一下AD钙奶到吧台位置。", "text": "On(ADMilk,Bar)", "score": "1.7691976"}, {"id": "68", "title": "请你拿一下AD钙奶到咖啡桌位置。", "text": "On(ADMilk,CoffeeTable)", "score": "1.7597466"}]}
{"id": 143, "question": "你能把牛奶味的饮料抓在手里吗?", "ctxs": [{"id": "143", "title": "你能把牛奶味的饮料抓在手里吗?", "text": "Holding(MilkDrink)", "score": "1.928597"}, {"id": "145", "title": "你能把牛奶抓在手里吗?", "text": "Holding(Milk)", "score": "1.7806746"}, {"id": "139", "title": "你能把酸奶抓在手里吗?", "text": "Holding(Yogurt)", "score": "1.7806746"}]}
{"id": 144, "question": "你能一直拿着牛奶味的饮料吗?", "ctxs": [{"id": "88", "title": "请你拿一下牛奶味的饮料到第二张桌子位置。", "text": "On(MilkDrink,Table2)", "score": "1.6323445"}, {"id": "144", "title": "你能一直拿着牛奶味的饮料吗?", "text": "Holding(MilkDrink)", "score": "1.6249567"}, {"id": "86", "title": "请你拿一下牛奶味的饮料到第一张桌子位置。", "text": "On(MilkDrink,Table1)", "score": "1.6207767"}]}
{"id": 145, "question": "你能把牛奶抓在手里吗?", "ctxs": [{"id": "145", "title": "你能把牛奶抓在手里吗?", "text": "Holding(Milk)", "score": "2.1061347"}, {"id": "139", "title": "你能把酸奶抓在手里吗?", "text": "Holding(Yogurt)", "score": "2.1061347"}, {"id": "137", "title": "你能把瓶装饮料抓在手里吗?", "text": "Holding(BottledDrink)", "score": "2.0030432"}]}
{"id": 146, "question": "你能一直拿着牛奶吗?", "ctxs": [{"id": "146", "title": "你能一直拿着牛奶吗?", "text": "Holding(Milk)", "score": "1.5732281"}, {"id": "140", "title": "你能一直拿着酸奶吗?", "text": "Holding(Yogurt)", "score": "1.5732281"}, {"id": "138", "title": "你能一直拿着瓶装饮料吗?", "text": "Holding(BottledDrink)", "score": "1.570015"}]}
{"id": 147, "question": "你能把保温杯抓在手里吗?", "ctxs": [{"id": "147", "title": "你能把保温杯抓在手里吗?", "text": "Holding(VacuumCup)", "score": "2.0540679"}, {"id": "145", "title": "你能把牛奶抓在手里吗?", "text": "Holding(Milk)", "score": "1.8091204"}, {"id": "139", "title": "你能把酸奶抓在手里吗?", "text": "Holding(Yogurt)", "score": "1.8091204"}]}
{"id": 148, "question": "你能一直拿着保温杯吗?", "ctxs": [{"id": "148", "title": "你能一直拿着保温杯吗?", "text": "Holding(VacuumCup)", "score": "1.8522661"}, {"id": "106", "title": "请你拿一下保温杯到吧台位置。", "text": "On(VacuumCup,Bar)", "score": "1.7313486"}, {"id": "110", "title": "请你拿一下保温杯到咖啡桌位置。", "text": "On(VacuumCup,CoffeeTable)", "score": "1.7304229"}]}
{"id": 149, "question": "你能把Nothing抓在手里吗", "ctxs": [{"id": "149", "title": "你能把Nothing抓在手里吗", "text": "Holding(Nothing)", "score": "2.8154328"}, {"id": "150", "title": "你能一直拿着Nothing吗", "text": "Holding(Nothing)", "score": "2.2507854"}, {"id": "145", "title": "你能把牛奶抓在手里吗?", "text": "Holding(Milk)", "score": "1.7819045"}]}
{"id": 150, "question": "你能一直拿着Nothing吗", "ctxs": [{"id": "150", "title": "你能一直拿着Nothing吗", "text": "Holding(Nothing)", "score": "2.6241875"}, {"id": "149", "title": "你能把Nothing抓在手里吗", "text": "Holding(Nothing)", "score": "2.2507854"}, {"id": "138", "title": "你能一直拿着瓶装饮料吗?", "text": "Holding(BottledDrink)", "score": "1.3087585"}]}
{"id": 151, "question": "你能制作咖啡并把它端到吧台这里来吗?", "ctxs": [{"id": "155", "title": "你能制作咖啡并把它端到咖啡桌这里来吗?", "text": "On(Coffee,CoffeeTable)", "score": "1.8268918"}, {"id": "151", "title": "你能制作咖啡并把它端到吧台这里来吗?", "text": "On(Coffee,Bar)", "score": "1.8257364"}, {"id": "161", "title": "你能制作咖啡并把它端到第二张桌子这里来吗?", "text": "On(Coffee,Table2)", "score": "1.7286553"}]}
{"id": 152, "question": "给我来点咖啡,并把它端到吧台这里来。", "ctxs": [{"id": "152", "title": "给我来点咖啡,并把它端到吧台这里来。", "text": "On(Coffee,Bar)", "score": "2.2592463"}, {"id": "156", "title": "给我来点咖啡,并把它端到咖啡桌这里来。", "text": "On(Coffee,CoffeeTable)", "score": "2.2115762"}, {"id": "170", "title": "给我来点水,并把它端到咖啡桌这里来。", "text": "On(Water,CoffeeTable)", "score": "2.1878047"}]}
{"id": 153, "question": "你能制作咖啡并把它端到茶水桌这里来吗?", "ctxs": [{"id": "169", "title": "你能制作水并把它端到咖啡桌这里来吗?", "text": "On(Water,CoffeeTable)", "score": "1.9269507"}, {"id": "165", "title": "你能制作水并把它端到吧台这里来吗?", "text": "On(Water,Bar)", "score": "1.9088244"}, {"id": "153", "title": "你能制作咖啡并把它端到茶水桌这里来吗?", "text": "On(Coffee,WaterTable)", "score": "1.8703468"}]}
{"id": 154, "question": "给我来点咖啡,并把它端到茶水桌这里来。", "ctxs": [{"id": "170", "title": "给我来点水,并把它端到咖啡桌这里来。", "text": "On(Water,CoffeeTable)", "score": "2.1865666"}, {"id": "166", "title": "给我来点水,并把它端到吧台这里来。", "text": "On(Water,Bar)", "score": "2.1841354"}, {"id": "176", "title": "给我来点水,并把它端到第二张桌子这里来。", "text": "On(Water,Table2)", "score": "2.1659036"}]}
{"id": 155, "question": "你能制作咖啡并把它端到咖啡桌这里来吗?", "ctxs": [{"id": "155", "title": "你能制作咖啡并把它端到咖啡桌这里来吗?", "text": "On(Coffee,CoffeeTable)", "score": "1.8393074"}, {"id": "151", "title": "你能制作咖啡并把它端到吧台这里来吗?", "text": "On(Coffee,Bar)", "score": "1.8268918"}, {"id": "161", "title": "你能制作咖啡并把它端到第二张桌子这里来吗?", "text": "On(Coffee,Table2)", "score": "1.7331395"}]}
{"id": 156, "question": "给我来点咖啡,并把它端到咖啡桌这里来。", "ctxs": [{"id": "152", "title": "给我来点咖啡,并把它端到吧台这里来。", "text": "On(Coffee,Bar)", "score": "2.2115762"}, {"id": "156", "title": "给我来点咖啡,并把它端到咖啡桌这里来。", "text": "On(Coffee,CoffeeTable)", "score": "2.1760995"}, {"id": "170", "title": "给我来点水,并把它端到咖啡桌这里来。", "text": "On(Water,CoffeeTable)", "score": "2.14287"}]}
{"id": 157, "question": "你能制作咖啡并把它端到另一个吧台这里来吗?", "ctxs": [{"id": "155", "title": "你能制作咖啡并把它端到咖啡桌这里来吗?", "text": "On(Coffee,CoffeeTable)", "score": "1.6930366"}, {"id": "151", "title": "你能制作咖啡并把它端到吧台这里来吗?", "text": "On(Coffee,Bar)", "score": "1.6808059"}, {"id": "161", "title": "你能制作咖啡并把它端到第二张桌子这里来吗?", "text": "On(Coffee,Table2)", "score": "1.6598804"}]}
{"id": 158, "question": "给我来点咖啡,并把它端到另一个吧台这里来。", "ctxs": [{"id": "152", "title": "给我来点咖啡,并把它端到吧台这里来。", "text": "On(Coffee,Bar)", "score": "2.1726427"}, {"id": "156", "title": "给我来点咖啡,并把它端到咖啡桌这里来。", "text": "On(Coffee,CoffeeTable)", "score": "2.1402066"}, {"id": "158", "title": "给我来点咖啡,并把它端到另一个吧台这里来。", "text": "On(Coffee,Bar2)", "score": "2.1338644"}]}
{"id": 159, "question": "你能制作咖啡并把它端到第一张桌子这里来吗?", "ctxs": [{"id": "161", "title": "你能制作咖啡并把它端到第二张桌子这里来吗?", "text": "On(Coffee,Table2)", "score": "1.8007791"}, {"id": "159", "title": "你能制作咖啡并把它端到第一张桌子这里来吗?", "text": "On(Coffee,Table1)", "score": "1.7842393"}, {"id": "163", "title": "你能制作咖啡并把它端到第三张桌子这里来吗?", "text": "On(Coffee,Table3)", "score": "1.7587419"}]}
{"id": 160, "question": "给我来点咖啡,并把它端到第一张桌子这里来。", "ctxs": [{"id": "152", "title": "给我来点咖啡,并把它端到吧台这里来。", "text": "On(Coffee,Bar)", "score": "2.1492553"}, {"id": "156", "title": "给我来点咖啡,并把它端到咖啡桌这里来。", "text": "On(Coffee,CoffeeTable)", "score": "2.119937"}, {"id": "158", "title": "给我来点咖啡,并把它端到另一个吧台这里来。", "text": "On(Coffee,Bar2)", "score": "2.111105"}]}
{"id": 161, "question": "你能制作咖啡并把它端到第二张桌子这里来吗?", "ctxs": [{"id": "161", "title": "你能制作咖啡并把它端到第二张桌子这里来吗?", "text": "On(Coffee,Table2)", "score": "1.8699014"}, {"id": "163", "title": "你能制作咖啡并把它端到第三张桌子这里来吗?", "text": "On(Coffee,Table3)", "score": "1.8155208"}, {"id": "159", "title": "你能制作咖啡并把它端到第一张桌子这里来吗?", "text": "On(Coffee,Table1)", "score": "1.8007791"}]}
{"id": 162, "question": "给我来点咖啡,并把它端到第二张桌子这里来。", "ctxs": [{"id": "152", "title": "给我来点咖啡,并把它端到吧台这里来。", "text": "On(Coffee,Bar)", "score": "2.1339848"}, {"id": "156", "title": "给我来点咖啡,并把它端到咖啡桌这里来。", "text": "On(Coffee,CoffeeTable)", "score": "2.1056848"}, {"id": "160", "title": "给我来点咖啡,并把它端到第一张桌子这里来。", "text": "On(Coffee,Table1)", "score": "2.0872278"}]}
{"id": 163, "question": "你能制作咖啡并把它端到第三张桌子这里来吗?", "ctxs": [{"id": "163", "title": "你能制作咖啡并把它端到第三张桌子这里来吗?", "text": "On(Coffee,Table3)", "score": "1.9782263"}, {"id": "191", "title": "你能制作点心或者甜品并把它端到第三张桌子这里来吗?", "text": "On(Dessert,Table3)", "score": "1.8689624"}, {"id": "177", "title": "你能制作水并把它端到第三张桌子这里来吗?", "text": "On(Water,Table3)", "score": "1.8418274"}]}
{"id": 164, "question": "给我来点咖啡,并把它端到第三张桌子这里来。", "ctxs": [{"id": "18", "title": "你能过来一下吗?我在第三张桌子这里。", "text": "At(Robot,Table3)", "score": "2.119498"}, {"id": "164", "title": "给我来点咖啡,并把它端到第三张桌子这里来。", "text": "On(Coffee,Table3)", "score": "2.117557"}, {"id": "152", "title": "给我来点咖啡,并把它端到吧台这里来。", "text": "On(Coffee,Bar)", "score": "2.0985599"}]}
{"id": 165, "question": "你能制作水并把它端到吧台这里来吗?", "ctxs": [{"id": "169", "title": "你能制作水并把它端到咖啡桌这里来吗?", "text": "On(Water,CoffeeTable)", "score": "2.007537"}, {"id": "165", "title": "你能制作水并把它端到吧台这里来吗?", "text": "On(Water,Bar)", "score": "2.0016434"}, {"id": "167", "title": "你能制作水并把它端到茶水桌这里来吗?", "text": "On(Water,WaterTable)", "score": "1.958005"}]}
{"id": 166, "question": "给我来点水,并把它端到吧台这里来。", "ctxs": [{"id": "166", "title": "给我来点水,并把它端到吧台这里来。", "text": "On(Water,Bar)", "score": "2.2410848"}, {"id": "170", "title": "给我来点水,并把它端到咖啡桌这里来。", "text": "On(Water,CoffeeTable)", "score": "2.2379642"}, {"id": "168", "title": "给我来点水,并把它端到茶水桌这里来。", "text": "On(Water,WaterTable)", "score": "2.217682"}]}
{"id": 167, "question": "你能制作水并把它端到茶水桌这里来吗?", "ctxs": [{"id": "169", "title": "你能制作水并把它端到咖啡桌这里来吗?", "text": "On(Water,CoffeeTable)", "score": "1.9688715"}, {"id": "165", "title": "你能制作水并把它端到吧台这里来吗?", "text": "On(Water,Bar)", "score": "1.958005"}, {"id": "167", "title": "你能制作水并把它端到茶水桌这里来吗?", "text": "On(Water,WaterTable)", "score": "1.9421489"}]}
{"id": 168, "question": "给我来点水,并把它端到茶水桌这里来。", "ctxs": [{"id": "166", "title": "给我来点水,并把它端到吧台这里来。", "text": "On(Water,Bar)", "score": "2.217682"}, {"id": "170", "title": "给我来点水,并把它端到咖啡桌这里来。", "text": "On(Water,CoffeeTable)", "score": "2.217308"}, {"id": "168", "title": "给我来点水,并把它端到茶水桌这里来。", "text": "On(Water,WaterTable)", "score": "2.2161555"}]}
{"id": 169, "question": "你能制作水并把它端到咖啡桌这里来吗?", "ctxs": [{"id": "169", "title": "你能制作水并把它端到咖啡桌这里来吗?", "text": "On(Water,CoffeeTable)", "score": "2.037116"}, {"id": "165", "title": "你能制作水并把它端到吧台这里来吗?", "text": "On(Water,Bar)", "score": "2.007537"}, {"id": "167", "title": "你能制作水并把它端到茶水桌这里来吗?", "text": "On(Water,WaterTable)", "score": "1.968872"}]}
{"id": 170, "question": "给我来点水,并把它端到咖啡桌这里来。", "ctxs": [{"id": "170", "title": "给我来点水,并把它端到咖啡桌这里来。", "text": "On(Water,CoffeeTable)", "score": "2.240584"}, {"id": "166", "title": "给我来点水,并把它端到吧台这里来。", "text": "On(Water,Bar)", "score": "2.2379642"}, {"id": "168", "title": "给我来点水,并把它端到茶水桌这里来。", "text": "On(Water,WaterTable)", "score": "2.217308"}]}
{"id": 171, "question": "你能制作水并把它端到另一个吧台这里来吗?", "ctxs": [{"id": "169", "title": "你能制作水并把它端到咖啡桌这里来吗?", "text": "On(Water,CoffeeTable)", "score": "1.902329"}, {"id": "165", "title": "你能制作水并把它端到吧台这里来吗?", "text": "On(Water,Bar)", "score": "1.8987939"}, {"id": "167", "title": "你能制作水并把它端到茶水桌这里来吗?", "text": "On(Water,WaterTable)", "score": "1.8645585"}]}
{"id": 172, "question": "给我来点水,并把它端到另一个吧台这里来。", "ctxs": [{"id": "170", "title": "给我来点水,并把它端到咖啡桌这里来。", "text": "On(Water,CoffeeTable)", "score": "2.1772807"}, {"id": "166", "title": "给我来点水,并把它端到吧台这里来。", "text": "On(Water,Bar)", "score": "2.1749206"}, {"id": "176", "title": "给我来点水,并把它端到第二张桌子这里来。", "text": "On(Water,Table2)", "score": "2.1655965"}]}
{"id": 173, "question": "你能制作水并把它端到第一张桌子这里来吗?", "ctxs": [{"id": "175", "title": "你能制作水并把它端到第二张桌子这里来吗?", "text": "On(Water,Table2)", "score": "1.9101818"}, {"id": "173", "title": "你能制作水并把它端到第一张桌子这里来吗?", "text": "On(Water,Table1)", "score": "1.8865565"}, {"id": "165", "title": "你能制作水并把它端到吧台这里来吗?", "text": "On(Water,Bar)", "score": "1.8756578"}]}
{"id": 174, "question": "给我来点水,并把它端到第一张桌子这里来。", "ctxs": [{"id": "176", "title": "给我来点水,并把它端到第二张桌子这里来。", "text": "On(Water,Table2)", "score": "2.1952913"}, {"id": "174", "title": "给我来点水,并把它端到第一张桌子这里来。", "text": "On(Water,Table1)", "score": "2.186637"}, {"id": "170", "title": "给我来点水,并把它端到咖啡桌这里来。", "text": "On(Water,CoffeeTable)", "score": "2.1862066"}]}
{"id": 175, "question": "你能制作水并把它端到第二张桌子这里来吗?", "ctxs": [{"id": "175", "title": "你能制作水并把它端到第二张桌子这里来吗?", "text": "On(Water,Table2)", "score": "1.9823023"}, {"id": "169", "title": "你能制作水并把它端到咖啡桌这里来吗?", "text": "On(Water,CoffeeTable)", "score": "1.9307847"}, {"id": "165", "title": "你能制作水并把它端到吧台这里来吗?", "text": "On(Water,Bar)", "score": "1.9304652"}]}
{"id": 176, "question": "给我来点水,并把它端到第二张桌子这里来。", "ctxs": [{"id": "176", "title": "给我来点水,并把它端到第二张桌子这里来。", "text": "On(Water,Table2)", "score": "2.2237663"}, {"id": "170", "title": "给我来点水,并把它端到咖啡桌这里来。", "text": "On(Water,CoffeeTable)", "score": "2.2109504"}, {"id": "166", "title": "给我来点水,并把它端到吧台这里来。", "text": "On(Water,Bar)", "score": "2.2092426"}]}
{"id": 177, "question": "你能制作水并把它端到第三张桌子这里来吗?", "ctxs": [{"id": "177", "title": "你能制作水并把它端到第三张桌子这里来吗?", "text": "On(Water,Table3)", "score": "1.998524"}, {"id": "175", "title": "你能制作水并把它端到第二张桌子这里来吗?", "text": "On(Water,Table2)", "score": "1.9064887"}, {"id": "165", "title": "你能制作水并把它端到吧台这里来吗?", "text": "On(Water,Bar)", "score": "1.8622496"}]}
{"id": 178, "question": "给我来点水,并把它端到第三张桌子这里来。", "ctxs": [{"id": "178", "title": "给我来点水,并把它端到第三张桌子这里来。", "text": "On(Water,Table3)", "score": "2.1871204"}, {"id": "176", "title": "给我来点水,并把它端到第二张桌子这里来。", "text": "On(Water,Table2)", "score": "2.1601143"}, {"id": "170", "title": "给我来点水,并把它端到咖啡桌这里来。", "text": "On(Water,CoffeeTable)", "score": "2.1510832"}]}
{"id": 179, "question": "你能制作点心或者甜品并把它端到吧台这里来吗?", "ctxs": [{"id": "183", "title": "你能制作点心或者甜品并把它端到咖啡桌这里来吗?", "text": "On(Dessert,CoffeeTable)", "score": "1.6959481"}, {"id": "191", "title": "你能制作点心或者甜品并把它端到第三张桌子这里来吗?", "text": "On(Dessert,Table3)", "score": "1.6853154"}, {"id": "189", "title": "你能制作点心或者甜品并把它端到第二张桌子这里来吗?", "text": "On(Dessert,Table2)", "score": "1.684577"}]}
{"id": 180, "question": "给我来点点心或者甜品,并把它端到吧台这里来。", "ctxs": [{"id": "152", "title": "给我来点咖啡,并把它端到吧台这里来。", "text": "On(Coffee,Bar)", "score": "2.1272857"}, {"id": "156", "title": "给我来点咖啡,并把它端到咖啡桌这里来。", "text": "On(Coffee,CoffeeTable)", "score": "2.0986032"}, {"id": "158", "title": "给我来点咖啡,并把它端到另一个吧台这里来。", "text": "On(Coffee,Bar2)", "score": "2.077156"}]}
{"id": 181, "question": "你能制作点心或者甜品并把它端到茶水桌这里来吗?", "ctxs": [{"id": "181", "title": "你能制作点心或者甜品并把它端到茶水桌这里来吗?", "text": "On(Dessert,WaterTable)", "score": "1.7740824"}, {"id": "169", "title": "你能制作水并把它端到咖啡桌这里来吗?", "text": "On(Water,CoffeeTable)", "score": "1.7719753"}, {"id": "165", "title": "你能制作水并把它端到吧台这里来吗?", "text": "On(Water,Bar)", "score": "1.7649422"}]}
{"id": 182, "question": "给我来点点心或者甜品,并把它端到茶水桌这里来。", "ctxs": [{"id": "170", "title": "给我来点水,并把它端到咖啡桌这里来。", "text": "On(Water,CoffeeTable)", "score": "2.1378157"}, {"id": "166", "title": "给我来点水,并把它端到吧台这里来。", "text": "On(Water,Bar)", "score": "2.1324463"}, {"id": "176", "title": "给我来点水,并把它端到第二张桌子这里来。", "text": "On(Water,Table2)", "score": "2.1323798"}]}
{"id": 183, "question": "你能制作点心或者甜品并把它端到咖啡桌这里来吗?", "ctxs": [{"id": "183", "title": "你能制作点心或者甜品并把它端到咖啡桌这里来吗?", "text": "On(Dessert,CoffeeTable)", "score": "1.7151506"}, {"id": "179", "title": "你能制作点心或者甜品并把它端到吧台这里来吗?", "text": "On(Dessert,Bar)", "score": "1.6959481"}, {"id": "191", "title": "你能制作点心或者甜品并把它端到第三张桌子这里来吗?", "text": "On(Dessert,Table3)", "score": "1.6923969"}]}
{"id": 184, "question": "给我来点点心或者甜品,并把它端到咖啡桌这里来。", "ctxs": [{"id": "152", "title": "给我来点咖啡,并把它端到吧台这里来。", "text": "On(Coffee,Bar)", "score": "2.132031"}, {"id": "156", "title": "给我来点咖啡,并把它端到咖啡桌这里来。", "text": "On(Coffee,CoffeeTable)", "score": "2.1020427"}, {"id": "158", "title": "给我来点咖啡,并把它端到另一个吧台这里来。", "text": "On(Coffee,Bar2)", "score": "2.0765693"}]}
{"id": 185, "question": "你能制作点心或者甜品并把它端到另一个吧台这里来吗?", "ctxs": [{"id": "183", "title": "你能制作点心或者甜品并把它端到咖啡桌这里来吗?", "text": "On(Dessert,CoffeeTable)", "score": "1.679406"}, {"id": "189", "title": "你能制作点心或者甜品并把它端到第二张桌子这里来吗?", "text": "On(Dessert,Table2)", "score": "1.6742535"}, {"id": "187", "title": "你能制作点心或者甜品并把它端到第一张桌子这里来吗?", "text": "On(Dessert,Table1)", "score": "1.673859"}]}
{"id": 186, "question": "给我来点点心或者甜品,并把它端到另一个吧台这里来。", "ctxs": [{"id": "152", "title": "给我来点咖啡,并把它端到吧台这里来。", "text": "On(Coffee,Bar)", "score": "2.118686"}, {"id": "156", "title": "给我来点咖啡,并把它端到咖啡桌这里来。", "text": "On(Coffee,CoffeeTable)", "score": "2.08951"}, {"id": "158", "title": "给我来点咖啡,并把它端到另一个吧台这里来。", "text": "On(Coffee,Bar2)", "score": "2.0669885"}]}
{"id": 187, "question": "你能制作点心或者甜品并把它端到第一张桌子这里来吗?", "ctxs": [{"id": "189", "title": "你能制作点心或者甜品并把它端到第二张桌子这里来吗?", "text": "On(Dessert,Table2)", "score": "1.7500786"}, {"id": "191", "title": "你能制作点心或者甜品并把它端到第三张桌子这里来吗?", "text": "On(Dessert,Table3)", "score": "1.7498305"}, {"id": "187", "title": "你能制作点心或者甜品并把它端到第一张桌子这里来吗?", "text": "On(Dessert,Table1)", "score": "1.7471731"}]}
{"id": 188, "question": "给我来点点心或者甜品,并把它端到第一张桌子这里来。", "ctxs": [{"id": "152", "title": "给我来点咖啡,并把它端到吧台这里来。", "text": "On(Coffee,Bar)", "score": "2.1115456"}, {"id": "156", "title": "给我来点咖啡,并把它端到咖啡桌这里来。", "text": "On(Coffee,CoffeeTable)", "score": "2.0855277"}, {"id": "158", "title": "给我来点咖啡,并把它端到另一个吧台这里来。", "text": "On(Coffee,Bar2)", "score": "2.072386"}]}
{"id": 189, "question": "你能制作点心或者甜品并把它端到第二张桌子这里来吗?", "ctxs": [{"id": "189", "title": "你能制作点心或者甜品并把它端到第二张桌子这里来吗?", "text": "On(Dessert,Table2)", "score": "1.7765269"}, {"id": "191", "title": "你能制作点心或者甜品并把它端到第三张桌子这里来吗?", "text": "On(Dessert,Table3)", "score": "1.7654393"}, {"id": "187", "title": "你能制作点心或者甜品并把它端到第一张桌子这里来吗?", "text": "On(Dessert,Table1)", "score": "1.7500786"}]}
{"id": 190, "question": "给我来点点心或者甜品,并把它端到第二张桌子这里来。", "ctxs": [{"id": "152", "title": "给我来点咖啡,并把它端到吧台这里来。", "text": "On(Coffee,Bar)", "score": "2.1142352"}, {"id": "156", "title": "给我来点咖啡,并把它端到咖啡桌这里来。", "text": "On(Coffee,CoffeeTable)", "score": "2.0877588"}, {"id": "176", "title": "给我来点水,并把它端到第二张桌子这里来。", "text": "On(Water,Table2)", "score": "2.073924"}]}
{"id": 191, "question": "你能制作点心或者甜品并把它端到第三张桌子这里来吗?", "ctxs": [{"id": "191", "title": "你能制作点心或者甜品并把它端到第三张桌子这里来吗?", "text": "On(Dessert,Table3)", "score": "1.8913462"}, {"id": "163", "title": "你能制作咖啡并把它端到第三张桌子这里来吗?", "text": "On(Coffee,Table3)", "score": "1.8689624"}, {"id": "189", "title": "你能制作点心或者甜品并把它端到第二张桌子这里来吗?", "text": "On(Dessert,Table2)", "score": "1.7654393"}]}
{"id": 192, "question": "给我来点点心或者甜品,并把它端到第三张桌子这里来。", "ctxs": [{"id": "18", "title": "你能过来一下吗?我在第三张桌子这里。", "text": "At(Robot,Table3)", "score": "2.0936718"}, {"id": "152", "title": "给我来点咖啡,并把它端到吧台这里来。", "text": "On(Coffee,Bar)", "score": "2.088079"}, {"id": "164", "title": "给我来点咖啡,并把它端到第三张桌子这里来。", "text": "On(Coffee,Table3)", "score": "2.0863209"}]}

View File

@ -1,8 +0,0 @@
export CUDA_VISIBLE_DEVICES=0
python3 ../generate_passage_embeddings.py \
--model_name_or_path ../../model/contriever-msmarco \
--passages train_robot.jsonl \
--output_dir robot_embeddings \
--shard_id 0 \
--num_shards 1 \
--per_gpu_batch_size 500

View File

@ -1,41 +0,0 @@
import json
import jsonlines
import argparse
def train(args):
filename=args.passages
with open(filename, 'r', encoding="utf-8") as f:
k=0
for line in f:
data = json.loads(line)
dict={"id":k,'title':data['title'],'text':data['text']}
k+=1
with jsonlines.open("train_robot.jsonl", "a") as file_jsonl:
file_jsonl.write(dict)
def test(args):
filename = args.passages
with open(filename, 'r', encoding="utf-8") as f:
k=0
for line in f:
if k<1000:
data = json.loads(line)
dict={"id":data['id'],'question':data['title'],'answers':data['text']}
k+=1
with jsonlines.open("test_robot.jsonl", "a") as file_jsonl:
file_jsonl.write(dict)
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--passages", type=str, default=None, help="Path to passages")
parser.add_argument("--mode", type=str, default=None, help="train or test")
args = parser.parse_args()
if args.mode=='train':
train(args)
elif args.mode=='test':
test(args)
else:
print("error mode!")

View File

@ -1,2 +0,0 @@
{"id": 0, "question": "请把酸奶放在咖啡台上,并打开窗帘。", "ctxs": [{"id": "0", "title": "请把酸奶放在咖啡台上,并打开窗帘。", "text": "On(Yogurt,CoffeeTable),Is(Curtain,Open)", "score": "1.9694625"}, {"id": "1", "title": "可以把牛奶饮料放在2号桌子上吗还有关掉灯光。", "text": "On(MilkDrink,Table2),Is(TubeLight,Off)", "score": "1.8284101"}, {"id": "2", "title": "你好,可以给我上一份甜点吗?", "text": "On(Dessert,Table1)", "score": "1.4835652"}, {"id": "5", "title": "可以把酸奶放在2号桌上吗还有能关掉筒灯吗", "text": "On(Yogurt,Table2),Is(TubeLight,Off)", "score": "1.4412252"}, {"id": "4", "title": "可以送一瓶牛奶饮料到1号桌吗", "text": "On(MilkDrink,Table1)", "score": "1.2867957"}, {"id": "3", "title": "你能到另一个吧台这边来吗?空调可以关掉吗?", "text": "At(Robot,Bar2),Is(AC,On)", "score": "1.2599907"}, {"id": "5", "title": "可以把酸奶放在2号桌上吗还有能关掉筒灯吗", "text": "On(Yogurt,Table2),Is(TubeLight,Off)", "score": "-3.4028235e+38"}, {"id": "5", "title": "可以把酸奶放在2号桌上吗还有能关掉筒灯吗", "text": "On(Yogurt,Table2),Is(TubeLight,Off)", "score": "-3.4028235e+38"}, {"id": "5", "title": "可以把酸奶放在2号桌上吗还有能关掉筒灯吗", "text": "On(Yogurt,Table2),Is(TubeLight,Off)", "score": "-3.4028235e+38"}, {"id": "5", "title": "可以把酸奶放在2号桌上吗还有能关掉筒灯吗", "text": "On(Yogurt,Table2),Is(TubeLight,Off)", "score": "-3.4028235e+38"}, {"id": "5", "title": "可以把酸奶放在2号桌上吗还有能关掉筒灯吗", "text": "On(Yogurt,Table2),Is(TubeLight,Off)", "score": "-3.4028235e+38"}, {"id": "5", "title": "可以把酸奶放在2号桌上吗还有能关掉筒灯吗", "text": "On(Yogurt,Table2),Is(TubeLight,Off)", "score": "-3.4028235e+38"}, {"id": "5", "title": "可以把酸奶放在2号桌上吗还有能关掉筒灯吗", "text": "On(Yogurt,Table2),Is(TubeLight,Off)", "score": "-3.4028235e+38"}, {"id": "5", "title": "可以把酸奶放在2号桌上吗还有能关掉筒灯吗", "text": "On(Yogurt,Table2),Is(TubeLight,Off)", "score": "-3.4028235e+38"}, {"id": "5", "title": "可以把酸奶放在2号桌上吗还有能关掉筒灯吗", "text": "On(Yogurt,Table2),Is(TubeLight,Off)", "score": "-3.4028235e+38"}, {"id": "5", "title": "可以把酸奶放在2号桌上吗还有能关掉筒灯吗", "text": "On(Yogurt,Table2),Is(TubeLight,Off)", "score": "-3.4028235e+38"}, {"id": "5", "title": "可以把酸奶放在2号桌上吗还有能关掉筒灯吗", "text": "On(Yogurt,Table2),Is(TubeLight,Off)", "score": "-3.4028235e+38"}, {"id": "5", "title": "可以把酸奶放在2号桌上吗还有能关掉筒灯吗", "text": "On(Yogurt,Table2),Is(TubeLight,Off)", "score": "-3.4028235e+38"}, {"id": "5", "title": "可以把酸奶放在2号桌上吗还有能关掉筒灯吗", "text": "On(Yogurt,Table2),Is(TubeLight,Off)", "score": "-3.4028235e+38"}, {"id": "5", "title": "可以把酸奶放在2号桌上吗还有能关掉筒灯吗", "text": "On(Yogurt,Table2),Is(TubeLight,Off)", "score": "-3.4028235e+38"}]}
{"id": 1, "question": "可以把牛奶饮料放在2号桌子上吗还有关掉灯光。", "ctxs": [{"id": "1", "title": "可以把牛奶饮料放在2号桌子上吗还有关掉灯光。", "text": "On(MilkDrink,Table2),Is(TubeLight,Off)", "score": "2.138029"}, {"id": "0", "title": "请把酸奶放在咖啡台上,并打开窗帘。", "text": "On(Yogurt,CoffeeTable),Is(Curtain,Open)", "score": "1.8282425"}, {"id": "5", "title": "可以把酸奶放在2号桌上吗还有能关掉筒灯吗", "text": "On(Yogurt,Table2),Is(TubeLight,Off)", "score": "1.6972268"}, {"id": "2", "title": "你好,可以给我上一份甜点吗?", "text": "On(Dessert,Table1)", "score": "1.4741647"}, {"id": "4", "title": "可以送一瓶牛奶饮料到1号桌吗", "text": "On(MilkDrink,Table1)", "score": "1.4532053"}, {"id": "3", "title": "你能到另一个吧台这边来吗?空调可以关掉吗?", "text": "At(Robot,Bar2),Is(AC,On)", "score": "1.3438905"}, {"id": "5", "title": "可以把酸奶放在2号桌上吗还有能关掉筒灯吗", "text": "On(Yogurt,Table2),Is(TubeLight,Off)", "score": "-3.4028235e+38"}, {"id": "5", "title": "可以把酸奶放在2号桌上吗还有能关掉筒灯吗", "text": "On(Yogurt,Table2),Is(TubeLight,Off)", "score": "-3.4028235e+38"}, {"id": "5", "title": "可以把酸奶放在2号桌上吗还有能关掉筒灯吗", "text": "On(Yogurt,Table2),Is(TubeLight,Off)", "score": "-3.4028235e+38"}, {"id": "5", "title": "可以把酸奶放在2号桌上吗还有能关掉筒灯吗", "text": "On(Yogurt,Table2),Is(TubeLight,Off)", "score": "-3.4028235e+38"}, {"id": "5", "title": "可以把酸奶放在2号桌上吗还有能关掉筒灯吗", "text": "On(Yogurt,Table2),Is(TubeLight,Off)", "score": "-3.4028235e+38"}, {"id": "5", "title": "可以把酸奶放在2号桌上吗还有能关掉筒灯吗", "text": "On(Yogurt,Table2),Is(TubeLight,Off)", "score": "-3.4028235e+38"}, {"id": "5", "title": "可以把酸奶放在2号桌上吗还有能关掉筒灯吗", "text": "On(Yogurt,Table2),Is(TubeLight,Off)", "score": "-3.4028235e+38"}, {"id": "5", "title": "可以把酸奶放在2号桌上吗还有能关掉筒灯吗", "text": "On(Yogurt,Table2),Is(TubeLight,Off)", "score": "-3.4028235e+38"}, {"id": "5", "title": "可以把酸奶放在2号桌上吗还有能关掉筒灯吗", "text": "On(Yogurt,Table2),Is(TubeLight,Off)", "score": "-3.4028235e+38"}, {"id": "5", "title": "可以把酸奶放在2号桌上吗还有能关掉筒灯吗", "text": "On(Yogurt,Table2),Is(TubeLight,Off)", "score": "-3.4028235e+38"}, {"id": "5", "title": "可以把酸奶放在2号桌上吗还有能关掉筒灯吗", "text": "On(Yogurt,Table2),Is(TubeLight,Off)", "score": "-3.4028235e+38"}, {"id": "5", "title": "可以把酸奶放在2号桌上吗还有能关掉筒灯吗", "text": "On(Yogurt,Table2),Is(TubeLight,Off)", "score": "-3.4028235e+38"}, {"id": "5", "title": "可以把酸奶放在2号桌上吗还有能关掉筒灯吗", "text": "On(Yogurt,Table2),Is(TubeLight,Off)", "score": "-3.4028235e+38"}, {"id": "5", "title": "可以把酸奶放在2号桌上吗还有能关掉筒灯吗", "text": "On(Yogurt,Table2),Is(TubeLight,Off)", "score": "-3.4028235e+38"}]}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,9 @@
python passage_retrieval2.py \
--data NQ/test.json \
--model_name_or_path ../model/contriever-msmarco \
--passages psgs_w100.tsv \
--passages_embeddings "wikipedia_embeddings/*" \
--output_dir retr_result \
--n_docs 20
python passage_retrieval2.py --data test_robot.jsonl --model_name_or_path ../contriever-msmarco --passages train_robot.jsonl --passages_embeddings "robot_embeddings/*" --output_dir retr_result --n_docs 3 --no_fp16

View File

@ -0,0 +1,14 @@
import os
path_goal_states_with_description = os.path.join('../../../behavior_tree/dataset/goal_states_with_description.jsonl')
cmd_goal_states_with_descrip_to_train = f' .\process_json.py --passages {path_goal_states_with_description} --mode train'
cmd_goal_states_with_descrip_to_test = f" .\process_json.py --passages .\\train_robot.jsonl --mode test"
cmd_get_embedding = f" generate_passage_embeddings.py --model_name_or_path ../contriever-msmarco --passages train_robot.jsonl --output_dir robot_embeddings --shard_id 0 --num_shards 1 --per_gpu_batch_size 500 --no_fp16"
cmd_test_retri = f" passage_retrieval2.py --data test_robot.jsonl --model_name_or_path ../contriever-msmarco --passages train_robot.jsonl --passages_embeddings \"robot_embeddings/*\" --output_dir retr_result --n_docs 3 --no_fp16"
conda_path = os.path.join("C:/Users/Estrella/.conda/envs/py310/python.exe")
os.system(conda_path + cmd_goal_states_with_descrip_to_train)
os.system(conda_path + cmd_goal_states_with_descrip_to_test)
os.system(conda_path + cmd_get_embedding)
os.system(conda_path + cmd_test_retri)

View File

@ -5,8 +5,7 @@ import torch
import transformers
from transformers import BertModel, XLMRobertaModel
from robowaiter.algos.retrieval.retrieval_lm.src import utils
from src import utils
class Contriever(BertModel):

View File

@ -10,8 +10,9 @@ import numpy as np
import numpy.random
import logging
from collections import defaultdict
import torch.distributed as dist
from robowaiter.algos.retrieval.retrieval_lm.src import dist_utils
from src import dist_utils
logger = logging.getLogger(__name__)
@ -229,7 +230,7 @@ def load_passages(path):
return
logger.info(f"Loading passages from: {path}")
passages = []
with open(path,encoding='UTF-8') as fin:
with open(path,encoding='utf-8') as fin:
if path.endswith(".jsonl"):
for k, line in enumerate(fin):
ex = json.loads(line)

View File

@ -5,10 +5,10 @@ import sys
import logging
import torch
import errno
from typing import Union, Tuple, Dict
from typing import Union, Tuple, List, Dict
from collections import defaultdict
from robowaiter.algos.retrieval.retrieval_lm.src import dist_utils
from src import dist_utils
Number = Union[float, int]

View File

@ -0,0 +1,193 @@
{"id": 0, "question": "你能过来一下吗?我在吧台这里。"}
{"id": 1, "question": "麻烦你去一下吧台。"}
{"id": 2, "question": "你能去吧台那个位置吗?"}
{"id": 3, "question": "你能过来一下吗?我在茶水桌这里。"}
{"id": 4, "question": "麻烦你去一下茶水桌。"}
{"id": 5, "question": "你能去茶水桌那个位置吗?"}
{"id": 6, "question": "你能过来一下吗?我在咖啡桌这里。"}
{"id": 7, "question": "麻烦你去一下咖啡桌。"}
{"id": 8, "question": "你能去咖啡桌那个位置吗?"}
{"id": 9, "question": "你能过来一下吗?我在另一个吧台这里。"}
{"id": 10, "question": "麻烦你去一下另一个吧台。"}
{"id": 11, "question": "你能去另一个吧台那个位置吗?"}
{"id": 12, "question": "你能过来一下吗?我在第一张桌子这里。"}
{"id": 13, "question": "麻烦你去一下第一张桌子。"}
{"id": 14, "question": "你能去第一张桌子那个位置吗?"}
{"id": 15, "question": "你能过来一下吗?我在第二张桌子这里。"}
{"id": 16, "question": "麻烦你去一下第二张桌子。"}
{"id": 17, "question": "你能去第二张桌子那个位置吗?"}
{"id": 18, "question": "你能过来一下吗?我在第三张桌子这里。"}
{"id": 19, "question": "麻烦你去一下第三张桌子。"}
{"id": 20, "question": "你能去第三张桌子那个位置吗?"}
{"id": 21, "question": "麻烦你把盒装冰红茶放到吧台那个位置。"}
{"id": 22, "question": "请你拿一下盒装冰红茶到吧台位置。"}
{"id": 23, "question": "麻烦你把盒装冰红茶放到茶水桌那个位置。"}
{"id": 24, "question": "请你拿一下盒装冰红茶到茶水桌位置。"}
{"id": 25, "question": "麻烦你把盒装冰红茶放到咖啡桌那个位置。"}
{"id": 26, "question": "请你拿一下盒装冰红茶到咖啡桌位置。"}
{"id": 27, "question": "麻烦你把盒装冰红茶放到另一个吧台那个位置。"}
{"id": 28, "question": "请你拿一下盒装冰红茶到另一个吧台位置。"}
{"id": 29, "question": "麻烦你把盒装冰红茶放到第一张桌子那个位置。"}
{"id": 30, "question": "请你拿一下盒装冰红茶到第一张桌子位置。"}
{"id": 31, "question": "麻烦你把盒装冰红茶放到第二张桌子那个位置。"}
{"id": 32, "question": "请你拿一下盒装冰红茶到第二张桌子位置。"}
{"id": 33, "question": "麻烦你把盒装冰红茶放到第三张桌子那个位置。"}
{"id": 34, "question": "请你拿一下盒装冰红茶到第三张桌子位置。"}
{"id": 35, "question": "麻烦你把瓶装饮料放到吧台那个位置。"}
{"id": 36, "question": "请你拿一下瓶装饮料到吧台位置。"}
{"id": 37, "question": "麻烦你把瓶装饮料放到茶水桌那个位置。"}
{"id": 38, "question": "请你拿一下瓶装饮料到茶水桌位置。"}
{"id": 39, "question": "麻烦你把瓶装饮料放到咖啡桌那个位置。"}
{"id": 40, "question": "请你拿一下瓶装饮料到咖啡桌位置。"}
{"id": 41, "question": "麻烦你把瓶装饮料放到另一个吧台那个位置。"}
{"id": 42, "question": "请你拿一下瓶装饮料到另一个吧台位置。"}
{"id": 43, "question": "麻烦你把瓶装饮料放到第一张桌子那个位置。"}
{"id": 44, "question": "请你拿一下瓶装饮料到第一张桌子位置。"}
{"id": 45, "question": "麻烦你把瓶装饮料放到第二张桌子那个位置。"}
{"id": 46, "question": "请你拿一下瓶装饮料到第二张桌子位置。"}
{"id": 47, "question": "麻烦你把瓶装饮料放到第三张桌子那个位置。"}
{"id": 48, "question": "请你拿一下瓶装饮料到第三张桌子位置。"}
{"id": 49, "question": "麻烦你把酸奶放到吧台那个位置。"}
{"id": 50, "question": "请你拿一下酸奶到吧台位置。"}
{"id": 51, "question": "麻烦你把酸奶放到茶水桌那个位置。"}
{"id": 52, "question": "请你拿一下酸奶到茶水桌位置。"}
{"id": 53, "question": "麻烦你把酸奶放到咖啡桌那个位置。"}
{"id": 54, "question": "请你拿一下酸奶到咖啡桌位置。"}
{"id": 55, "question": "麻烦你把酸奶放到另一个吧台那个位置。"}
{"id": 56, "question": "请你拿一下酸奶到另一个吧台位置。"}
{"id": 57, "question": "麻烦你把酸奶放到第一张桌子那个位置。"}
{"id": 58, "question": "请你拿一下酸奶到第一张桌子位置。"}
{"id": 59, "question": "麻烦你把酸奶放到第二张桌子那个位置。"}
{"id": 60, "question": "请你拿一下酸奶到第二张桌子位置。"}
{"id": 61, "question": "麻烦你把酸奶放到第三张桌子那个位置。"}
{"id": 62, "question": "请你拿一下酸奶到第三张桌子位置。"}
{"id": 63, "question": "麻烦你把AD钙奶放到吧台那个位置。"}
{"id": 64, "question": "请你拿一下AD钙奶到吧台位置。"}
{"id": 65, "question": "麻烦你把AD钙奶放到茶水桌那个位置。"}
{"id": 66, "question": "请你拿一下AD钙奶到茶水桌位置。"}
{"id": 67, "question": "麻烦你把AD钙奶放到咖啡桌那个位置。"}
{"id": 68, "question": "请你拿一下AD钙奶到咖啡桌位置。"}
{"id": 69, "question": "麻烦你把AD钙奶放到另一个吧台那个位置。"}
{"id": 70, "question": "请你拿一下AD钙奶到另一个吧台位置。"}
{"id": 71, "question": "麻烦你把AD钙奶放到第一张桌子那个位置。"}
{"id": 72, "question": "请你拿一下AD钙奶到第一张桌子位置。"}
{"id": 73, "question": "麻烦你把AD钙奶放到第二张桌子那个位置。"}
{"id": 74, "question": "请你拿一下AD钙奶到第二张桌子位置。"}
{"id": 75, "question": "麻烦你把AD钙奶放到第三张桌子那个位置。"}
{"id": 76, "question": "请你拿一下AD钙奶到第三张桌子位置。"}
{"id": 77, "question": "麻烦你把牛奶味的饮料放到吧台那个位置。"}
{"id": 78, "question": "请你拿一下牛奶味的饮料到吧台位置。"}
{"id": 79, "question": "麻烦你把牛奶味的饮料放到茶水桌那个位置。"}
{"id": 80, "question": "请你拿一下牛奶味的饮料到茶水桌位置。"}
{"id": 81, "question": "麻烦你把牛奶味的饮料放到咖啡桌那个位置。"}
{"id": 82, "question": "请你拿一下牛奶味的饮料到咖啡桌位置。"}
{"id": 83, "question": "麻烦你把牛奶味的饮料放到另一个吧台那个位置。"}
{"id": 84, "question": "请你拿一下牛奶味的饮料到另一个吧台位置。"}
{"id": 85, "question": "麻烦你把牛奶味的饮料放到第一张桌子那个位置。"}
{"id": 86, "question": "请你拿一下牛奶味的饮料到第一张桌子位置。"}
{"id": 87, "question": "麻烦你把牛奶味的饮料放到第二张桌子那个位置。"}
{"id": 88, "question": "请你拿一下牛奶味的饮料到第二张桌子位置。"}
{"id": 89, "question": "麻烦你把牛奶味的饮料放到第三张桌子那个位置。"}
{"id": 90, "question": "请你拿一下牛奶味的饮料到第三张桌子位置。"}
{"id": 91, "question": "麻烦你把牛奶放到吧台那个位置。"}
{"id": 92, "question": "请你拿一下牛奶到吧台位置。"}
{"id": 93, "question": "麻烦你把牛奶放到茶水桌那个位置。"}
{"id": 94, "question": "请你拿一下牛奶到茶水桌位置。"}
{"id": 95, "question": "麻烦你把牛奶放到咖啡桌那个位置。"}
{"id": 96, "question": "请你拿一下牛奶到咖啡桌位置。"}
{"id": 97, "question": "麻烦你把牛奶放到另一个吧台那个位置。"}
{"id": 98, "question": "请你拿一下牛奶到另一个吧台位置。"}
{"id": 99, "question": "麻烦你把牛奶放到第一张桌子那个位置。"}
{"id": 100, "question": "请你拿一下牛奶到第一张桌子位置。"}
{"id": 101, "question": "麻烦你把牛奶放到第二张桌子那个位置。"}
{"id": 102, "question": "请你拿一下牛奶到第二张桌子位置。"}
{"id": 103, "question": "麻烦你把牛奶放到第三张桌子那个位置。"}
{"id": 104, "question": "请你拿一下牛奶到第三张桌子位置。"}
{"id": 105, "question": "麻烦你把保温杯放到吧台那个位置。"}
{"id": 106, "question": "请你拿一下保温杯到吧台位置。"}
{"id": 107, "question": "麻烦你把保温杯放到茶水桌那个位置。"}
{"id": 108, "question": "请你拿一下保温杯到茶水桌位置。"}
{"id": 109, "question": "麻烦你把保温杯放到咖啡桌那个位置。"}
{"id": 110, "question": "请你拿一下保温杯到咖啡桌位置。"}
{"id": 111, "question": "麻烦你把保温杯放到另一个吧台那个位置。"}
{"id": 112, "question": "请你拿一下保温杯到另一个吧台位置。"}
{"id": 113, "question": "麻烦你把保温杯放到第一张桌子那个位置。"}
{"id": 114, "question": "请你拿一下保温杯到第一张桌子位置。"}
{"id": 115, "question": "麻烦你把保温杯放到第二张桌子那个位置。"}
{"id": 116, "question": "请你拿一下保温杯到第二张桌子位置。"}
{"id": 117, "question": "麻烦你把保温杯放到第三张桌子那个位置。"}
{"id": 118, "question": "请你拿一下保温杯到第三张桌子位置。"}
{"id": 119, "question": "你能把空调关闭一下吗?"}
{"id": 120, "question": "你能把空调打开一下吗?"}
{"id": 121, "question": "你能把空调Temperature调高一下吗"}
{"id": 122, "question": "你能把空调Temperature调低一下吗"}
{"id": 123, "question": "你能把大厅灯关闭一下吗?"}
{"id": 124, "question": "你能把大厅灯打开一下吗?"}
{"id": 125, "question": "你能把筒灯关闭一下吗?"}
{"id": 126, "question": "你能把筒灯打开一下吗?"}
{"id": 127, "question": "你能把窗帘关闭一下吗?"}
{"id": 128, "question": "你能把窗帘打开一下吗?"}
{"id": 129, "question": "你能把椅子脏一下吗?"}
{"id": 130, "question": "你能把椅子打扫干净一下吗?"}
{"id": 131, "question": "你能把地板脏一下吗?"}
{"id": 132, "question": "你能把地板打扫干净一下吗?"}
{"id": 133, "question": "你能把第一张桌子脏一下吗?"}
{"id": 134, "question": "你能把第一张桌子打扫干净一下吗?"}
{"id": 135, "question": "你能把盒装冰红茶抓在手里吗?"}
{"id": 136, "question": "你能一直拿着盒装冰红茶吗?"}
{"id": 137, "question": "你能把瓶装饮料抓在手里吗?"}
{"id": 138, "question": "你能一直拿着瓶装饮料吗?"}
{"id": 139, "question": "你能把酸奶抓在手里吗?"}
{"id": 140, "question": "你能一直拿着酸奶吗?"}
{"id": 141, "question": "你能把AD钙奶抓在手里吗"}
{"id": 142, "question": "你能一直拿着AD钙奶吗"}
{"id": 143, "question": "你能把牛奶味的饮料抓在手里吗?"}
{"id": 144, "question": "你能一直拿着牛奶味的饮料吗?"}
{"id": 145, "question": "你能把牛奶抓在手里吗?"}
{"id": 146, "question": "你能一直拿着牛奶吗?"}
{"id": 147, "question": "你能把保温杯抓在手里吗?"}
{"id": 148, "question": "你能一直拿着保温杯吗?"}
{"id": 149, "question": "你能把Nothing抓在手里吗"}
{"id": 150, "question": "你能一直拿着Nothing吗"}
{"id": 151, "question": "你能制作咖啡并把它端到吧台这里来吗?"}
{"id": 152, "question": "给我来点咖啡,并把它端到吧台这里来。"}
{"id": 153, "question": "你能制作咖啡并把它端到茶水桌这里来吗?"}
{"id": 154, "question": "给我来点咖啡,并把它端到茶水桌这里来。"}
{"id": 155, "question": "你能制作咖啡并把它端到咖啡桌这里来吗?"}
{"id": 156, "question": "给我来点咖啡,并把它端到咖啡桌这里来。"}
{"id": 157, "question": "你能制作咖啡并把它端到另一个吧台这里来吗?"}
{"id": 158, "question": "给我来点咖啡,并把它端到另一个吧台这里来。"}
{"id": 159, "question": "你能制作咖啡并把它端到第一张桌子这里来吗?"}
{"id": 160, "question": "给我来点咖啡,并把它端到第一张桌子这里来。"}
{"id": 161, "question": "你能制作咖啡并把它端到第二张桌子这里来吗?"}
{"id": 162, "question": "给我来点咖啡,并把它端到第二张桌子这里来。"}
{"id": 163, "question": "你能制作咖啡并把它端到第三张桌子这里来吗?"}
{"id": 164, "question": "给我来点咖啡,并把它端到第三张桌子这里来。"}
{"id": 165, "question": "你能制作水并把它端到吧台这里来吗?"}
{"id": 166, "question": "给我来点水,并把它端到吧台这里来。"}
{"id": 167, "question": "你能制作水并把它端到茶水桌这里来吗?"}
{"id": 168, "question": "给我来点水,并把它端到茶水桌这里来。"}
{"id": 169, "question": "你能制作水并把它端到咖啡桌这里来吗?"}
{"id": 170, "question": "给我来点水,并把它端到咖啡桌这里来。"}
{"id": 171, "question": "你能制作水并把它端到另一个吧台这里来吗?"}
{"id": 172, "question": "给我来点水,并把它端到另一个吧台这里来。"}
{"id": 173, "question": "你能制作水并把它端到第一张桌子这里来吗?"}
{"id": 174, "question": "给我来点水,并把它端到第一张桌子这里来。"}
{"id": 175, "question": "你能制作水并把它端到第二张桌子这里来吗?"}
{"id": 176, "question": "给我来点水,并把它端到第二张桌子这里来。"}
{"id": 177, "question": "你能制作水并把它端到第三张桌子这里来吗?"}
{"id": 178, "question": "给我来点水,并把它端到第三张桌子这里来。"}
{"id": 179, "question": "你能制作点心或者甜品并把它端到吧台这里来吗?"}
{"id": 180, "question": "给我来点点心或者甜品,并把它端到吧台这里来。"}
{"id": 181, "question": "你能制作点心或者甜品并把它端到茶水桌这里来吗?"}
{"id": 182, "question": "给我来点点心或者甜品,并把它端到茶水桌这里来。"}
{"id": 183, "question": "你能制作点心或者甜品并把它端到咖啡桌这里来吗?"}
{"id": 184, "question": "给我来点点心或者甜品,并把它端到咖啡桌这里来。"}
{"id": 185, "question": "你能制作点心或者甜品并把它端到另一个吧台这里来吗?"}
{"id": 186, "question": "给我来点点心或者甜品,并把它端到另一个吧台这里来。"}
{"id": 187, "question": "你能制作点心或者甜品并把它端到第一张桌子这里来吗?"}
{"id": 188, "question": "给我来点点心或者甜品,并把它端到第一张桌子这里来。"}
{"id": 189, "question": "你能制作点心或者甜品并把它端到第二张桌子这里来吗?"}
{"id": 190, "question": "给我来点点心或者甜品,并把它端到第二张桌子这里来。"}
{"id": 191, "question": "你能制作点心或者甜品并把它端到第三张桌子这里来吗?"}
{"id": 192, "question": "给我来点点心或者甜品,并把它端到第三张桌子这里来。"}

View File

@ -0,0 +1,193 @@
{"id": 0, "title": "你能过来一下吗?我在吧台这里。", "text": "At(Robot,Bar)"}
{"id": 1, "title": "麻烦你去一下吧台。", "text": "At(Robot,Bar)"}
{"id": 2, "title": "你能去吧台那个位置吗?", "text": "At(Robot,Bar)"}
{"id": 3, "title": "你能过来一下吗?我在茶水桌这里。", "text": "At(Robot,WaterTable)"}
{"id": 4, "title": "麻烦你去一下茶水桌。", "text": "At(Robot,WaterTable)"}
{"id": 5, "title": "你能去茶水桌那个位置吗?", "text": "At(Robot,WaterTable)"}
{"id": 6, "title": "你能过来一下吗?我在咖啡桌这里。", "text": "At(Robot,CoffeeTable)"}
{"id": 7, "title": "麻烦你去一下咖啡桌。", "text": "At(Robot,CoffeeTable)"}
{"id": 8, "title": "你能去咖啡桌那个位置吗?", "text": "At(Robot,CoffeeTable)"}
{"id": 9, "title": "你能过来一下吗?我在另一个吧台这里。", "text": "At(Robot,Bar2)"}
{"id": 10, "title": "麻烦你去一下另一个吧台。", "text": "At(Robot,Bar2)"}
{"id": 11, "title": "你能去另一个吧台那个位置吗?", "text": "At(Robot,Bar2)"}
{"id": 12, "title": "你能过来一下吗?我在第一张桌子这里。", "text": "At(Robot,Table1)"}
{"id": 13, "title": "麻烦你去一下第一张桌子。", "text": "At(Robot,Table1)"}
{"id": 14, "title": "你能去第一张桌子那个位置吗?", "text": "At(Robot,Table1)"}
{"id": 15, "title": "你能过来一下吗?我在第二张桌子这里。", "text": "At(Robot,Table2)"}
{"id": 16, "title": "麻烦你去一下第二张桌子。", "text": "At(Robot,Table2)"}
{"id": 17, "title": "你能去第二张桌子那个位置吗?", "text": "At(Robot,Table2)"}
{"id": 18, "title": "你能过来一下吗?我在第三张桌子这里。", "text": "At(Robot,Table3)"}
{"id": 19, "title": "麻烦你去一下第三张桌子。", "text": "At(Robot,Table3)"}
{"id": 20, "title": "你能去第三张桌子那个位置吗?", "text": "At(Robot,Table3)"}
{"id": 21, "title": "麻烦你把盒装冰红茶放到吧台那个位置。", "text": "On(Softdrink,Bar)"}
{"id": 22, "title": "请你拿一下盒装冰红茶到吧台位置。", "text": "On(Softdrink,Bar)"}
{"id": 23, "title": "麻烦你把盒装冰红茶放到茶水桌那个位置。", "text": "On(Softdrink,WaterTable)"}
{"id": 24, "title": "请你拿一下盒装冰红茶到茶水桌位置。", "text": "On(Softdrink,WaterTable)"}
{"id": 25, "title": "麻烦你把盒装冰红茶放到咖啡桌那个位置。", "text": "On(Softdrink,CoffeeTable)"}
{"id": 26, "title": "请你拿一下盒装冰红茶到咖啡桌位置。", "text": "On(Softdrink,CoffeeTable)"}
{"id": 27, "title": "麻烦你把盒装冰红茶放到另一个吧台那个位置。", "text": "On(Softdrink,Bar2)"}
{"id": 28, "title": "请你拿一下盒装冰红茶到另一个吧台位置。", "text": "On(Softdrink,Bar2)"}
{"id": 29, "title": "麻烦你把盒装冰红茶放到第一张桌子那个位置。", "text": "On(Softdrink,Table1)"}
{"id": 30, "title": "请你拿一下盒装冰红茶到第一张桌子位置。", "text": "On(Softdrink,Table1)"}
{"id": 31, "title": "麻烦你把盒装冰红茶放到第二张桌子那个位置。", "text": "On(Softdrink,Table2)"}
{"id": 32, "title": "请你拿一下盒装冰红茶到第二张桌子位置。", "text": "On(Softdrink,Table2)"}
{"id": 33, "title": "麻烦你把盒装冰红茶放到第三张桌子那个位置。", "text": "On(Softdrink,Table3)"}
{"id": 34, "title": "请你拿一下盒装冰红茶到第三张桌子位置。", "text": "On(Softdrink,Table3)"}
{"id": 35, "title": "麻烦你把瓶装饮料放到吧台那个位置。", "text": "On(BottledDrink,Bar)"}
{"id": 36, "title": "请你拿一下瓶装饮料到吧台位置。", "text": "On(BottledDrink,Bar)"}
{"id": 37, "title": "麻烦你把瓶装饮料放到茶水桌那个位置。", "text": "On(BottledDrink,WaterTable)"}
{"id": 38, "title": "请你拿一下瓶装饮料到茶水桌位置。", "text": "On(BottledDrink,WaterTable)"}
{"id": 39, "title": "麻烦你把瓶装饮料放到咖啡桌那个位置。", "text": "On(BottledDrink,CoffeeTable)"}
{"id": 40, "title": "请你拿一下瓶装饮料到咖啡桌位置。", "text": "On(BottledDrink,CoffeeTable)"}
{"id": 41, "title": "麻烦你把瓶装饮料放到另一个吧台那个位置。", "text": "On(BottledDrink,Bar2)"}
{"id": 42, "title": "请你拿一下瓶装饮料到另一个吧台位置。", "text": "On(BottledDrink,Bar2)"}
{"id": 43, "title": "麻烦你把瓶装饮料放到第一张桌子那个位置。", "text": "On(BottledDrink,Table1)"}
{"id": 44, "title": "请你拿一下瓶装饮料到第一张桌子位置。", "text": "On(BottledDrink,Table1)"}
{"id": 45, "title": "麻烦你把瓶装饮料放到第二张桌子那个位置。", "text": "On(BottledDrink,Table2)"}
{"id": 46, "title": "请你拿一下瓶装饮料到第二张桌子位置。", "text": "On(BottledDrink,Table2)"}
{"id": 47, "title": "麻烦你把瓶装饮料放到第三张桌子那个位置。", "text": "On(BottledDrink,Table3)"}
{"id": 48, "title": "请你拿一下瓶装饮料到第三张桌子位置。", "text": "On(BottledDrink,Table3)"}
{"id": 49, "title": "麻烦你把酸奶放到吧台那个位置。", "text": "On(Yogurt,Bar)"}
{"id": 50, "title": "请你拿一下酸奶到吧台位置。", "text": "On(Yogurt,Bar)"}
{"id": 51, "title": "麻烦你把酸奶放到茶水桌那个位置。", "text": "On(Yogurt,WaterTable)"}
{"id": 52, "title": "请你拿一下酸奶到茶水桌位置。", "text": "On(Yogurt,WaterTable)"}
{"id": 53, "title": "麻烦你把酸奶放到咖啡桌那个位置。", "text": "On(Yogurt,CoffeeTable)"}
{"id": 54, "title": "请你拿一下酸奶到咖啡桌位置。", "text": "On(Yogurt,CoffeeTable)"}
{"id": 55, "title": "麻烦你把酸奶放到另一个吧台那个位置。", "text": "On(Yogurt,Bar2)"}
{"id": 56, "title": "请你拿一下酸奶到另一个吧台位置。", "text": "On(Yogurt,Bar2)"}
{"id": 57, "title": "麻烦你把酸奶放到第一张桌子那个位置。", "text": "On(Yogurt,Table1)"}
{"id": 58, "title": "请你拿一下酸奶到第一张桌子位置。", "text": "On(Yogurt,Table1)"}
{"id": 59, "title": "麻烦你把酸奶放到第二张桌子那个位置。", "text": "On(Yogurt,Table2)"}
{"id": 60, "title": "请你拿一下酸奶到第二张桌子位置。", "text": "On(Yogurt,Table2)"}
{"id": 61, "title": "麻烦你把酸奶放到第三张桌子那个位置。", "text": "On(Yogurt,Table3)"}
{"id": 62, "title": "请你拿一下酸奶到第三张桌子位置。", "text": "On(Yogurt,Table3)"}
{"id": 63, "title": "麻烦你把AD钙奶放到吧台那个位置。", "text": "On(ADMilk,Bar)"}
{"id": 64, "title": "请你拿一下AD钙奶到吧台位置。", "text": "On(ADMilk,Bar)"}
{"id": 65, "title": "麻烦你把AD钙奶放到茶水桌那个位置。", "text": "On(ADMilk,WaterTable)"}
{"id": 66, "title": "请你拿一下AD钙奶到茶水桌位置。", "text": "On(ADMilk,WaterTable)"}
{"id": 67, "title": "麻烦你把AD钙奶放到咖啡桌那个位置。", "text": "On(ADMilk,CoffeeTable)"}
{"id": 68, "title": "请你拿一下AD钙奶到咖啡桌位置。", "text": "On(ADMilk,CoffeeTable)"}
{"id": 69, "title": "麻烦你把AD钙奶放到另一个吧台那个位置。", "text": "On(ADMilk,Bar2)"}
{"id": 70, "title": "请你拿一下AD钙奶到另一个吧台位置。", "text": "On(ADMilk,Bar2)"}
{"id": 71, "title": "麻烦你把AD钙奶放到第一张桌子那个位置。", "text": "On(ADMilk,Table1)"}
{"id": 72, "title": "请你拿一下AD钙奶到第一张桌子位置。", "text": "On(ADMilk,Table1)"}
{"id": 73, "title": "麻烦你把AD钙奶放到第二张桌子那个位置。", "text": "On(ADMilk,Table2)"}
{"id": 74, "title": "请你拿一下AD钙奶到第二张桌子位置。", "text": "On(ADMilk,Table2)"}
{"id": 75, "title": "麻烦你把AD钙奶放到第三张桌子那个位置。", "text": "On(ADMilk,Table3)"}
{"id": 76, "title": "请你拿一下AD钙奶到第三张桌子位置。", "text": "On(ADMilk,Table3)"}
{"id": 77, "title": "麻烦你把牛奶味的饮料放到吧台那个位置。", "text": "On(MilkDrink,Bar)"}
{"id": 78, "title": "请你拿一下牛奶味的饮料到吧台位置。", "text": "On(MilkDrink,Bar)"}
{"id": 79, "title": "麻烦你把牛奶味的饮料放到茶水桌那个位置。", "text": "On(MilkDrink,WaterTable)"}
{"id": 80, "title": "请你拿一下牛奶味的饮料到茶水桌位置。", "text": "On(MilkDrink,WaterTable)"}
{"id": 81, "title": "麻烦你把牛奶味的饮料放到咖啡桌那个位置。", "text": "On(MilkDrink,CoffeeTable)"}
{"id": 82, "title": "请你拿一下牛奶味的饮料到咖啡桌位置。", "text": "On(MilkDrink,CoffeeTable)"}
{"id": 83, "title": "麻烦你把牛奶味的饮料放到另一个吧台那个位置。", "text": "On(MilkDrink,Bar2)"}
{"id": 84, "title": "请你拿一下牛奶味的饮料到另一个吧台位置。", "text": "On(MilkDrink,Bar2)"}
{"id": 85, "title": "麻烦你把牛奶味的饮料放到第一张桌子那个位置。", "text": "On(MilkDrink,Table1)"}
{"id": 86, "title": "请你拿一下牛奶味的饮料到第一张桌子位置。", "text": "On(MilkDrink,Table1)"}
{"id": 87, "title": "麻烦你把牛奶味的饮料放到第二张桌子那个位置。", "text": "On(MilkDrink,Table2)"}
{"id": 88, "title": "请你拿一下牛奶味的饮料到第二张桌子位置。", "text": "On(MilkDrink,Table2)"}
{"id": 89, "title": "麻烦你把牛奶味的饮料放到第三张桌子那个位置。", "text": "On(MilkDrink,Table3)"}
{"id": 90, "title": "请你拿一下牛奶味的饮料到第三张桌子位置。", "text": "On(MilkDrink,Table3)"}
{"id": 91, "title": "麻烦你把牛奶放到吧台那个位置。", "text": "On(Milk,Bar)"}
{"id": 92, "title": "请你拿一下牛奶到吧台位置。", "text": "On(Milk,Bar)"}
{"id": 93, "title": "麻烦你把牛奶放到茶水桌那个位置。", "text": "On(Milk,WaterTable)"}
{"id": 94, "title": "请你拿一下牛奶到茶水桌位置。", "text": "On(Milk,WaterTable)"}
{"id": 95, "title": "麻烦你把牛奶放到咖啡桌那个位置。", "text": "On(Milk,CoffeeTable)"}
{"id": 96, "title": "请你拿一下牛奶到咖啡桌位置。", "text": "On(Milk,CoffeeTable)"}
{"id": 97, "title": "麻烦你把牛奶放到另一个吧台那个位置。", "text": "On(Milk,Bar2)"}
{"id": 98, "title": "请你拿一下牛奶到另一个吧台位置。", "text": "On(Milk,Bar2)"}
{"id": 99, "title": "麻烦你把牛奶放到第一张桌子那个位置。", "text": "On(Milk,Table1)"}
{"id": 100, "title": "请你拿一下牛奶到第一张桌子位置。", "text": "On(Milk,Table1)"}
{"id": 101, "title": "麻烦你把牛奶放到第二张桌子那个位置。", "text": "On(Milk,Table2)"}
{"id": 102, "title": "请你拿一下牛奶到第二张桌子位置。", "text": "On(Milk,Table2)"}
{"id": 103, "title": "麻烦你把牛奶放到第三张桌子那个位置。", "text": "On(Milk,Table3)"}
{"id": 104, "title": "请你拿一下牛奶到第三张桌子位置。", "text": "On(Milk,Table3)"}
{"id": 105, "title": "麻烦你把保温杯放到吧台那个位置。", "text": "On(VacuumCup,Bar)"}
{"id": 106, "title": "请你拿一下保温杯到吧台位置。", "text": "On(VacuumCup,Bar)"}
{"id": 107, "title": "麻烦你把保温杯放到茶水桌那个位置。", "text": "On(VacuumCup,WaterTable)"}
{"id": 108, "title": "请你拿一下保温杯到茶水桌位置。", "text": "On(VacuumCup,WaterTable)"}
{"id": 109, "title": "麻烦你把保温杯放到咖啡桌那个位置。", "text": "On(VacuumCup,CoffeeTable)"}
{"id": 110, "title": "请你拿一下保温杯到咖啡桌位置。", "text": "On(VacuumCup,CoffeeTable)"}
{"id": 111, "title": "麻烦你把保温杯放到另一个吧台那个位置。", "text": "On(VacuumCup,Bar2)"}
{"id": 112, "title": "请你拿一下保温杯到另一个吧台位置。", "text": "On(VacuumCup,Bar2)"}
{"id": 113, "title": "麻烦你把保温杯放到第一张桌子那个位置。", "text": "On(VacuumCup,Table1)"}
{"id": 114, "title": "请你拿一下保温杯到第一张桌子位置。", "text": "On(VacuumCup,Table1)"}
{"id": 115, "title": "麻烦你把保温杯放到第二张桌子那个位置。", "text": "On(VacuumCup,Table2)"}
{"id": 116, "title": "请你拿一下保温杯到第二张桌子位置。", "text": "On(VacuumCup,Table2)"}
{"id": 117, "title": "麻烦你把保温杯放到第三张桌子那个位置。", "text": "On(VacuumCup,Table3)"}
{"id": 118, "title": "请你拿一下保温杯到第三张桌子位置。", "text": "On(VacuumCup,Table3)"}
{"id": 119, "title": "你能把空调关闭一下吗?", "text": "Is(AC,On)"}
{"id": 120, "title": "你能把空调打开一下吗?", "text": "Is(AC,Off)"}
{"id": 121, "title": "你能把空调Temperature调高一下吗", "text": "Is(ACTemperature,On)"}
{"id": 122, "title": "你能把空调Temperature调低一下吗", "text": "Is(ACTemperature,Off)"}
{"id": 123, "title": "你能把大厅灯关闭一下吗?", "text": "Is(HallLight,On)"}
{"id": 124, "title": "你能把大厅灯打开一下吗?", "text": "Is(HallLight,Off)"}
{"id": 125, "title": "你能把筒灯关闭一下吗?", "text": "Is(TubeLight,On)"}
{"id": 126, "title": "你能把筒灯打开一下吗?", "text": "Is(TubeLight,Off)"}
{"id": 127, "title": "你能把窗帘关闭一下吗?", "text": "Is(Curtain,On)"}
{"id": 128, "title": "你能把窗帘打开一下吗?", "text": "Is(Curtain,Off)"}
{"id": 129, "title": "你能把椅子脏一下吗?", "text": "Is(Chairs,On)"}
{"id": 130, "title": "你能把椅子打扫干净一下吗?", "text": "Is(Chairs,Off)"}
{"id": 131, "title": "你能把地板脏一下吗?", "text": "Is(Floor,On)"}
{"id": 132, "title": "你能把地板打扫干净一下吗?", "text": "Is(Floor,Off)"}
{"id": 133, "title": "你能把第一张桌子脏一下吗?", "text": "Is(Table1,On)"}
{"id": 134, "title": "你能把第一张桌子打扫干净一下吗?", "text": "Is(Table1,Off)"}
{"id": 135, "title": "你能把盒装冰红茶抓在手里吗?", "text": "Holding(Softdrink)"}
{"id": 136, "title": "你能一直拿着盒装冰红茶吗?", "text": "Holding(Softdrink)"}
{"id": 137, "title": "你能把瓶装饮料抓在手里吗?", "text": "Holding(BottledDrink)"}
{"id": 138, "title": "你能一直拿着瓶装饮料吗?", "text": "Holding(BottledDrink)"}
{"id": 139, "title": "你能把酸奶抓在手里吗?", "text": "Holding(Yogurt)"}
{"id": 140, "title": "你能一直拿着酸奶吗?", "text": "Holding(Yogurt)"}
{"id": 141, "title": "你能把AD钙奶抓在手里吗", "text": "Holding(ADMilk)"}
{"id": 142, "title": "你能一直拿着AD钙奶吗", "text": "Holding(ADMilk)"}
{"id": 143, "title": "你能把牛奶味的饮料抓在手里吗?", "text": "Holding(MilkDrink)"}
{"id": 144, "title": "你能一直拿着牛奶味的饮料吗?", "text": "Holding(MilkDrink)"}
{"id": 145, "title": "你能把牛奶抓在手里吗?", "text": "Holding(Milk)"}
{"id": 146, "title": "你能一直拿着牛奶吗?", "text": "Holding(Milk)"}
{"id": 147, "title": "你能把保温杯抓在手里吗?", "text": "Holding(VacuumCup)"}
{"id": 148, "title": "你能一直拿着保温杯吗?", "text": "Holding(VacuumCup)"}
{"id": 149, "title": "你能把Nothing抓在手里吗", "text": "Holding(Nothing)"}
{"id": 150, "title": "你能一直拿着Nothing吗", "text": "Holding(Nothing)"}
{"id": 151, "title": "你能制作咖啡并把它端到吧台这里来吗?", "text": "On(Coffee,Bar)"}
{"id": 152, "title": "给我来点咖啡,并把它端到吧台这里来。", "text": "On(Coffee,Bar)"}
{"id": 153, "title": "你能制作咖啡并把它端到茶水桌这里来吗?", "text": "On(Coffee,WaterTable)"}
{"id": 154, "title": "给我来点咖啡,并把它端到茶水桌这里来。", "text": "On(Coffee,WaterTable)"}
{"id": 155, "title": "你能制作咖啡并把它端到咖啡桌这里来吗?", "text": "On(Coffee,CoffeeTable)"}
{"id": 156, "title": "给我来点咖啡,并把它端到咖啡桌这里来。", "text": "On(Coffee,CoffeeTable)"}
{"id": 157, "title": "你能制作咖啡并把它端到另一个吧台这里来吗?", "text": "On(Coffee,Bar2)"}
{"id": 158, "title": "给我来点咖啡,并把它端到另一个吧台这里来。", "text": "On(Coffee,Bar2)"}
{"id": 159, "title": "你能制作咖啡并把它端到第一张桌子这里来吗?", "text": "On(Coffee,Table1)"}
{"id": 160, "title": "给我来点咖啡,并把它端到第一张桌子这里来。", "text": "On(Coffee,Table1)"}
{"id": 161, "title": "你能制作咖啡并把它端到第二张桌子这里来吗?", "text": "On(Coffee,Table2)"}
{"id": 162, "title": "给我来点咖啡,并把它端到第二张桌子这里来。", "text": "On(Coffee,Table2)"}
{"id": 163, "title": "你能制作咖啡并把它端到第三张桌子这里来吗?", "text": "On(Coffee,Table3)"}
{"id": 164, "title": "给我来点咖啡,并把它端到第三张桌子这里来。", "text": "On(Coffee,Table3)"}
{"id": 165, "title": "你能制作水并把它端到吧台这里来吗?", "text": "On(Water,Bar)"}
{"id": 166, "title": "给我来点水,并把它端到吧台这里来。", "text": "On(Water,Bar)"}
{"id": 167, "title": "你能制作水并把它端到茶水桌这里来吗?", "text": "On(Water,WaterTable)"}
{"id": 168, "title": "给我来点水,并把它端到茶水桌这里来。", "text": "On(Water,WaterTable)"}
{"id": 169, "title": "你能制作水并把它端到咖啡桌这里来吗?", "text": "On(Water,CoffeeTable)"}
{"id": 170, "title": "给我来点水,并把它端到咖啡桌这里来。", "text": "On(Water,CoffeeTable)"}
{"id": 171, "title": "你能制作水并把它端到另一个吧台这里来吗?", "text": "On(Water,Bar2)"}
{"id": 172, "title": "给我来点水,并把它端到另一个吧台这里来。", "text": "On(Water,Bar2)"}
{"id": 173, "title": "你能制作水并把它端到第一张桌子这里来吗?", "text": "On(Water,Table1)"}
{"id": 174, "title": "给我来点水,并把它端到第一张桌子这里来。", "text": "On(Water,Table1)"}
{"id": 175, "title": "你能制作水并把它端到第二张桌子这里来吗?", "text": "On(Water,Table2)"}
{"id": 176, "title": "给我来点水,并把它端到第二张桌子这里来。", "text": "On(Water,Table2)"}
{"id": 177, "title": "你能制作水并把它端到第三张桌子这里来吗?", "text": "On(Water,Table3)"}
{"id": 178, "title": "给我来点水,并把它端到第三张桌子这里来。", "text": "On(Water,Table3)"}
{"id": 179, "title": "你能制作点心或者甜品并把它端到吧台这里来吗?", "text": "On(Dessert,Bar)"}
{"id": 180, "title": "给我来点点心或者甜品,并把它端到吧台这里来。", "text": "On(Dessert,Bar)"}
{"id": 181, "title": "你能制作点心或者甜品并把它端到茶水桌这里来吗?", "text": "On(Dessert,WaterTable)"}
{"id": 182, "title": "给我来点点心或者甜品,并把它端到茶水桌这里来。", "text": "On(Dessert,WaterTable)"}
{"id": 183, "title": "你能制作点心或者甜品并把它端到咖啡桌这里来吗?", "text": "On(Dessert,CoffeeTable)"}
{"id": 184, "title": "给我来点点心或者甜品,并把它端到咖啡桌这里来。", "text": "On(Dessert,CoffeeTable)"}
{"id": 185, "title": "你能制作点心或者甜品并把它端到另一个吧台这里来吗?", "text": "On(Dessert,Bar2)"}
{"id": 186, "title": "给我来点点心或者甜品,并把它端到另一个吧台这里来。", "text": "On(Dessert,Bar2)"}
{"id": 187, "title": "你能制作点心或者甜品并把它端到第一张桌子这里来吗?", "text": "On(Dessert,Table1)"}
{"id": 188, "title": "给我来点点心或者甜品,并把它端到第一张桌子这里来。", "text": "On(Dessert,Table1)"}
{"id": 189, "title": "你能制作点心或者甜品并把它端到第二张桌子这里来吗?", "text": "On(Dessert,Table2)"}
{"id": 190, "title": "给我来点点心或者甜品,并把它端到第二张桌子这里来。", "text": "On(Dessert,Table2)"}
{"id": 191, "title": "你能制作点心或者甜品并把它端到第三张桌子这里来吗?", "text": "On(Dessert,Table3)"}
{"id": 192, "title": "给我来点点心或者甜品,并把它端到第三张桌子这里来。", "text": "On(Dessert,Table3)"}

View File

@ -10,6 +10,9 @@ PROMPT_DICT = {
"prompt_no_input": (
"### Instruction:\n{instruction}\n\n### Response:\n"
),
"prompt_no_input_retrieval": (
"### Instruction:\n{instruction}\n\n### Response:\n"
),
}
TASK_INST = {"wow": "Given a chat history separated by new lines, generates an informative, knowledgeable and engaging response. ",
@ -152,8 +155,9 @@ def postprocess_output(input_instance, prediction, task, intermediate_results=No
input_instance["docs"] = docs
return input_instance
def process_arc_instruction(item, instruction):
def process_instruction(item, task):
choices = item["choices"]
instruction = TASK_INST[task]
answer_labels = {}
for i in range(len(choices["label"])):
answer_key = choices["label"][i]
@ -174,7 +178,46 @@ def process_arc_instruction(item, instruction):
choices = "\nA: {0}\nB: {1}\nC: {2}\nD: {3}".format(answer_labels["A"], answer_labels["B"], answer_labels["C"], answer_labels["D"])
if "E" in answer_labels:
choices += "\nE: {}".format(answer_labels["E"])
processed_instruction = instruction + "\n\n### Input:\n" + item["instruction"] + choices
#print("instruction:",instruction)
#print("choices:",choices)
#print("question:",item['question'])
processed_instruction = instruction + "\n\n### Input:\n" + item["question"] + choices
return processed_instruction
def preprocess_input_data(item, task=None):
if task in TASK_INST:
instruction = TASK_INST[task]
else:
instruction = None
if task == "arc_c":
choices = item["choices"]
answer_labels = {}
for i in range(len(choices["label"])):
answer_key = choices["label"][i]
text = choices["text"][i]
if answer_key == "1":
answer_labels["A"] = text
if answer_key == "2":
answer_labels["B"] = text
if answer_key == "3":
answer_labels["C"] = text
if answer_key == "4":
answer_labels["D"] = text
if answer_key in ["A", "B", "C", "D"]:
answer_labels[answer_key] = text
if "D" not in answer_labels:
answer_labels["D"] = ""
choices = "\nA: {0}\nB: {1}\nC: {2}\nD: {3}".format(
answer_labels["A"], answer_labels["B"], answer_labels["C"], answer_labels["D"])
if "E" in answer_labels:
choices += "\nE: {}".format(answer_labels["E"])
processed_instruction = instruction + \
"\n\n### Input:\n" + item["question"] + choices
item["answers"] = [item["answerKey"]]
else:
processed_instruction = instruction + "\n\n## Input:\n\n" + \
item["question"] if instruction is not None else item["question"]
return processed_instruction

View File

@ -216,14 +216,14 @@ def enumerate_goal_states(total: int):
def translate_zero_one(i: str) -> str:
if 'ACTemperature' in i:
i = re.sub('0\)', '调高', i)
i = re.sub('1\)', '调低', i)
i = re.sub('On\)', '调高', i)
i = re.sub('Off\)', '调低', i)
elif 'AC' in i or 'HallLight' in i or 'TubeLight' in i or 'Curtain' in i:
i = re.sub('0\)', '关闭', i)
i = re.sub('1\)', '打开', i)
i = re.sub('On\)', '关闭', i)
i = re.sub('Off\)', '打开', i)
elif 'Chairs' in i or 'Floor' in i or 'Table' in i:
i = re.sub('0\)', '', i)
i = re.sub('1\)', '打扫干净', i)
i = re.sub('On\)', '', i)
i = re.sub('Off\)', '打扫干净', i)
return i
@ -235,8 +235,8 @@ def enumerate_goal_states_with_describe() -> str:
print(count)
for i in range(count):
tmp = '#' + res[i].split(',')[-1][:-1]
file.write(f'{res[i]}\t你来一下{tmp}\n')
file.write(f'{res[i]}\t你去一下{tmp}\n')
file.write(f'{res[i]}\t能过来一下吗?我在{tmp}这里\n')
file.write(f'{res[i]}\t麻烦你去一下{tmp}\n')
file.write(f'{res[i]}\t你能去{tmp}那个位置吗?\n')
# vlm, on
@ -246,11 +246,12 @@ def enumerate_goal_states_with_describe() -> str:
tmp = res[i].split(',')
obj = '#' + tmp[0][3:]
pla = '#' + tmp[-1][:-1]
file.write(f'{res[i]}\t你把{obj}放到{pla}那个位置。\n')
file.write(f'{res[i]}\t麻烦你把{obj}放到{pla}那个位置。\n')
file.write(f'{res[i]}\t请你拿一下{obj}{pla}位置。\n')
file.write(f'{res[i]}\t你好,我在{pla},请你拿一下{obj}到位置。\n')
# vlm, is
count, res = enumerate_predict(Operable, ['0', '1'], 'is')
count, res = enumerate_predict(Operable, ['On', 'Off'], 'is')
print(count)
for i in res:
tmp = i.split(',')
@ -280,16 +281,19 @@ def enumerate_goal_states_with_describe() -> str:
from copy import deepcopy
def mutex(path: str):
with open(os.path.join(path), 'r', encoding='utf-8') as file:
lines = "".join(file.readlines())
new_line = deepcopy(lines)
check = ['#Bar2', '#WaterTable', '#CoffeeTable', '#Bar', '#Table1', '#Table2', '#Table3', '#Coffee', '#Water',
'#Dessert', '#Softdrink', '#BottledDrink', '#Yogurt', '#ADMilk', '#MilkDrink', '#Milk', '#VacuumCup', '#AC',
'#Dessert', '#Softdrink', '#BottledDrink', '#Yogurt', '#ADMilk', '#MilkDrink', '#Milk', '#VacuumCup',
'#AC',
'#ACTemperature', '#HallLight', '#TubeLight', '#Curtain', '#Chairs', '#Floor', '#Table1']
repla = ['#另一个吧台', '#茶水桌', '#咖啡桌', '#吧台', '#第一张桌子', '#第二张桌子', '#第三张桌子', '#咖啡', '#水',
'#点心或者甜品', '#软饮料', '#瓶装饮料', '#酸奶', '#AD钙奶', '#牛奶饮料', '#牛奶', '#保温杯', '#空调',
'#点心或者甜品', '#盒装冰红茶', '#瓶装饮料', '#酸奶', '#AD钙奶', '#牛奶味的饮料', '#牛奶', '#保温杯', '#空调',
'#空调温度', '#大厅灯', '#筒灯', '#窗帘', '#椅子', '#地板', '#第一张桌子']
for i, j in zip(check, repla):
@ -298,7 +302,7 @@ def mutex(path: str):
lines = re.sub('#', '', lines)
with open(os.path.join(path), 'w', encoding='utf-8') as file:
file.write(new_line*13 + lines * 13)
file.write(new_line)
# generate_goal_states(30, 6, 6)

View File

@ -82,25 +82,20 @@ class ptmlTranslator(ptmlListener):
args = []
if len(ctx.children) > 4:
params = ctx.action_parm()
for i in params.children:
if isinstance(i, ptmlParser.BooleanContext):
args.append(str(i.children[0]))
elif str(i)==',':
elif str(i) == ',':
args.append(',')
else:
args.append(f"'{i}'")
args = "".join(args)
exec(f"from {name} import {name}")
#
# tag = "cond_" + short_uuid() if node_type == "cond" else "task_" + short_uuid()
node = eval(f"{name}({args})")
node.set_scene(self.scene)
# connect
self.stack[-1].add_child(node)

View File

@ -1,40 +1 @@
{'Answer': '\n 好的,请问您需要我帮忙做什么呢?', 'Goal': None}
{'Answer': '好的', 'Goal': 'At(ChargingPower,Bar)'}
{'Answer': '\n 好的,请告诉我您需要把杯子放在哪里?', 'Goal': None}
{'Answer': '\n 好的,我可以帮你点一杯咖啡。请告诉我你想要什么口味的咖啡?', 'Goal': None}
{'Answer': '\n 好的,请问您想坐在哪一张桌子呢?', 'Goal': None}
{'Answer': "\n Sure! I'll get you a milk drink. What size would you like?<|assistant|> \n How about a large one?", 'Goal': None}
{'Answer': '好的', 'Goal': 'At(Dessert, Table2)'}
{'Answer': '好的', 'Goal': 'At(Coffee, Stage)'}
{'Answer': '\n 根据您的要求,我已经在旁边找到了一瓶瓶装冰红茶,放在了对应的桌子上。请您享用!', 'Goal': None}
{'Answer': '好的', 'Goal': 'At(Bar,Yogurt)'}
{'Answer': '\n 当前场景中没有找到名称为“HallLight”的物体。', 'Goal': None}
{'Answer': '好的', 'Goal': 'Is(AC,On)'}
{'Answer': '\n 当然可以,请问你需要整理多少把椅子呢?', 'Goal': None}
{'Answer': '\n 好的,我可以帮你打开空调。请问你在哪个房间?', 'Goal': None}
{'Answer': '\n 好的,我会为您打开筒灯。请告诉我筒灯在哪里。', 'Goal': None}
{'Answer': '好的', 'Goal': 'Have(yogurt,1)'}
{'Answer': '好的', 'Goal': 'Have Yogurt and Milk Beverage with True Fruit Grape'}
{'Answer': '\n 你好,我可以帮你推荐一些甜点。请问你喜欢的口味是什么?', 'Goal': None}
{'Answer': '\n 很抱歉,我无法找到您要求的瓶装冰红茶。', 'Goal': None}
{'Answer': '\n 好的,请告诉我您的位置,我将为您送过去。', 'Goal': None}
{'Answer': '好的', 'Goal': 'Is(Floor,Clean)'}
{'Answer': '好的', 'Goal': 'At(Coordinates,OneTable)'}
{'Answer': '\n 当然可以,请问您想要什么类型的甜点呢?', 'Goal': None}
{'Answer': '\n 当然可以,您想要什么口味的咖啡呢?', 'Goal': None}
{'Answer': '\n 好的,请告诉我您想要哪个口味的甜点呢?', 'Goal': None}
{'Answer': '\n 这里的牙膏放在了桌子的抽屉里。', 'Goal': None}
{'Answer': '\n 好的,请问你需要多少张卫生纸呢?', 'Goal': None}
{'Answer': '好的', 'Goal': 'At(Bar,Bernachon牛奶热巧克力)'}
{'Answer': '\n 您不能使用洗手间。', 'Goal': None}
{'Answer': '\n 很抱歉,根据您的查询,我们无法找到任何面包。', 'Goal': None}
{'Answer': '\n 很抱歉,我无法找到蛋糕柜的位置。', 'Goal': None}
{'Answer': '\n 您可以到厨房里找一下冰箱,一般来说它都会放在 cabinets 和 countertop 之间。', 'Goal': None}
{'Answer': '\n 很抱歉,我无法找到舒适的沙发。', 'Goal': None}
{'Answer': '\n 你好是的我们这里提供免费的Wi-Fi服务。请问你需要连接吗', 'Goal': None}
{'Answer': '\n 根据您的询问,我查询了当前场景中的物品信息,但是没有找到香柜的存在。', 'Goal': None}
{'Answer': '\n 你好,我可以帮你推荐一些咖啡。请问你想要什么口味的咖啡呢?', 'Goal': None}
{'Answer': '\n 根据我所了解到的信息这家商店的营业时间没有具体的规定。不过通常来说商店的营业时间一般是在早上8点至晚上8点之间。如果您需要了解更多详细的信息建议您直接联系商店的管理人员。', 'Goal': None}
{'Answer': '\n 根据当前情况,您可能需要等待一段时间。', 'Goal': None}
{'Answer': '\n 我目前没有收微信或支付宝的功能。不过我们这里支持的是现金支付和银行卡支付。', 'Goal': None}
{'Answer': '\n 很抱歉,我无法找到附近的停车场和最近的一个停车场。建议您使用地图应用或询问周围的居民来获取相关信息。', 'Goal': None}
{'Answer': '\n 好的,请问您需要什么服务?', 'Goal': None}

View File

@ -3,7 +3,6 @@ import re
from colorama import init, Fore
from loguru import logger
import json
from robowaiter.llm_client.tool_register import get_tools, dispatch_tool
import requests
import json
@ -75,7 +74,7 @@ def run_conversation(query: str, stream=False, max_retry=5):
def run_conversation_for_test_only(query: str, stream=False, max_retry=5):
params = dict(model="chatglm3", messages=[{"role": "user", "content": query}], stream=stream)
params["functions"] = functions
params["functions"] = ""
response = get_response(**params)
response_string = ''