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

Make a copy of the torchtext utils to remove dependency #3076

Merged
merged 15 commits into from
Jun 6, 2024

Conversation

agunapal
Copy link
Collaborator

@agunapal agunapal commented Apr 6, 2024

Description

This PR removes the dependency of TorchServe's TextClassifier Handler on TorchText by copying the functions that are being used

Fixes #(issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Feature/Issue validation/testing

CI & Regression Pass which use TextClassifier

Checklist:

  • Did you have fun?
  • Have you added tests that prove your fix is effective or that this feature works?
  • Has code been commented, particularly in hard-to-understand areas?
  • Have you made corresponding changes to the documentation?

@agunapal agunapal marked this pull request as ready for review April 24, 2024 16:10
@agunapal agunapal requested a review from mreso April 24, 2024 16:10
@mreso
Copy link
Collaborator

mreso commented Apr 24, 2024

We should also consider removing https://github.com/pytorch/serve/tree/master/examples/text_classification_with_scriptable_tokenizer as it depends on torchtext as well.

@agunapal
Copy link
Collaborator Author

https://github.com/pytorch/serve/tree/master/examples/text_classification_with_scriptable_tokenizer
@mreso
Shall we remove this or update the instructions to include pip install torchtext and give a deprecation message at the top of the readme ?

@agunapal agunapal added this to the v0.12.0 milestone Jun 3, 2024
Copy link
Collaborator

@mreso mreso left a comment

Choose a reason for hiding this comment

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

LGTM, please address comment before merging

ts/handler_utils/text_utils.py Show resolved Hide resolved
@agunapal agunapal enabled auto-merge June 6, 2024 20:25
@agunapal agunapal disabled auto-merge June 6, 2024 20:26
@agunapal agunapal enabled auto-merge June 6, 2024 20:28
@agunapal agunapal added this pull request to the merge queue Jun 6, 2024
Merged via the queue into master with commit a10aa45 Jun 6, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
v0.12.0 lifecycle
Awaiting triage
Development

Successfully merging this pull request may close these issues.

None yet

2 participants