-
-
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
Adding span_srl task with tests, usage and documentation #226
Conversation
@ahmeshaf Is this ready to be reviewed? |
@rmitsch Yes, it is! |
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.
Will be great to have this, thank you!
spacy_llm/tasks/srl_task.py
Outdated
reads a file containing task examples for few-shot learning. If None is | ||
passed, then zero-shot learning will be used. | ||
normalizer (Optional[Callable[[str], str]]): optional normalizer function. | ||
alignment_mode (str): "strict", "contract" or "expand". |
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.
alignment_mode (str): "strict", "contract" or "expand". | |
alignment_mode (Literal["strict", "contract", "expand"]): "strict", "contract" or "expand". |
And the description should refer to what it does (I know this is not on you, we have that in other places already unfortunately).
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.
Where can I find the descriptions for these? will copy-paste
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.
E. g. here.
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.
done. be50655
The spacy.io docs also need to be updated (see here). |
Co-authored-by: Raphael Mitsch <[email protected]>
Co-authored-by: Raphael Mitsch <[email protected]>
Co-authored-by: Raphael Mitsch <[email protected]>
@ahmeshaf Are you interested in continuing working on this? Otherwise I can take it over, we'd definitely want to have this in |
Will work on it this week! |
@ahmeshaf Let me know when this is ready for another review! |
@rmitsch it is ready! although there are a few unresolved comments above where I could use some help :) |
@ahmeshaf Responded to the open threads. Let me know when you're done with incorporating this - then I'll do (hopefully the last) review round 🙂 |
Added docs for srl response parsing
@rmitsch this is ready for a review! |
Thanks, @ahmeshaf! Should get around to it Friday or next week 🤞 |
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.
LGTM, thanks! 🎉 We refactored the task structure a while ago and moved the docs to spacy.io, but that doesn't matter for this PR - we'll adjust the code and do separate PRs for the refactor and docs. I'll merge this into a new branch until we have the time to finish this up in develop
.
[Edit] Since the refactor is already in main
, the approach before isn't viable. Instead I'll leave this open and refactor this on your branch, @ahmeshaf.
Closing in favor of #301. |
Oh. Thanks @rmitsch! Maybe, I could give the refactoring a shot if it saves your time? |
Span-based Semantic Role Labeling (SRL) with spacy-llms
Description
This PR is for the addition of a fully working spacy pipeline for zero-shot span-based SRL using OpenAI. It includes the task, template, usage example, tests (pytest), and documentation.
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
)