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 could not be imported #190

Merged
merged 3 commits into from
Dec 22, 2023

Conversation

gabrielmbmb
Copy link
Member

Description

PrometheusTask couldn't be imported after a bug that was introduced in #177, in which a __type__ attribute with a default value (either "labelling" or "generator") was added to the Tasks base classes (PreferenceTask and CritiqueTask) which should be a ClassVar.

This was not allowing to the dataclasses inheriting from these classes to define non-default attributes causing the error described in #184.

In addition this PR have added PrometheusTask to distilabel.tasks.__init__, so it can be imported using from distilabel.tasks import PrometheusTask.

`__type__` attribute in `Task` base classes was not a `ClassVar` causing
dataclasses inheriting from them to not be able to have non-default
attributes.
@gabrielmbmb gabrielmbmb self-assigned this Dec 22, 2023
@gabrielmbmb gabrielmbmb linked an issue Dec 22, 2023 that may be closed by this pull request
@gabrielmbmb gabrielmbmb merged commit 7fe94b9 into main Dec 22, 2023
4 checks passed
@gabrielmbmb gabrielmbmb deleted the fix_prometheus_non_default_scoring_criteria branch December 22, 2023 10:32
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.

[BUG] Problem in 0.2.0 importing PrometheusTask
1 participant