dspy icon indicating copy to clipboard operation
dspy copied to clipboard

Mipro crash in mipro_optimizer.py

Open drawal1 opened this issue 1 year ago • 2 comments

Notice in the watch window that there is nothing in the example_sets for i=3. Needs a check here?

image

drawal1 avatar Apr 19 '24 01:04 drawal1

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],
                            )

drawal1 avatar Apr 19 '24 01:04 drawal1

cc @klopsahlong

okhat avatar Apr 19 '24 13:04 okhat

Why was this closed? The issue still persists..

fjfricke avatar Aug 29 '24 12:08 fjfricke