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

Add Semantic Role Labeling task #301

Draft
wants to merge 50 commits into
base: main
Choose a base branch
from
Draft

Conversation

rmitsch
Copy link
Collaborator

@rmitsch rmitsch commented Sep 21, 2023

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.

Corresponding documentation PR

todo

Types of change

new feature

Checklist

  • I confirm that I have the right to submit this contribution under the project's MIT license.
  • I ran all tests in tests and usage_examples/tests, and all new and existing tests passed. This includes
    • all external tests (i. e. pytest ran with --external)
    • all tests requiring a GPU (i. e. pytest ran with --gpu)
  • My changes require a change to the documentation, and I've added all the required information.

@rmitsch rmitsch added feat/new New feature feat/task Feature: tasks labels Sep 21, 2023
@rmitsch rmitsch self-assigned this Sep 21, 2023
@rmitsch rmitsch changed the title Feat/srl Adding span_srl task with tests, usage and documentation Sep 21, 2023
@rmitsch rmitsch changed the title Adding span_srl task with tests, usage and documentation Adding Semantic Role Labeling task Sep 22, 2023
@rmitsch rmitsch changed the title Adding Semantic Role Labeling task Add Semantic Role Labeling task Sep 22, 2023
@rmitsch rmitsch added the Test external Run external tests label Sep 22, 2023
Copy link
Collaborator Author

@rmitsch rmitsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ahmeshaf I refactored the task and left some comments. Also, the prediction tests fail locally. Can you look into that? Thanks! 🙏

spacy_llm/tasks/srl/parser.py Outdated Show resolved Hide resolved
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More tests would be good - have a look at e. g. the SpanCat/NER tests for inspiration? E. g. the prompt identity tests.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

working on this today

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Just ping me when you're done.

@rmitsch rmitsch removed the Test external Run external tests label Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat/new New feature feat/task Feature: tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants