Skip to content

Commit f9aa7f5

Browse files
committed
small fix
1 parent cc035f8 commit f9aa7f5

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

plancraft/environment/planner.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,13 +496,17 @@ def decompose_subgoal(
496496
return subplan, current_inventory, action_items_used
497497

498498

499-
def get_subplans(observation: dict, return_items=False) -> tuple[list[list[str]], list]:
499+
def get_subplans(
500+
observation: dict, return_items=False
501+
) -> tuple[list[list[str]], list, list[str]] | tuple[list[list[str]], list]:
500502
current_inventory = copy.deepcopy(observation["inventory"])
501503
plan = get_plan(observation)
502504
# get action
503505
if plan is None or len(plan) == 0:
506+
if return_items:
507+
return [[str(StopAction())]], [], []
504508
return [[str(StopAction())]], []
505-
# plan_recipe, new_inventory = plan[0]
509+
506510
subplans = []
507511
action_items_used = []
508512

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "plancraft"
3-
version = "0.4.5"
3+
version = "0.4.6"
44
description = "Plancraft: an evaluation dataset for planning with LLM agents"
55
readme = "README.md"
66
requires-python = ">=3.10"

0 commit comments

Comments
 (0)