Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Add support for Torchscript export of IntentSlotOutputLayer and CRF #1146

Closed

Conversation

abhinavarora
Copy link
Contributor

Summary:
This diff does the following:

  1. Modifies IntentSlotOutputLayer, WordTaggingOutputLayer and CRFOutputLayer for torchscript export.

  2. Makes CRF implementation torchscriptable

  3. Fixes predict method of NewTask to make sure it passes model context as well to get_pred

  4. Fixes return type of the forward method of the decoder to return tuples of tensors instead of lists of tensors.

Differential Revision: D18565235

@facebook-github-bot facebook-github-bot added CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported labels Nov 18, 2019
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D18565235

abhinavarora added a commit to abhinavarora/pytext that referenced this pull request Nov 18, 2019
…acebookresearch#1146)

Summary:
Pull Request resolved: facebookresearch#1146

This diff does the following:

1. Modifies `IntentSlotOutputLayer`, `WordTaggingOutputLayer` and `CRFOutputLayer` for torchscript export.

1. Makes CRF implementation torchscriptable
1. Fixes `predict` method of `NewTask` to make sure it passes model context as well to `get_pred`
1. Fixes return type of the `forward` method of the decoder to return tuples of tensors instead of lists of tensors.

Differential Revision: D18565235

fbshipit-source-id: 732366baee95525e993ba1061c8d34bae66a7ed9
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D18565235

abhinavarora added a commit to abhinavarora/pytext that referenced this pull request Nov 18, 2019
…acebookresearch#1146)

Summary:
Pull Request resolved: facebookresearch#1146

This diff does the following:

1. Modifies `IntentSlotOutputLayer`, `WordTaggingOutputLayer` and `CRFOutputLayer` for torchscript export.

1. Makes CRF implementation torchscriptable
1. Fixes `predict` method of `NewTask` to make sure it passes model context as well to `get_pred`
1. Fixes return type of the `forward` method of the decoder to return tuples of tensors instead of lists of tensors.

Reviewed By: liaimi

Differential Revision: D18565235

fbshipit-source-id: 34828cc4faf70fd52619fbb1b624e75ef71a3d0d
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D18565235

…acebookresearch#1146)

Summary:
Pull Request resolved: facebookresearch#1146

This diff does the following:

1. Modifies `IntentSlotOutputLayer`, `WordTaggingOutputLayer` and `CRFOutputLayer` for torchscript export.

1. Makes CRF implementation torchscriptable
1. Fixes `predict` method of `NewTask` to make sure it passes model context as well to `get_pred`
1. Fixes return type of the `forward` method of the decoder to return tuples of tensors instead of lists of tensors.

Reviewed By: liaimi

Differential Revision: D18565235

fbshipit-source-id: bff6193e7328a85ca300fba21bbebe1407bdd41b
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D18565235

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 6dd8fcc.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants