-
Notifications
You must be signed in to change notification settings - Fork 129
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
Refactor 836 refactor convert inputs and outputs to class property #837
Refactor 836 refactor convert inputs and outputs to class property #837
Conversation
def model_post_init(self, __context: Any) -> None: | ||
"""Checks that the provided `LLM` uses the `MagpieChatTemplateMixin`.""" | ||
super().model_post_init(__context) | ||
|
||
if not isinstance(self.llm, MagpieChatTemplateMixin): | ||
raise ValueError( | ||
f"`Magpie` task can only be used with an `LLM` that uses the `MagpieChatTemplateMixin`." | ||
f"`{self.llm.__class__.__name__}` doesn't use the aforementioned mixin." | ||
) | ||
|
||
self.llm.use_magpie_template = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gabrielmbmb was there a reason you were defining these again? They were also defined in the parent class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, having the model_post_init
in the MagpieBase
class and then inheriting in Magpie
and MagpieGenerator
didn't trigger it, so that's why it's duplicate in Magpie
and MagpieGenerator
tasks. Apparently, this is an issue with pydantic that should be fixed but it's not working and didn't want to expend too much time so I decided to duplicate the code.
Fix some of the failing tests
…uts-to-class-property
Documentation for this PR has been built. You can view it at: https://distilabel.argilla.io/pr-837/ |
CodSpeed Performance ReportMerging #837 will not alter performanceComparing Summary
|
@gabrielmbmb there is one failing test that run locally but seems to fail in the test pipeline and I cannot pinpoint directly why. Do you have any idea? For some reason, the dataset loaded by the file system does not have any columns. Additionally, I am not 100% if the pipeline validation still works because I remove |
…uts-to-class-property
Closes #836
Closes #839