domain stringclasses 8
values | instance_id stringlengths 1 4 | prompt_id int64 0 9 | mistake_rate float64 0.2 0.2 | instruction stringlengths 1.24k 5.06k | input stringlengths 191 6.64k | output stringlengths 390 7.48k | plan_length int64 3 26 | raw_plan sequencelengths 3 26 | full_text_prompt stringlengths 1.86k 15.3k |
|---|---|---|---|---|---|---|---|---|---|
barman | 0 | 9 | 0.2 | I have to plan the actions for a robotic bartender to prepare cocktails. The bartender has two hands and works with various containers and ingredients to mix and serve drinks.
Here are the actions that can be performed:
Fill-shot with an ingredient from a dispenser.
Pour the content of a shaker into a shot.
Shake the ... | As initial conditions I have that, shot_2 is clean, level_1 is the next level after level_0, shaker_1's zero fill level is at level_0, shot_1 is clean, shaker_1 is clean, shot_3 is clean, left_hand is empty, dispenser_3 dispenses ingredient_3, shot_2 is on the table, shot_1 is on the table, shot_3 is on the table, shot... | My plan is as follows:
<PLAN>
<GOAL> My goal is to have that shot_2 contains cocktail_1, shot_1 contains cocktail_1. <COUNT> 14 </COUNT> grasp the shaker_1 using left_hand
<GOAL> My goal is to have that shot_2 contains cocktail_1, shot_1 contains cocktail_1. <COUNT> 13 </COUNT> grasp the shot_3 using right_hand
<GOA... | 15 | [
"(grasp left shaker1)",
"(grasp right shot3)",
"(leave left shaker1)",
"(fill-shot shot3 ingredient1 right left dispenser1)",
"(grasp left shaker1)",
"(pour-shot-to-clean-shaker shot3 ingredient1 shaker1 right l0 l1)",
"(leave left shaker1)",
"(clean-shot shot3 ingredient1 right left)",
"(fill-shot ... | I have to plan the actions for a robotic bartender to prepare cocktails. The bartender has two hands and works with various containers and ingredients to mix and serve drinks.
Here are the actions that can be performed:
Fill-shot with an ingredient from a dispenser.
Pour the content of a shaker into a shot.
Shake the ... |
barman | 0 | 0 | 0.2 | I have to plan the actions for a robotic bartender to prepare cocktails. The bartender has two hands and works with various containers and ingredients to mix and serve drinks.
Here are the actions that can be performed:
Pour the content of a shot into a used shaker that already contain some ingredient.
Clean a shot.
E... | As initial conditions I have that, shaker_1's zero fill level is at level_0, shot_2 is clean, shaker_1 is clean, shot_3 is clean, shot_3 is empty, shaker_1's fill level is at level_0, dispenser_2 dispenses ingredient_2, right_hand is empty, level_1 is the next level after level_0, shaker_1 is on the table, left_hand is... | My plan is as follows:
<PLAN>
<GOAL> My goal is to have that shot_2 contains cocktail_1, shot_1 contains cocktail_1. <COUNT> 14 </COUNT> grasp the shaker_1 using left_hand
<GOAL> My goal is to have that shot_2 contains cocktail_1, shot_1 contains cocktail_1. <COUNT> 13 </COUNT> grasp the shot_3 using right_hand
<GOA... | 15 | [
"(grasp left shaker1)",
"(grasp right shot3)",
"(leave left shaker1)",
"(fill-shot shot3 ingredient1 right left dispenser1)",
"(grasp left shaker1)",
"(pour-shot-to-clean-shaker shot3 ingredient1 shaker1 right l0 l1)",
"(leave left shaker1)",
"(clean-shot shot3 ingredient1 right left)",
"(fill-shot ... | I have to plan the actions for a robotic bartender to prepare cocktails. The bartender has two hands and works with various containers and ingredients to mix and serve drinks.
Here are the actions that can be performed:
Pour the content of a shot into a used shaker that already contain some ingredient.
Clean a shot.
E... |
barman | 0 | 1 | 0.2 | I have to plan the actions for a robotic bartender to prepare cocktails. The bartender has two hands and works with various containers and ingredients to mix and serve drinks.
Here are the actions that can be performed:
Pour the content of a shot into a used shaker that already contain some ingredient.
Empty a shot.
F... | As initial conditions I have that, shot_2 is on the table, shot_2 is clean, right_hand is empty, dispenser_3 dispenses ingredient_3, shot_1 is clean, shot_3 is empty, dispenser_2 dispenses ingredient_2, shaker_1's fill level is at level_0, shot_3 is clean, left_hand is empty, shaker_1's zero fill level is at level_0, s... | My plan is as follows:
<PLAN>
<GOAL> My goal is to have that shot_2 contains cocktail_1, shot_1 contains cocktail_1. <COUNT> 14 </COUNT> grasp the shaker_1 using left_hand
<GOAL> My goal is to have that shot_2 contains cocktail_1, shot_1 contains cocktail_1. <COUNT> 13 </COUNT> grasp the shot_3 using right_hand
<GOA... | 15 | [
"(grasp left shaker1)",
"(grasp right shot3)",
"(leave left shaker1)",
"(fill-shot shot3 ingredient1 right left dispenser1)",
"(grasp left shaker1)",
"(pour-shot-to-clean-shaker shot3 ingredient1 shaker1 right l0 l1)",
"(leave left shaker1)",
"(clean-shot shot3 ingredient1 right left)",
"(fill-shot ... | I have to plan the actions for a robotic bartender to prepare cocktails. The bartender has two hands and works with various containers and ingredients to mix and serve drinks.
Here are the actions that can be performed:
Pour the content of a shot into a used shaker that already contain some ingredient.
Empty a shot.
F... |
barman | 0 | 2 | 0.2 | I have to plan the actions for a robotic bartender to prepare cocktails. The bartender has two hands and works with various containers and ingredients to mix and serve drinks.
Here are the actions that can be performed:
Fill-shot with an ingredient from a dispenser.
Pour the content of a shot into a used shaker that a... | As initial conditions I have that, level_2 is the next level after level_1, shot_3 is empty, right_hand is empty, shot_3 is on the table, shaker_1 is empty, dispenser_2 dispenses ingredient_2, shaker_1's fill level is at level_0, shot_1 is empty, shot_2 is clean, cocktail_1 has ingredient_2 as its second ingredient, sh... | My plan is as follows:
<PLAN>
<GOAL> My goal is to have that shot_1 contains cocktail_1, shot_2 contains cocktail_1. <COUNT> 14 </COUNT> grasp the shaker_1 using left_hand
<GOAL> My goal is to have that shot_1 contains cocktail_1, shot_2 contains cocktail_1. <COUNT> 13 </COUNT> grasp the shot_3 using right_hand
<GOA... | 15 | [
"(grasp left shaker1)",
"(grasp right shot3)",
"(leave left shaker1)",
"(fill-shot shot3 ingredient1 right left dispenser1)",
"(grasp left shaker1)",
"(pour-shot-to-clean-shaker shot3 ingredient1 shaker1 right l0 l1)",
"(leave left shaker1)",
"(clean-shot shot3 ingredient1 right left)",
"(fill-shot ... | I have to plan the actions for a robotic bartender to prepare cocktails. The bartender has two hands and works with various containers and ingredients to mix and serve drinks.
Here are the actions that can be performed:
Fill-shot with an ingredient from a dispenser.
Pour the content of a shot into a used shaker that a... |
barman | 0 | 3 | 0.2 | I have to plan the actions for a robotic bartender to prepare cocktails. The bartender has two hands and works with various containers and ingredients to mix and serve drinks.
Here are the actions that can be performed:
Clean a shaker.
Empty a shaker.
Leave a container on the table.
Pour the content of a shot into a c... | As initial conditions I have that, shaker_1 is on the table, shot_3 is clean, right_hand is empty, left_hand is empty, shot_3 is empty, shot_1 is empty, cocktail_1 has ingredient_1 as its first ingredient, shaker_1's fill level is at level_0, shaker_1 is empty, shot_2 is on the table, shot_1 is on the table, shaker_1 i... | My plan is as follows:
<PLAN>
<GOAL> My goal is to have that shot_1 contains cocktail_1, shot_2 contains cocktail_1. <COUNT> 14 </COUNT> grasp the shaker_1 using left_hand
<GOAL> My goal is to have that shot_1 contains cocktail_1, shot_2 contains cocktail_1. <COUNT> 13 </COUNT> grasp the shot_3 using right_hand
<GOA... | 15 | [
"(grasp left shaker1)",
"(grasp right shot3)",
"(leave left shaker1)",
"(fill-shot shot3 ingredient1 right left dispenser1)",
"(grasp left shaker1)",
"(pour-shot-to-clean-shaker shot3 ingredient1 shaker1 right l0 l1)",
"(leave left shaker1)",
"(clean-shot shot3 ingredient1 right left)",
"(fill-shot ... | I have to plan the actions for a robotic bartender to prepare cocktails. The bartender has two hands and works with various containers and ingredients to mix and serve drinks.
Here are the actions that can be performed:
Clean a shaker.
Empty a shaker.
Leave a container on the table.
Pour the content of a shot into a c... |
barman | 0 | 4 | 0.2 | I have to plan the actions for a robotic bartender to prepare cocktails. The bartender has two hands and works with various containers and ingredients to mix and serve drinks.
Here are the actions that can be performed:
Clean a shaker.
Clean a shot.
Empty a shaker.
Leave a container on the table.
Grasp a container (sh... | As initial conditions I have that, shot_3 is on the table, dispenser_3 dispenses ingredient_3, cocktail_1 has ingredient_2 as its second ingredient, shot_2 is on the table, shaker_1 is clean, shot_2 is empty, shot_3 is empty, shaker_1 is on the table, shot_3 is clean, dispenser_2 dispenses ingredient_2, shot_1 is empty... | My plan is as follows:
<PLAN>
<GOAL> My goal is to have that shot_1 contains cocktail_1, shot_2 contains cocktail_1. <COUNT> 14 </COUNT> grasp the shaker_1 using left_hand
<GOAL> My goal is to have that shot_1 contains cocktail_1, shot_2 contains cocktail_1. <COUNT> 13 </COUNT> grasp the shot_3 using right_hand
<GOA... | 15 | [
"(grasp left shaker1)",
"(grasp right shot3)",
"(leave left shaker1)",
"(fill-shot shot3 ingredient1 right left dispenser1)",
"(grasp left shaker1)",
"(pour-shot-to-clean-shaker shot3 ingredient1 shaker1 right l0 l1)",
"(leave left shaker1)",
"(clean-shot shot3 ingredient1 right left)",
"(fill-shot ... | I have to plan the actions for a robotic bartender to prepare cocktails. The bartender has two hands and works with various containers and ingredients to mix and serve drinks.
Here are the actions that can be performed:
Clean a shaker.
Clean a shot.
Empty a shaker.
Leave a container on the table.
Grasp a container (sh... |
barman | 0 | 5 | 0.2 | I have to plan the actions for a robotic bartender to prepare cocktails. The bartender has two hands and works with various containers and ingredients to mix and serve drinks.
Here are the actions that can be performed:
Shake the shaker to mix the ingredients.
Empty a shot.
Pour the content of a shot into a clean shak... | As initial conditions I have that, shaker_1's fill level is at level_0, shot_2 is on the table, shot_2 is clean, shot_3 is empty, dispenser_3 dispenses ingredient_3, dispenser_1 dispenses ingredient_1, shaker_1's zero fill level is at level_0, right_hand is empty, dispenser_2 dispenses ingredient_2, shot_3 is on the ta... | My plan is as follows:
<PLAN>
<GOAL> My goal is to have that shot_1 contains cocktail_1, shot_2 contains cocktail_1. <COUNT> 14 </COUNT> grasp the shaker_1 using left_hand
<GOAL> My goal is to have that shot_1 contains cocktail_1, shot_2 contains cocktail_1. <COUNT> 13 </COUNT> grasp the shot_3 using right_hand
<GOA... | 15 | [
"(grasp left shaker1)",
"(grasp right shot3)",
"(leave left shaker1)",
"(fill-shot shot3 ingredient1 right left dispenser1)",
"(grasp left shaker1)",
"(pour-shot-to-clean-shaker shot3 ingredient1 shaker1 right l0 l1)",
"(leave left shaker1)",
"(clean-shot shot3 ingredient1 right left)",
"(fill-shot ... | I have to plan the actions for a robotic bartender to prepare cocktails. The bartender has two hands and works with various containers and ingredients to mix and serve drinks.
Here are the actions that can be performed:
Shake the shaker to mix the ingredients.
Empty a shot.
Pour the content of a shot into a clean shak... |
barman | 0 | 6 | 0.2 | I have to plan the actions for a robotic bartender to prepare cocktails. The bartender has two hands and works with various containers and ingredients to mix and serve drinks.
Here are the actions that can be performed:
Shake the shaker to mix the ingredients.
Clean a shot.
Empty a shaker.
Pour the content of a shaker... | As initial conditions I have that, level_1 is the next level after level_0, shot_2 is on the table, shot_1 is clean, cocktail_1 has ingredient_2 as its second ingredient, shot_3 is clean, shot_2 is clean, shot_3 is on the table, shaker_1's zero fill level is at level_0, dispenser_1 dispenses ingredient_1, right_hand is... | My plan is as follows:
<PLAN>
<GOAL> My goal is to have that shot_2 contains cocktail_1, shot_1 contains cocktail_1. <COUNT> 14 </COUNT> grasp the shaker_1 using left_hand
<GOAL> My goal is to have that shot_2 contains cocktail_1, shot_1 contains cocktail_1. <COUNT> 13 </COUNT> grasp the shot_3 using right_hand
<GOA... | 15 | [
"(grasp left shaker1)",
"(grasp right shot3)",
"(leave left shaker1)",
"(fill-shot shot3 ingredient1 right left dispenser1)",
"(grasp left shaker1)",
"(pour-shot-to-clean-shaker shot3 ingredient1 shaker1 right l0 l1)",
"(leave left shaker1)",
"(clean-shot shot3 ingredient1 right left)",
"(fill-shot ... | I have to plan the actions for a robotic bartender to prepare cocktails. The bartender has two hands and works with various containers and ingredients to mix and serve drinks.
Here are the actions that can be performed:
Shake the shaker to mix the ingredients.
Clean a shot.
Empty a shaker.
Pour the content of a shaker... |
barman | 0 | 7 | 0.2 | I have to plan the actions for a robotic bartender to prepare cocktails. The bartender has two hands and works with various containers and ingredients to mix and serve drinks.
Here are the actions that can be performed:
Pour the content of a shot into a clean shaker.
Refill-shot with the same ingredient it contained b... | As initial conditions I have that, shot_2 is on the table, right_hand is empty, shot_2 is empty, level_1 is the next level after level_0, cocktail_1 has ingredient_2 as its second ingredient, shaker_1 is empty, shot_2 is clean, shot_1 is empty, left_hand is empty, shot_1 is on the table, cocktail_1 has ingredient_1 as ... | My plan is as follows:
<PLAN>
<GOAL> My goal is to have that shot_1 contains cocktail_1, shot_2 contains cocktail_1. <COUNT> 14 </COUNT> grasp the shaker_1 using left_hand
<GOAL> My goal is to have that shot_1 contains cocktail_1, shot_2 contains cocktail_1. <COUNT> 13 </COUNT> grasp the shot_3 using right_hand
<GOA... | 15 | [
"(grasp left shaker1)",
"(grasp right shot3)",
"(leave left shaker1)",
"(fill-shot shot3 ingredient1 right left dispenser1)",
"(grasp left shaker1)",
"(pour-shot-to-clean-shaker shot3 ingredient1 shaker1 right l0 l1)",
"(leave left shaker1)",
"(clean-shot shot3 ingredient1 right left)",
"(fill-shot ... | I have to plan the actions for a robotic bartender to prepare cocktails. The bartender has two hands and works with various containers and ingredients to mix and serve drinks.
Here are the actions that can be performed:
Pour the content of a shot into a clean shaker.
Refill-shot with the same ingredient it contained b... |
barman | 0 | 8 | 0.2 | I have to plan the actions for a robotic bartender to prepare cocktails. The bartender has two hands and works with various containers and ingredients to mix and serve drinks.
Here are the actions that can be performed:
Clean a shot.
Pour the content of a shot into a used shaker that already contain some ingredient.
R... | As initial conditions I have that, level_2 is the next level after level_1, shaker_1 is clean, shot_3 is clean, shot_2 is on the table, shaker_1 is empty, right_hand is empty, cocktail_1 has ingredient_2 as its second ingredient, shot_3 is on the table, shot_2 is clean, shot_3 is empty, shot_1 is clean, shot_2 is empty... | My plan is as follows:
<PLAN>
<GOAL> My goal is to have that shot_2 contains cocktail_1, shot_1 contains cocktail_1. <COUNT> 14 </COUNT> grasp the shaker_1 using left_hand
<GOAL> My goal is to have that shot_2 contains cocktail_1, shot_1 contains cocktail_1. <COUNT> 13 </COUNT> grasp the shot_3 using right_hand
<GOA... | 15 | [
"(grasp left shaker1)",
"(grasp right shot3)",
"(leave left shaker1)",
"(fill-shot shot3 ingredient1 right left dispenser1)",
"(grasp left shaker1)",
"(pour-shot-to-clean-shaker shot3 ingredient1 shaker1 right l0 l1)",
"(leave left shaker1)",
"(clean-shot shot3 ingredient1 right left)",
"(fill-shot ... | I have to plan the actions for a robotic bartender to prepare cocktails. The bartender has two hands and works with various containers and ingredients to mix and serve drinks.
Here are the actions that can be performed:
Clean a shot.
Pour the content of a shot into a used shaker that already contain some ingredient.
R... |
barman | 40 | 0 | 0.2 | I have to plan the actions for a robotic bartender to prepare cocktails. The bartender has two hands and works with various containers and ingredients to mix and serve drinks.
Here are the actions that can be performed:
Grasp a container (shot or shaker) from the table.
Empty a shaker.
Shake the shaker to mix the ingr... | As initial conditions I have that, cocktail_1 has ingredient_3 as its second ingredient, dispenser_2 dispenses ingredient_2, dispenser_4 dispenses ingredient_4, shot_1 is clean, shaker_1 is clean, level_2 is the next level after level_1, left_hand is empty, dispenser_1 dispenses ingredient_1, shot_1 is on the table, sh... | My plan is as follows:
<PLAN>
<GOAL> My goal is to have that shot_2 contains ingredient_3, shot_1 contains cocktail_1. <COUNT> 15 </COUNT> grasp the shaker_1 using left_hand
<GOAL> My goal is to have that shot_2 contains ingredient_3, shot_1 contains cocktail_1. <COUNT> 14 </COUNT> grasp the shot_2 using right_hand
... | 16 | [
"(grasp left shaker1)",
"(grasp right shot2)",
"(leave left shaker1)",
"(fill-shot shot2 ingredient3 right left dispenser3)",
"(pour-shot-to-clean-shaker shot2 ingredient3 shaker1 right l0 l1)",
"(clean-shot shot2 ingredient3 right left)",
"(fill-shot shot2 ingredient1 right left dispenser1)",
"(grasp... | I have to plan the actions for a robotic bartender to prepare cocktails. The bartender has two hands and works with various containers and ingredients to mix and serve drinks.
Here are the actions that can be performed:
Grasp a container (shot or shaker) from the table.
Empty a shaker.
Shake the shaker to mix the ingr... |
End of preview. Expand in Data Studio
This is the training dataset for the ICAPS 2025 paper "Chasing Progress, Not Perfection: Revisiting Strategies for End-to-End LLM Plan Generation".
from pathlib import Path
import os
import jsonlines
from copy import deepcopy
from datasets import load_dataset
from icecream import ic
import enum
from enum import IntEnum
from enum import auto
class CONFIG_TYPES(enum.Enum):
# "type_id": ['t0', 'accu-t1', 'accu-t2', 'accu-t3', 'accu-t4', 'accu-t4', 'accu-t1+t4', 'accu-t2+t4'] # t0 is the raw prompt, t1 is the prompt with shuffled information (data augmentation), t2 is the lite CoT in [PLAN] section, t3 is the dense CoT information in [PLAN] section, t4 contains the "scratchpad" states.
t0 = "raw prompt (t0)"
accu_t1 = "t0 + shuffled content information (t1)"
accu_t2 = "t0 + t1 + lite CoT in [PLAN] section (t2)"
accu_t3 = "t0 + t1 + t2 + dense CoT information in [PLAN] section (t3)"
accu_t4 = "t0 + t1 + t2 + t3 + error-correction scratchpad (t4)"
accu_t1_t4 = "t0 + shuffled domain information (t1) + error-correction scratchpad (t4)"
accu_t2_t4 = "t0 + t1 + lite CoT in [PLAN] section (t2) + error-correction scratchpad (t4)"
accu_t1_t3 = "t0 + shuffled domain information (t1) + dense CoT information in [PLAN] section (t3)"
accu_t1_t3_t4 = "t0 + shuffled domain information (t1) + dense CoT information in [PLAN] section (t3) + error-correction scratchpad (t4)"
PROMPT_NUM_DICT = {
CONFIG_TYPES.t0: 1,
CONFIG_TYPES.accu_t1: 10,
CONFIG_TYPES.accu_t2: 10,
CONFIG_TYPES.accu_t3: 10,
CONFIG_TYPES.accu_t4: 30, # 10 * 3
CONFIG_TYPES.accu_t1_t4: 30, # 10 * 3
CONFIG_TYPES.accu_t2_t4: 30, # 10 * 3
CONFIG_TYPES.accu_t1_t3: 10, # 10
CONFIG_TYPES.accu_t1_t3_t4: 30, # 10 * 3
}
class SPLIT_NAMES(enum.Enum):
train = "training set"
test_same_domain = "test set with the same domain"
test_unseen_domain = "test set with unseen domain"
test_longer_horizon = "test set with longer horizon"
test_mystery_domain = "test set with mystery domain"
SUBDIRS_NAME_DICT = { # * the subdirs name in the raw dataset, use it to access to instance pddl files
# "zraw_data/instances/{domain_name}/{subdir_name}/instance-{instance_id}.pddl"
SPLIT_NAMES.train.name: "generated_basic",
SPLIT_NAMES.test_longer_horizon.name: "generated_basic_longer_plan_len",
SPLIT_NAMES.test_same_domain.name: "generated_basic",
SPLIT_NAMES.test_mystery_domain.name: "generated_basic",
SPLIT_NAMES.test_unseen_domain.name: "generated_basic",
}
@enum.unique
class PLANNING_DOMAIN(enum.Enum):
"""
PLANNING_DOMAIN is an enumeration class that represents different planning domains.
"""
barman = "barman"
blocksworld = "blocksworld"
childsnack = "childsnack"
depots = "depots"
driverlog = "driverlog"
grippers = "grippers"
logistics = "logistics"
satellite = "satellite"
mystery_blocksworld = "mystery_blocksworld"
obfuscated_deceptive_logistics = "obfuscated_deceptive_logistics"
hanoi = "hanoi"
storage = "storage"
def get_splits(self):
"""
Returns the splits associated with this domain.
"""
splits_mapping = {
"barman": [SPLIT_NAMES.train, SPLIT_NAMES.test_same_domain, SPLIT_NAMES.test_longer_horizon],
"blocksworld": [SPLIT_NAMES.train, SPLIT_NAMES.test_same_domain, SPLIT_NAMES.test_longer_horizon],
"childsnack": [SPLIT_NAMES.train, SPLIT_NAMES.test_same_domain, SPLIT_NAMES.test_longer_horizon],
"depots": [SPLIT_NAMES.train, SPLIT_NAMES.test_same_domain, SPLIT_NAMES.test_longer_horizon],
"driverlog": [SPLIT_NAMES.train, SPLIT_NAMES.test_same_domain, SPLIT_NAMES.test_longer_horizon],
"grippers": [SPLIT_NAMES.train, SPLIT_NAMES.test_same_domain, SPLIT_NAMES.test_longer_horizon],
"logistics": [SPLIT_NAMES.train, SPLIT_NAMES.test_same_domain, SPLIT_NAMES.test_longer_horizon],
"satellite": [SPLIT_NAMES.train, SPLIT_NAMES.test_same_domain, SPLIT_NAMES.test_longer_horizon],
"mystery_blocksworld": [SPLIT_NAMES.test_mystery_domain],
"obfuscated_deceptive_logistics": [SPLIT_NAMES.test_mystery_domain],
"hanoi": [SPLIT_NAMES.test_unseen_domain],
"storage": [SPLIT_NAMES.test_unseen_domain]
}
return splits_mapping[self.value]
class FEATURE_CLS(enum.Enum):
domain = auto()
instance_id = auto()
prompt_id = auto()
mistake_rate = auto()
domain_text = auto()
problem_init_text = auto()
problem_goal_text = auto()
plan_text = auto()
plan_length = auto()
raw_plan = auto()
full_text_prompt = auto() # domain_text + problem_init_text + problem_goal_text + plan_text # TODO check in kedro pipeline
def create_folder_structure(mode="default"):
# create folder for each config, and for each config, create folders for each split
for config_name in CONFIG_TYPES:
config_name = config_name.name
for split_name in SPLIT_NAMES:
# # ! debug
# if split_name == SPLIT_NAMES.train:
# continue
split_name = split_name.name
folder = Path(os.path.join(
os.path.dirname(__file__), config_name, split_name
))
folder.mkdir(parents=True, exist_ok=True)
if mode == "default":
pass
elif mode == "debug":
# we will add a test jsonl file in each folder
debug_dict = {
"domain": "blocksworld",
"task": "task1",
"plan": ["action1", "action2"],
}
output_lst = []
for i in range(2):
temp = deepcopy(debug_dict)
temp.update({'id': i})
output_lst.append(temp)
with jsonlines.open(os.path.join(folder, "test.jsonl"), "w") as writer:
writer.write_all(output_lst)
elif mode == "clean":
# we will delete test jsonl file in each folder
for file in folder.glob("*.jsonl"):
file.unlink()
folder.rmdir()
def test_huggingface_dataset(config_str):
dataset_dir = os.path.dirname(__file__)
ic(dataset_dir)
dataset = load_dataset(dataset_dir, config_str)
return dataset
if __name__ == '__main__':
mode = "clean"
create_folder_structure(mode=mode)
mode = "default"
create_folder_structure(mode=mode)
if mode == "debug":
dataset = test_huggingface_dataset(CONFIG_TYPES.t0.name)
- Downloads last month
- 276