-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
Swappable parsing #242
Swappable parsing #242
Conversation
It might make sense to move each task into their own module and split the actual task implementation from the factory methods and utils (such as the parsing methods). Over time this will become unwieldy otherwise. |
Making parsing swappable is a bit more complicated for tasks inheriting from |
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.
This looks like a promising approach to me to allow more flexibility both for users, as well as for our own builtin functionality.
As discussed internally, we'd also need to make the _create_prompt_example
functionality swappable.
We can definitely do that, yep. |
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.
I like this direction! Leaving some first comments.
* Refactor tasks. * Update spacy_llm/tasks/builtin_task.py Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com> * Update spacy_llm/tasks/builtin_task.py Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com> * Update spacy_llm/tasks/builtin_task.py Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com> * Fix imports. * Make scorer configurable. --------- Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
# Conflicts: # spacy_llm/tasks/rel.py
…lm into feat/swappable-parsing
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
Ready for a final review round. We should decide whether we want to keep the file structure for tasks as-is - we could also merge |
|
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.
This is looking good! Left a few final comments & fixes, nothing major.
Feel free to merge afterwards so we can move on to the CoT to put this in practice 🎉
And maybe to be sure, run the GPU & external tests at the end before merging. |
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
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.
🎉
Description
Make parsing a swappable, configurable attribute to allow modify parsing behaviour without retiring the entire task class.
Corresponding documentation PR
todo
Types of change
New feature.
Checklist
tests
andusage_examples/tests
, and all new and existing tests passed. This includespytest
ran with--external
)pytest
ran with--gpu
)