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 TorchScript #116

Merged
merged 1 commit into from
Jun 9, 2024
Merged

Add TorchScript #116

merged 1 commit into from
Jun 9, 2024

Conversation

leejuyuu
Copy link
Contributor

This is my attempt to address the reviews of #113 .

@coveralls
Copy link

coveralls commented May 26, 2024

Coverage Status

coverage: 100.0%. remained the same
when pulling e8c852e on leejuyuu:torchscriptable
into cc449eb on kmkurn:master.

@leejuyuu leejuyuu marked this pull request as draft June 1, 2024 08:41
@leejuyuu leejuyuu marked this pull request as ready for review June 7, 2024 16:06
@leejuyuu
Copy link
Contributor Author

leejuyuu commented Jun 7, 2024

@kmkurn I rebased this onto the master branch.

Copy link
Owner

@kmkurn kmkurn left a comment

Choose a reason for hiding this comment

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

Thank you for continuing the torchscript PR! Overall it looks good, but I left some requests and questions below.

One major request is about the structure of the tests. Do you mind changing it so that each assert is in its own test function/method? Similar to the tests for the non-scripted version. It will make pytest's report a lot clearer when a test fails. Feel free to create another test module under tests if necessary.

torchcrf/__init__.py Show resolved Hide resolved
torchcrf/__init__.py Show resolved Hide resolved
torchcrf/__init__.py Outdated Show resolved Hide resolved
torchcrf/__init__.py Show resolved Hide resolved
tests/test_crf.py Show resolved Hide resolved
tests/test_crf.py Outdated Show resolved Hide resolved
tests/test_crf.py Outdated Show resolved Hide resolved
tests/test_crf.py Outdated Show resolved Hide resolved
@leejuyuu
Copy link
Contributor Author

leejuyuu commented Jun 8, 2024

I've split up the tests into smaller pieces. The commit messages are a bit messy, I think I'll squash them into one if it is ready to get merged.

Copy link
Owner

@kmkurn kmkurn left a comment

Choose a reason for hiding this comment

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

Thanks for the changes and clarifications. It looks really good now. I just have a question and minor requests below before I can merge.

tests/test_crf.py Outdated Show resolved Hide resolved
tests/test_crf.py Show resolved Hide resolved
README.rst Outdated Show resolved Hide resolved
Copy link
Owner

@kmkurn kmkurn left a comment

Choose a reason for hiding this comment

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

Thanks for the changes! Just a couple of minor requests from me, and the PR should be ready to merge.

docs/index.rst Outdated Show resolved Hide resolved
tests/test_crf.py Outdated Show resolved Hide resolved
tests/test_crf.py Outdated Show resolved Hide resolved
@kmkurn
Copy link
Owner

kmkurn commented Jun 9, 2024

I think this PR looks good to merge. If you still want to squash the commits into one, please do so now, and then let me know.

@leejuyuu
Copy link
Contributor Author

leejuyuu commented Jun 9, 2024

@kmkurn Thanks! The commits are squashed into one.

@kmkurn kmkurn merged commit 623e340 into kmkurn:master Jun 9, 2024
4 checks passed
@kmkurn
Copy link
Owner

kmkurn commented Jun 9, 2024

Thank you for your contribution! The PR is now merged :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants