plancraft 0.3.7__py3-none-any.whl → 0.3.8__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.
plancraft/evaluator.py CHANGED
@@ -194,7 +194,6 @@ class Evaluator:
194
194
  """Given the loaded model and an example from Plancraft
195
195
  run the episode until success or termination."""
196
196
  success = False
197
- num_non_env_actions = 0
198
197
  self.reset(example)
199
198
  action = None
200
199
 
@@ -209,24 +208,18 @@ class Evaluator:
209
208
  success = example.impossible
210
209
  break
211
210
  # action is external tool then it is str
212
- # limit the number of consecutive non-env actions to 3
213
- elif isinstance(action, str) and num_non_env_actions < 3:
214
- observation = {"message": action}
215
- num_non_env_actions += 1
211
+ if isinstance(action, str):
212
+ observation = self.environment.step()
213
+ observation["target"] = example.target
214
+ observation["message"] = action
216
215
  # action is environment action
217
216
  else:
218
- if isinstance(action, str):
219
- observation = self.environment.step()
220
- else:
221
- observation = self.environment.step(action)
222
-
217
+ observation = self.environment.step(action)
223
218
  # convert inventory observation to text message
224
219
  observation["target"] = example.target
225
220
  observation["message"] = self.convert_observation_to_message(
226
221
  observation
227
222
  )
228
- num_non_env_actions = 0
229
-
230
223
  # check if the episode is done
231
224
  success = self.check_done(observation["inventory"], example.target)
232
225
  # exit if success
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plancraft
3
- Version: 0.3.7
3
+ Version: 0.3.8
4
4
  Summary: Plancraft: an evaluation dataset for planning with LLM agents
5
5
  License: MIT License
6
6
 
@@ -1,6 +1,6 @@
1
1
  plancraft/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  plancraft/config.py,sha256=Ppkps-E8xDNYEP9prOVxW2zEG9MpWVzcLJi4tmGLjuQ,4285
3
- plancraft/evaluator.py,sha256=zWk3k1EiqGOIJkSWGL5Qk27xqwLowUMwRRVc6dm0gGo,11037
3
+ plancraft/evaluator.py,sha256=FogXAjnldK2K1gD02f2WW1YWvjWokKGUOJxwtwzGNjk,10804
4
4
  plancraft/generate_dataset.py,sha256=DlrU-PmvWqSNJD1g1-8Lpb8n3N-Ogw3rje1nrRzjGKs,2382
5
5
  plancraft/utils.py,sha256=phaHzbIS85YZrBPaGG9TStHY8ZBKR1LKfuN1exfVy1U,6889
6
6
  plancraft/data/test.json,sha256=4jWfYMAVuZCFmGB4iZJAjlh9_8jXECdaGp8xn7_tAM4,1317131
@@ -1920,7 +1920,7 @@ plancraft/models/generators.py,sha256=F76_iPiqxUjDIrQwF58tzM0bLM91OkZJ0sBqBuki5w
1920
1920
  plancraft/models/oracle.py,sha256=jDCE6zVFvbwFpDzQZTkHIlRwMud1yMJ4LVIdfpt5ddU,8449
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.7.dist-info/METADATA,sha256=fZOUxkStOAD_MOeokSk-MNcsFIf5m2DmrJnALuNrA9Q,11147
1924
- plancraft-0.3.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
1925
- plancraft-0.3.7.dist-info/licenses/LICENSE,sha256=YGR8ehDB4t-T-lOQKMfKNR-2zsOU7E3E5NA8t25HKE0,1070
1926
- plancraft-0.3.7.dist-info/RECORD,,
1923
+ plancraft-0.3.8.dist-info/METADATA,sha256=H6H7LnIFSd-M-FyqlAtErJfzL4WxSDd0ku66P2YyTeQ,11147
1924
+ plancraft-0.3.8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
1925
+ plancraft-0.3.8.dist-info/licenses/LICENSE,sha256=YGR8ehDB4t-T-lOQKMfKNR-2zsOU7E3E5NA8t25HKE0,1070
1926
+ plancraft-0.3.8.dist-info/RECORD,,