plancraft 0.3.25__py3-none-any.whl → 0.3.26__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,6 +22,10 @@ def convert_to_slot_index(slot: str) -> int:
22
22
  if slot in grid_map:
23
23
  return grid_map[slot]
24
24
  else:
25
+ # check if it is an inventory slot
26
+ if len(slot) < 4 or len(slot) > 5 or slot[1] != "I" or slot[2] == "0":
27
+ raise ValueError("Invalid slot index")
28
+ # convert I1 to 10, I2 to 11, I3 to 12, ..., I36 to 45
25
29
  return int(slot[2:-1]) + 9
26
30
 
27
31
 
@@ -40,8 +44,9 @@ def convert_from_slot_index(slot_index: int) -> str:
40
44
  }
41
45
  if slot_index < 10:
42
46
  return grid_map[slot_index]
43
- else:
47
+ elif slot_index < 46:
44
48
  return f"[I{slot_index-9}]"
49
+ raise ValueError("Invalid slot index")
45
50
 
46
51
 
47
52
  class ActionHandlerBase(abc.ABC):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plancraft
3
- Version: 0.3.25
3
+ Version: 0.3.26
4
4
  Summary: Plancraft: an evaluation dataset for planning with LLM agents
5
5
  License: MIT License
6
6
 
@@ -11,7 +11,7 @@ plancraft/data/val.json,sha256=IToAiaqUNQi_xhX1bzmInuskLaT7C2ryQjP-CZkzL24,13044
11
11
  plancraft/data/val.small.easy.json,sha256=9zEmqepjXG2NIp88xnFqOCkwsUsku3HEwHoQGxgTr6U,190252
12
12
  plancraft/data/val.small.json,sha256=76E9EFaljDQyAokg97e-IblvcOe6KbrdKkXvRxhhkgo,237653
13
13
  plancraft/environment/__init__.py,sha256=XFsFny4lH195AwAmL-WeCaF9ZCMgc7IgXIwhQ8FTdgE,505
14
- plancraft/environment/actions.py,sha256=Y_uPg6xjMrtwvtADe7ziTFN9itw6IOOx3sJB5NQFNFE,10880
14
+ plancraft/environment/actions.py,sha256=9GESxqx4z0aTwEmI6H-8MJMaqnFTAgsfck7GOHUQEBg,11175
15
15
  plancraft/environment/env.py,sha256=A4532st7JFBYBF_Nh0CEEi3ZTLJAeaB3t9PAIVSemj0,16390
16
16
  plancraft/environment/items.py,sha256=Z9rhSyVDEoHF1pxRvhyiT94tyQJaWHi3wUHVcamz82o,221
17
17
  plancraft/environment/planner.py,sha256=uIOJjIoyT_4pxeWeTKb8BkLJyKZG0-AMoEOkZs6Ua9A,19340
@@ -1920,7 +1920,7 @@ plancraft/models/generators.py,sha256=F76_iPiqxUjDIrQwF58tzM0bLM91OkZJ0sBqBuki5w
1920
1920
  plancraft/models/oracle.py,sha256=f-0KWlBuHy6wcxmDsxM3MQ_QwfBstzfbA26mlk1MgLA,1657
1921
1921
  plancraft/models/utils.py,sha256=E-sZohvolWgGbpHQKgAgkgIfUJoVnT5pMt6JP8xLHKg,4034
1922
1922
  plancraft/train/dataset.py,sha256=oFqEd4LG9oEQ-71teh0Wf7-jJbtybT2ZibfM2bBdBkM,5474
1923
- plancraft-0.3.25.dist-info/METADATA,sha256=pSbT2EBhcwKnvRtOeq3lAPrpPrDgZ2DAsnosjLyQe78,11148
1924
- plancraft-0.3.25.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
1925
- plancraft-0.3.25.dist-info/licenses/LICENSE,sha256=YGR8ehDB4t-T-lOQKMfKNR-2zsOU7E3E5NA8t25HKE0,1070
1926
- plancraft-0.3.25.dist-info/RECORD,,
1923
+ plancraft-0.3.26.dist-info/METADATA,sha256=2s3S8xZMyP8v1T0y2qHl5OHIN18sMn0UXXA8iJxUQq8,11148
1924
+ plancraft-0.3.26.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
1925
+ plancraft-0.3.26.dist-info/licenses/LICENSE,sha256=YGR8ehDB4t-T-lOQKMfKNR-2zsOU7E3E5NA8t25HKE0,1070
1926
+ plancraft-0.3.26.dist-info/RECORD,,