dspy
dspy copied to clipboard
Mipro crash in mipro_optimizer.py
Notice in the watch window that there is nothing in the example_sets for i=3. Needs a check here?
Perhaps the code should have a key error check like this?
if i in example_sets[id(predictor)]:
new_instruct = dspy.Predict(
BasicGenerateInstructionWithExamplesAndDataObservations,
n=1,
temperature=self.init_temperature,
)(
basic_instruction=basic_instruction,
observations=self.observations,
examples=example_sets[id(predictor)][i],
)
cc @klopsahlong
Why was this closed? The issue still persists..