I am using the latest version of CrewAI (0.98.0), and the issue was already present with version 0.95.0.
When I initiate the training, everything proceeds correctly, with my feedback being considered at each step until the final stage, where I consistently encounter the following error upon entering “looks good”.
I have tried both asynchronous and synchronous tasks, but I still encounter the same error.
Traceback (most recent call last):
File “…\main.py”, line 56, in train
…Crew().crew().train(
File “…\Lib\site-packages\crewai\crew.py”, line 503, in train
result = TaskEvaluator(agent).evaluate_training_data(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “…\Lib\site-packages\crewai\utilities\evaluators\task_evaluator.py”, line 101, in evaluate_training_data
f"Improved Output:\n{data[‘improved_output’]}\n\n"
~~~~^^^^^^^^^^^^^^^^^^^
KeyError: ‘improved_output’
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “”, line 198, in _run_module_as_main
File “”, line 88, in _run_code
File “…\main.py”, line 98, in
train()
File “…\main.py”, line 61, in train
raise Exception(f"An error occurred while training the crew: {e}")
Exception: An error occurred while training the crew: ‘improved_output’