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

Coref Components #17

Merged
merged 81 commits into from
Sep 27, 2022
Merged

Coref Components #17

merged 81 commits into from
Sep 27, 2022

Conversation

polm
Copy link
Contributor

@polm polm commented Jul 13, 2022

This is a continuation of explosion/spaCy#7264, since we decided to add the coref components here first. It's still a work in progress.

@polm polm added the enhancement New feature or request label Jul 13, 2022
@polm polm mentioned this pull request Jul 13, 2022
3 tasks
@polm polm marked this pull request as ready for review July 13, 2022 10:17
@polm
Copy link
Contributor Author

polm commented Jul 13, 2022

There may still be a few rough edges in the code, but I believe at this point it's ready for review, and strange types / lack of clarity should be mostly resolved.

The EXXX assignment will have to be made later.
@polm
Copy link
Contributor Author

polm commented Jul 13, 2022

You can also test a fully working component with the project here. explosion/projects#101

Copy link
Member

@svlandeg svlandeg left a comment

Choose a reason for hiding this comment

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

Some small comments...

spacy_experimental/coref/coref_component.py Outdated Show resolved Hide resolved
spacy_experimental/coref/coref_scorer.py Outdated Show resolved Hide resolved
spacy_experimental/coref/coref_component.py Outdated Show resolved Hide resolved
spacy_experimental/coref/coref_component.py Outdated Show resolved Hide resolved
spacy_experimental/coref/coref_model.py Outdated Show resolved Hide resolved
@polm polm requested a review from svlandeg August 1, 2022 09:16
spacy_experimental/coref/coref_util.py Outdated Show resolved Hide resolved
spacy_experimental/coref/coref_util.py Outdated Show resolved Hide resolved
spacy_experimental/coref/coref_util.py Outdated Show resolved Hide resolved
spacy_experimental/coref/coref_util.py Show resolved Hide resolved
@svlandeg svlandeg dismissed their stale review August 25, 2022 08:40

Decided to continue looking into the performance profiling first

polm and others added 6 commits August 25, 2022 20:09
Coerce scalar tensors to native Python integers to avoid comparison overhead.
`Coref`: Optimize `SpanResolver.set_annotations`
`Coref`: Vectorize `get_predicted_antecedents`
@polm
Copy link
Contributor Author

polm commented Aug 31, 2022

OK, now that performance profiling is done for the time being I think this is ready to merge?

I believe this fails on Windows due to type issues.
The array created by full defaults to int32, while the input is int64.
Linux happily converts this without issue, but Windows throws an error.
Making sure the dtype matches resolves the issue.
@polm
Copy link
Contributor Author

polm commented Sep 1, 2022

OK, there was a small issue with the optimizations on Windows, but now the tests have cleared (including project tests on Windows) and I was able to train a whole pipeline without issue, so this should be ready to merge, pending any further review.

No idea if this'll work, but want to check.
@polm
Copy link
Contributor Author

polm commented Sep 1, 2022

I am going to see what happens if we add Windows to the CI, though if there are issues with other components that could be out of scope for this PR.

@polm
Copy link
Contributor Author

polm commented Sep 1, 2022

Well, it looks like the tests for this repo on Windows just work, so I guess we can add that too if we want.

Copy link
Member

@svlandeg svlandeg left a comment

Choose a reason for hiding this comment

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

There's still a few TODO items we're aware of, but it would be great to get this merged into spacy-experimental and start getting feedback from our user base on this functionality!

Not merging yet as we'll need to coordinate across repo's.

Nice work, Paul, Ákos & Madeesh!

@polm polm merged commit bb73ce6 into master Sep 27, 2022
@svlandeg svlandeg deleted the feature/coref branch January 8, 2023 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
5 participants