AutoPrompt icon indicating copy to clipboard operation
AutoPrompt copied to clipboard

KeyError: 'samples'

Open alibabadoufu opened this issue 11 months ago • 3 comments

Output of the sample_batches doesn't have the sample keys

        samples_list = [
            element for sublist in samples_batches for element in sublist["samples"]
        ]

Reference: https://github.com/Eladlev/AutoPrompt/blob/c640cc0108e78601b474b380462a1a6274318fcc/optimization_pipeline.py#L192C25-L192C32

alibabadoufu avatar Mar 02 '24 07:03 alibabadoufu

Could you provide the exact configuration? In which mode did you try to run the code?

Eladlev avatar Mar 02 '24 11:03 Eladlev

Could you provide the exact configuration? In which mode did you try to run the code?

Hi, I am using huggingfacepipeline.

Referring to the screenshot below, the all_results doesn't contain the key "samples"

image

alibabadoufu avatar Mar 03 '24 06:03 alibabadoufu

When working with huggingfacepipeline you should change the meta prompts to the completion format in the config_default file (the default meta prompts are using openAI functions):

meta_prompts:
    folder: 'prompts/meta_prompts_completion'

Eladlev avatar Mar 03 '24 07:03 Eladlev