Skip to content

AttributeError: FewShotGptPolicy object has no attribute reset_last_action #84

@jogobeny

Description

@jogobeny

Hi,

I am experimenting with running COPRA on Llama 3.1. I have added my own config and updated the chat format to match Llama 3.1.

When I run simple_benchmark_lean4, it sometimes completes successfully, but occasionally I get the following exception:

2025-09-24 23:31:50,315 - __main__ - ERROR - Exception occurred while proving lemma: test in file data/test/lean4_proj/Lean4Proj/Temp.lean: 'FewShotGptPolicy' object has no attribute 'reset_last_action'
Traceback (most recent call last):
  File "/home/.../.../copra/src/copra/main/eval_benchmark.py", line 405, in _run_prover
    agent.run_episodes_till_stop(
  File "/home/.../.../copra/src/copra/agent/simple_proof_agent.py", line 55, in run_episodes_till_stop
    self._run_episode_as_per_policy(env, stop_policy, policy_info_message, render)
  File "/home/.../.../copra/src/copra/agent/simple_proof_agent.py", line 88, in _run_episode_as_per_policy
    self._policy.reset_last_action(modified_action)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'FewShotGptPolicy' object has no attribute 'reset_last_action'

I’ve attached the full eval.log for reference: eval.log (n_4_few_llama3_1.txt)

Could you help me understand why this is happening and how to fix it?

Thank you.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions