distilabel icon indicating copy to clipboard operation
distilabel copied to clipboard

[DEPRECATION] Remove `messages` support via `instruction` in `TextGeneration`

Open alvarobartt opened this issue 1 month ago • 0 comments

Description

In distilabel v1.0.0 we included the task TextGeneration and at the last moment we decided to include support for an already formatted chat like object i.e. a list of dicts with the keys role and content; but that's counter intuitive since to use TextGeneration with say the column messages one would need to always provide the input_mappings and the logic of format_input had some conditionals to handle that.

Now, since v1.1.0 we decided to include a separate task for that named ChatGeneration that indeed expects a column named messages that will check that's compatible with the expected format and then call the process method with that. This is not also more intuitive, but also the cost of maintaining it is low.

Additionally, this let us define the optional input system_prompt in TextGeneration, meaning that if the system_prompt is available and the use_system_prompt flag is set to True, then the system_prompt will be included as the first message before the instruction.

So on, in v1.1.0 a DeprecationWarning will be raised when using TextGeneration for ChatGeneration, encouraging the user to use ChatGeneration instead, while showing a DeprecationWarning to be applied in v1.2.0.

alvarobartt avatar May 17 '24 06:05 alvarobartt