This repository was archived by the owner on Nov 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 797
Migrate create_predictor() to new data API #781
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
afd6b0a
to
45b0c11
Compare
hudeven
added a commit
to hudeven/pytext
that referenced
this pull request
Jul 16, 2019
Summary: Pull Request resolved: facebookresearch#781 issue in Github facebookresearch#701 root cause: create_predictor() is broken due to "features" is removed in the new Data API. We generate a predictor by create_predictor() and feed the predictor with 1 row of data(typically raw_text in json) in each call. However, in the new API, we feed predictor with a batch of data. To migrate it to new API, We can either 1) construct a special single row batch and follow https://fburl.com/tp6ekiqa to get model_inputs or 2) generate the model_inputs in adhoc way As I don't see an internal use case to predict with 1 row of data and approach 1) will take much efforts to implement(need to create a new Batcher to read data from a row of json input), I'm doing 2) in this diff. Differential Revision: D16268791 fbshipit-source-id: f0786fc692efddb0f423bcda78ccb7332d67ff15
45b0c11
to
3bd726e
Compare
hudeven
added a commit
to hudeven/pytext
that referenced
this pull request
Jul 16, 2019
Summary: Pull Request resolved: facebookresearch#781 issue in Github facebookresearch#701 root cause: create_predictor() is broken due to "features" is removed in the new Data API. We generate a predictor by create_predictor() and feed the predictor with 1 row of data(typically raw_text in json) in each call. However, in the new API, we feed predictor with a batch of data. To migrate it to new API, We can either 1) construct a special single row batch and follow https://fburl.com/tp6ekiqa to get model_inputs or 2) generate the model_inputs in adhoc way As I don't see an internal use case to predict with 1 row of data and approach 1) will take much efforts to implement(need to create a new Batcher to read data from a row of json input), I'm doing 2) in this diff. Differential Revision: D16268791 fbshipit-source-id: 2f3583f2bc486407aa97fc69500b3f8d7f0e8ccb
3bd726e
to
43027c4
Compare
hudeven
added a commit
to hudeven/pytext
that referenced
this pull request
Jul 16, 2019
Summary: Pull Request resolved: facebookresearch#781 issue in Github facebookresearch#701 root cause: create_predictor() is broken due to "features" is removed in the new Data API. We generate a predictor by create_predictor() and feed the predictor with 1 row of data(typically raw_text in json) in each call. However, in the new API, we feed predictor with a batch of data. To migrate it to new API, We can either 1) construct a special single row batch and follow https://fburl.com/tp6ekiqa to get model_inputs or 2) generate the model_inputs in adhoc way As I don't see an internal use case to predict with 1 row of data and approach 1) will take much efforts to implement(need to create a new Batcher to read data from a row of json input), I'm doing 2) in this diff. Differential Revision: D16268791 fbshipit-source-id: 194fc9e7b4f035ccfc7c41820a7060c810321c67
43027c4
to
557a01b
Compare
hudeven
added a commit
to hudeven/pytext
that referenced
this pull request
Jul 17, 2019
Summary: Pull Request resolved: facebookresearch#781 issue in Github facebookresearch#701 root cause: create_predictor() is broken due to "features" is removed in the new Data API. We generate a predictor by create_predictor() and feed the predictor with 1 row of data(typically raw_text in json) in each call. However, in the new API, we feed predictor with a batch of data. To migrate it to new API, We can either 1) construct a special single row batch and follow https://fburl.com/tp6ekiqa to get model_inputs or 2) generate the model_inputs in adhoc way As I don't see an internal use case to predict with 1 row of data and approach 1) will take much efforts to implement(need to create a new Batcher to read data from a row of json input), I'm doing 2) in this diff. Reviewed By: Titousensei Differential Revision: D16268791 fbshipit-source-id: 389e1ccd0177247517abb3c71d7f6e84dc3645fd
557a01b
to
06afcf2
Compare
hudeven
added a commit
to hudeven/pytext
that referenced
this pull request
Jul 17, 2019
Summary: Pull Request resolved: facebookresearch#781 issue in Github facebookresearch#701 root cause: create_predictor() is broken due to "features" is removed in the new Data API. We generate a predictor by create_predictor() and feed the predictor with 1 row of data(typically raw_text in json) in each call. However, in the new API, we feed predictor with a batch of data. To migrate it to new API, We can either 1) construct a special single row batch and follow https://fburl.com/tp6ekiqa to get model_inputs or 2) generate the model_inputs in adhoc way As I don't see an internal use case to predict with 1 row of data and approach 1) will take much efforts to implement(need to create a new Batcher to read data from a row of json input), I'm doing 2) in this diff. Differential Revision: D16268791 fbshipit-source-id: 9945304f924ffa903b05b3b15b176b33c7dba5bd
06afcf2
to
1405038
Compare
hudeven
added a commit
to hudeven/pytext
that referenced
this pull request
Jul 17, 2019
Summary: Pull Request resolved: facebookresearch#781 issue in Github facebookresearch#701 root cause: create_predictor() is broken due to "features" is removed in the new Data API. We generate a predictor by create_predictor() and feed the predictor with 1 row of data(typically raw_text in json) in each call. However, in the new API, we feed predictor with a batch of data. To migrate it to new API, We can either 1) construct a special single row batch and follow https://fburl.com/tp6ekiqa to get model_inputs or 2) generate the model_inputs in adhoc way As I don't see an internal use case to predict with 1 row of data and approach 1) will take much efforts to implement(need to create a new Batcher to read data from a row of json input), I'm doing 2) in this diff. Reviewed By: Titousensei Differential Revision: D16268791 fbshipit-source-id: dd311dec1b66ad025230582e933644ebd89e00cb
1405038
to
889c3dc
Compare
hudeven
added a commit
to hudeven/pytext
that referenced
this pull request
Jul 17, 2019
Summary: Pull Request resolved: facebookresearch#781 issue in Github facebookresearch#701 root cause: create_predictor() is broken due to "features" is removed in the new Data API. We generate a predictor by create_predictor() and feed the predictor with 1 row of data(typically raw_text in json) in each call. However, in the new API, we feed predictor with a batch of data. To migrate it to new API, We can either 1) construct a special single row batch and follow https://fburl.com/tp6ekiqa to get model_inputs or 2) generate the model_inputs in adhoc way As I don't see an internal use case to predict with 1 row of data and approach 1) will take much efforts to implement(need to create a new Batcher to read data from a row of json input), I'm doing 2) in this diff. Reviewed By: Titousensei Differential Revision: D16268791 fbshipit-source-id: 1b1da72021920dc32f022d64ee61f54f882fdbaa
Summary: Pull Request resolved: facebookresearch#781 issue in Github facebookresearch#701 root cause: create_predictor() is broken due to "features" is removed in the new Data API. We generate a predictor by create_predictor() and feed the predictor with 1 row of data(typically raw_text in json) in each call. However, in the new API, we feed predictor with a batch of data. To migrate it to new API, We can either 1) construct a special single row batch and follow https://fburl.com/tp6ekiqa to get model_inputs or 2) generate the model_inputs in adhoc way As I don't see an internal use case to predict with 1 row of data and approach 1) will take much efforts to implement(need to create a new Batcher to read data from a row of json input), I'm doing 2) in this diff. Reviewed By: Titousensei Differential Revision: D16268791 fbshipit-source-id: 19b306d5d81aabea4321edebb577a9bbc4dcc96f
889c3dc
to
04cac2d
Compare
This pull request has been merged in c88959c. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
issue in Github #701
root cause: create_predictor() is broken due to "features" is removed in the new Data API.
We generate a predictor by create_predictor() and feed the predictor with 1 row of data(typically raw_text in json) in each call. However, in the new API, we feed predictor with a batch of data. To migrate it to new API, We can either 1) construct a special single row batch and follow https://fburl.com/tp6ekiqa to get model_inputs or 2) generate the model_inputs in adhoc way
As I don't see an internal use case to predict with 1 row of data and approach 1) will take much efforts to implement(need to create a new Batcher to read data from a row of json input), I'm doing 2) in this diff.
Differential Revision: D16268791