Dataset Viewer
Auto-converted to Parquet Duplicate
domain
stringclasses
8 values
instance_id
stringlengths
1
4
prompt_id
int64
0
0
mistake_rate
float64
0.2
0.2
instruction
stringclasses
8 values
input
stringlengths
191
6.64k
output
stringlengths
164
1.27k
plan_length
int64
3
26
raw_plan
sequencelengths
3
26
full_text_prompt
stringlengths
1.64k
10.2k
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: Grasp a container (shot or shaker) from the table. Leave a container on the table. Fill-shot with an...
As initial conditions I have that, shaker_1 is clean, shot_1 is clean, shot_2 is clean, shot_3 is clean, cocktail_1 has ingredient_1 as its first ingredient, cocktail_1 has ingredient_2 as its second ingredient, dispenser_1 dispenses ingredient_1, dispenser_2 dispenses ingredient_2, dispenser_3 dispenses ingredient_3, ...
My plan is as follows: <PLAN> grasp the shaker_1 using left_hand grasp the shot_3 using right_hand leave the shaker_1 using left_hand fill the shot_3 on right_hand with ingredient_1 using dispenser_1 when left_hand is empty grasp the shaker_1 using left_hand pour from shot_3 containing ingredient_1 to clean shaker_1 us...
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: Grasp a container (shot or shaker) from the table. Leave a container on the table. Fill-shot with an...
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. Leave a container on the table. Fill-shot with an...
As initial conditions I have that, shaker_1 is clean, shot_1 is clean, shot_2 is clean, shot_3 is clean, cocktail_1 has ingredient_1 as its first ingredient, cocktail_1 has ingredient_3 as its second ingredient, dispenser_1 dispenses ingredient_1, dispenser_2 dispenses ingredient_2, dispenser_3 dispenses ingredient_3, ...
My plan is as follows: <PLAN> grasp the shaker_1 using left_hand grasp the shot_2 using right_hand leave the shaker_1 using left_hand fill the shot_2 on right_hand with ingredient_3 using dispenser_3 when left_hand is empty pour from shot_2 containing ingredient_3 to clean shaker_1 using right_hand from level_0 to leve...
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. Leave a container on the table. Fill-shot with an...
barman
80
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. Leave a container on the table. Fill-shot with an...
As initial conditions I have that, shaker_432 is clean, shot_206 is clean, shot_56 is clean, cocktail_1 has ingredient_242 as its first ingredient, cocktail_1 has ingredient_16 as its second ingredient, dispenser_300 dispenses ingredient_16, dispenser_316 dispenses ingredient_242, dispenser_481 dispenses ingredient_409...
My plan is as follows: <PLAN> grasp the shot_206 using left_hand fill the shot_206 on left_hand with ingredient_16 using dispenser_300 when right_hand is empty pour from shot_206 containing ingredient_16 to clean shaker_432 using left_hand from level_0 to level_1 clean the shot_206 on left_hand used for ingredient_16 w...
10
[ "(grasp left shot206)", "(fill-shot shot206 ingredient16 left right dispenser300)", "(pour-shot-to-clean-shaker shot206 ingredient16 shaker432 left l0 l1)", "(clean-shot shot206 ingredient16 left right)", "(fill-shot shot206 ingredient242 left right dispenser316)", "(pour-shot-to-used-shaker shot206 ingre...
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. Leave a container on the table. Fill-shot with an...
barman
120
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. Leave a container on the table. Fill-shot with an...
As initial conditions I have that, shaker_301 is clean, shot_144 is clean, shot_310 is clean, cocktail_1 has ingredient_217 as its first ingredient, cocktail_1 has ingredient_74 as its second ingredient, dispenser_359 dispenses ingredient_217, dispenser_49 dispenses ingredient_74, shaker_301 is empty, shot_144 is empty...
My plan is as follows: <PLAN> grasp the shot_144 using left_hand fill the shot_144 on left_hand with ingredient_217 using dispenser_359 when right_hand is empty pour from shot_144 containing ingredient_217 to clean shaker_301 using left_hand from level_0 to level_1 clean the shot_144 on left_hand used for ingredient_21...
10
[ "(grasp left shot144)", "(fill-shot shot144 ingredient217 left right dispenser359)", "(pour-shot-to-clean-shaker shot144 ingredient217 shaker301 left l0 l1)", "(clean-shot shot144 ingredient217 left right)", "(fill-shot shot144 ingredient74 left right dispenser49)", "(pour-shot-to-used-shaker shot144 ingr...
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. Leave a container on the table. Fill-shot with an...
barman
160
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. Leave a container on the table. Fill-shot with an...
As initial conditions I have that, shaker_208 is clean, shot_354 is clean, shot_467 is clean, cocktail_1 has ingredient_242 as its first ingredient, cocktail_1 has ingredient_297 as its second ingredient, dispenser_148 dispenses ingredient_297, dispenser_27 dispenses ingredient_52, dispenser_378 dispenses ingredient_24...
My plan is as follows: <PLAN> grasp the shaker_208 using left_hand grasp the shot_467 using right_hand leave the shaker_208 using left_hand fill the shot_467 on right_hand with ingredient_242 using dispenser_378 when left_hand is empty grasp the shaker_208 using left_hand pour from shot_467 containing ingredient_242 to...
14
[ "(grasp left shaker208)", "(grasp right shot467)", "(leave left shaker208)", "(fill-shot shot467 ingredient242 right left dispenser378)", "(grasp left shaker208)", "(pour-shot-to-clean-shaker shot467 ingredient242 shaker208 right l0 l1)", "(leave left shaker208)", "(clean-shot shot467 ingredient242 ri...
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. Leave a container on the table. Fill-shot with an...
barman
200
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. Leave a container on the table. Fill-shot with an...
As initial conditions I have that, shaker_421 is clean, shot_448 is clean, cocktail_1 has ingredient_175 as its first ingredient, cocktail_1 has ingredient_55 as its second ingredient, dispenser_128 dispenses ingredient_55, dispenser_310 dispenses ingredient_175, dispenser_75 dispenses ingredient_256, shaker_421 is emp...
My plan is as follows: <PLAN> grasp the shaker_421 using left_hand grasp the shot_448 using right_hand leave the shaker_421 using left_hand fill the shot_448 on right_hand with ingredient_175 using dispenser_310 when left_hand is empty pour from shot_448 containing ingredient_175 to clean shaker_421 using right_hand fr...
13
[ "(grasp left shaker421)", "(grasp right shot448)", "(leave left shaker421)", "(fill-shot shot448 ingredient175 right left dispenser310)", "(pour-shot-to-clean-shaker shot448 ingredient175 shaker421 right l0 l1)", "(clean-shot shot448 ingredient175 right left)", "(fill-shot shot448 ingredient55 right lef...
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. Leave a container on the table. Fill-shot with an...
barman
240
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. Leave a container on the table. Fill-shot with an...
As initial conditions I have that, shaker_496 is clean, shot_387 is clean, cocktail_1 has ingredient_383 as its first ingredient, cocktail_1 has ingredient_101 as its second ingredient, dispenser_200 dispenses ingredient_101, dispenser_389 dispenses ingredient_383, shaker_496 is empty, shot_387 is empty, left_hand is e...
My plan is as follows: <PLAN> grasp the shaker_496 using left_hand grasp the shot_387 using right_hand leave the shaker_496 using left_hand fill the shot_387 on right_hand with ingredient_101 using dispenser_200 when left_hand is empty pour from shot_387 containing ingredient_101 to clean shaker_496 using right_hand fr...
13
[ "(grasp left shaker496)", "(grasp right shot387)", "(leave left shaker496)", "(fill-shot shot387 ingredient101 right left dispenser200)", "(pour-shot-to-clean-shaker shot387 ingredient101 shaker496 right l0 l1)", "(clean-shot shot387 ingredient101 right left)", "(fill-shot shot387 ingredient383 right le...
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. Leave a container on the table. Fill-shot with an...
barman
280
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. Leave a container on the table. Fill-shot with an...
As initial conditions I have that, shaker_356 is clean, shot_128 is clean, shot_389 is clean, cocktail_1 has ingredient_11 as its first ingredient, cocktail_1 has ingredient_122 as its second ingredient, dispenser_213 dispenses ingredient_122, dispenser_362 dispenses ingredient_11, dispenser_89 dispenses ingredient_81,...
My plan is as follows: <PLAN> grasp the shot_128 using left_hand fill the shot_128 on left_hand with ingredient_11 using dispenser_362 when right_hand is empty pour from shot_128 containing ingredient_11 to clean shaker_356 using left_hand from level_0 to level_1 clean the shot_128 on left_hand used for ingredient_11 w...
10
[ "(grasp left shot128)", "(fill-shot shot128 ingredient11 left right dispenser362)", "(pour-shot-to-clean-shaker shot128 ingredient11 shaker356 left l0 l1)", "(clean-shot shot128 ingredient11 left right)", "(fill-shot shot128 ingredient122 left right dispenser213)", "(pour-shot-to-used-shaker shot128 ingre...
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. Leave a container on the table. Fill-shot with an...
barman
320
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. Leave a container on the table. Fill-shot with an...
As initial conditions I have that, shaker_23 is clean, shot_295 is clean, cocktail_1 has ingredient_163 as its first ingredient, cocktail_1 has ingredient_383 as its second ingredient, dispenser_114 dispenses ingredient_163, dispenser_213 dispenses ingredient_383, shaker_23 is empty, shot_295 is empty, left_hand is emp...
My plan is as follows: <PLAN> grasp the shaker_23 using left_hand grasp the shot_295 using right_hand leave the shaker_23 using left_hand fill the shot_295 on right_hand with ingredient_163 using dispenser_114 when left_hand is empty pour from shot_295 containing ingredient_163 to clean shaker_23 using right_hand from ...
13
[ "(grasp left shaker23)", "(grasp right shot295)", "(leave left shaker23)", "(fill-shot shot295 ingredient163 right left dispenser114)", "(pour-shot-to-clean-shaker shot295 ingredient163 shaker23 right l0 l1)", "(clean-shot shot295 ingredient163 right left)", "(fill-shot shot295 ingredient383 right left ...
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. Leave a container on the table. Fill-shot with an...
barman
360
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. Leave a container on the table. Fill-shot with an...
As initial conditions I have that, shaker_428 is clean, shot_48 is clean, cocktail_1 has ingredient_192 as its first ingredient, cocktail_1 has ingredient_65 as its second ingredient, dispenser_428 dispenses ingredient_192, dispenser_46 dispenses ingredient_65, shaker_428 is empty, shot_48 is empty, left_hand is empty,...
My plan is as follows: <PLAN> grasp the shaker_428 using left_hand grasp the shot_48 using right_hand leave the shaker_428 using left_hand fill the shot_48 on right_hand with ingredient_192 using dispenser_428 when left_hand is empty pour from shot_48 containing ingredient_192 to clean shaker_428 using right_hand from ...
13
[ "(grasp left shaker428)", "(grasp right shot48)", "(leave left shaker428)", "(fill-shot shot48 ingredient192 right left dispenser428)", "(pour-shot-to-clean-shaker shot48 ingredient192 shaker428 right l0 l1)", "(clean-shot shot48 ingredient192 right left)", "(fill-shot shot48 ingredient65 right left dis...
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. Leave a container on the table. Fill-shot with an...
barman
400
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. Leave a container on the table. Fill-shot with an...
As initial conditions I have that, shaker_370 is clean, shot_245 is clean, shot_417 is clean, cocktail_1 has ingredient_228 as its first ingredient, cocktail_1 has ingredient_232 as its second ingredient, dispenser_292 dispenses ingredient_228, dispenser_359 dispenses ingredient_232, shaker_370 is empty, shot_245 is em...
My plan is as follows: <PLAN> grasp the shot_245 using left_hand fill the shot_245 on left_hand with ingredient_228 using dispenser_292 when right_hand is empty pour from shot_245 containing ingredient_228 to clean shaker_370 using left_hand from level_0 to level_1 clean the shot_245 on left_hand used for ingredient_22...
10
[ "(grasp left shot245)", "(fill-shot shot245 ingredient228 left right dispenser292)", "(pour-shot-to-clean-shaker shot245 ingredient228 shaker370 left l0 l1)", "(clean-shot shot245 ingredient228 left right)", "(fill-shot shot245 ingredient232 left right dispenser359)", "(pour-shot-to-used-shaker shot245 in...
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. Leave a container on the table. Fill-shot with an...
barman
440
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. Leave a container on the table. Fill-shot with an...
As initial conditions I have that, shaker_473 is clean, shot_392 is clean, shot_401 is clean, cocktail_1 has ingredient_448 as its first ingredient, cocktail_1 has ingredient_217 as its second ingredient, dispenser_16 dispenses ingredient_313, dispenser_25 dispenses ingredient_217, dispenser_92 dispenses ingredient_448...
My plan is as follows: <PLAN> grasp the shaker_473 using left_hand grasp the shot_401 using right_hand leave the shaker_473 using left_hand fill the shot_401 on right_hand with ingredient_217 using dispenser_25 when left_hand is empty grasp the shaker_473 using left_hand pour from shot_401 containing ingredient_217 to ...
14
[ "(grasp left shaker473)", "(grasp right shot401)", "(leave left shaker473)", "(fill-shot shot401 ingredient217 right left dispenser25)", "(grasp left shaker473)", "(pour-shot-to-clean-shaker shot401 ingredient217 shaker473 right l0 l1)", "(leave left shaker473)", "(clean-shot shot401 ingredient217 rig...
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. Leave a container on the table. Fill-shot with an...
barman
480
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. Leave a container on the table. Fill-shot with an...
As initial conditions I have that, shaker_344 is clean, shot_281 is clean, shot_82 is clean, cocktail_1 has ingredient_68 as its first ingredient, cocktail_1 has ingredient_483 as its second ingredient, dispenser_139 dispenses ingredient_68, dispenser_256 dispenses ingredient_424, dispenser_321 dispenses ingredient_483...
My plan is as follows: <PLAN> grasp the shaker_344 using left_hand grasp the shot_82 using right_hand leave the shaker_344 using left_hand fill the shot_82 on right_hand with ingredient_483 using dispenser_321 when left_hand is empty grasp the shaker_344 using left_hand pour from shot_82 containing ingredient_483 to cl...
14
[ "(grasp left shaker344)", "(grasp right shot82)", "(leave left shaker344)", "(fill-shot shot82 ingredient483 right left dispenser321)", "(grasp left shaker344)", "(pour-shot-to-clean-shaker shot82 ingredient483 shaker344 right l0 l1)", "(leave left shaker344)", "(clean-shot shot82 ingredient483 right ...
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. Leave a container on the table. Fill-shot with an...
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
74