Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PrometheusTask and UltraCMTask could not be chained with TextGenerationTask #195

Merged
merged 5 commits into from
Dec 22, 2023

Conversation

gabrielmbmb
Copy link
Member

Description

The arguments of generate_prompt method for both PrometheusTask and UltraCMTask classes were not aligned with the ones generated by the TextGenerationTask, not allowing to have a Pipeline with a generator using the TextGenerationTask and a labeller using either PrometheusTask or UltraCMTask.

In addition, all the generate_prompt methods have been updated to accept extra keyword arguments and ignore them (**_). This is useful and convenient for the cases in which a Dataset contains more columns than the required by the task. Before if the input dataset contained additional columns not used by the task it would cause an error.

`PrometheusTask` was not working when using as a `labeller` in a
`Pipeline` with a `TextGenerationTask` as `generator`, because the input
arguments of its `generate_prompt` method were not aligned.
@gabrielmbmb gabrielmbmb merged commit dba77de into main Dec 22, 2023
4 checks passed
@gabrielmbmb gabrielmbmb deleted the fix_prometheus_generation_prompt_args branch December 22, 2023 12:58
@dvsrepo
Copy link
Member

dvsrepo commented Dec 22, 2023

Thanks a lot @gabrielmbmb !

I also noticed yesterday the UltraCM didn't return a Prompt like other tasks but a str. And also the Prometheus one had a hardcoded prompt format as llama, this would also cause issues integrating with the rest of the stack. I guess the reason is these OSS models are very sensitive to prompt templates but we need to discuss how to make this more interoperable or at least inform the user.

In general this wouldn't have been overlooked, if we have added a meaningful example showing the full workflow and likewise adding a very brief doc piece.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants