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
Silent PYTEXT_HOME print/exception during importing #1036
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
This pull request was exported from Phabricator. Differential Revision: D17796032 |
15ffa48
to
50927d8
Compare
This pull request was exported from Phabricator. Differential Revision: D17796032 |
hudeven
added a commit
to hudeven/pytext
that referenced
this pull request
Oct 9, 2019
…#1036) Summary: Pull Request resolved: facebookresearch#1036 1. PYTEXT_HOME will add unrelated print in some cases, e.g. PyText -> Fluent2 -> other non-PyText project using Fluent2) 2. Corner case: PyText is imported as a module and packed into a single binary file, `__file__` will be the path of the binary file instead of path.py and cause exception 3. In this case, we set PYTEXT_HOME to be the folder of that binary file and assuming the data files will be put either in the same folder or providing a absolute path in config file Differential Revision: D17796032 fbshipit-source-id: eae3ed9090ac840208f91c5411b52c0832c0577f
50927d8
to
bb0f8a4
Compare
This pull request was exported from Phabricator. Differential Revision: D17796032 |
hudeven
added a commit
to hudeven/pytext
that referenced
this pull request
Oct 9, 2019
…#1036) Summary: Pull Request resolved: facebookresearch#1036 1. PYTEXT_HOME will add unrelated print in some cases, e.g. PyText -> Fluent2 -> other non-PyText project using Fluent2) 2. Corner case: PyText is imported as a module and packed into a single binary file, `__file__` will be the path of the binary file instead of path.py and cause exception 3. In this case, we set PYTEXT_HOME to be the folder of that binary file and assuming the data files will be put either in the same folder or providing a absolute path in config file Differential Revision: D17796032 fbshipit-source-id: 5fbb28fc3de378ff6d26d20ba69cc346c77180e3
bb0f8a4
to
f0f329a
Compare
This pull request was exported from Phabricator. Differential Revision: D17796032 |
…#1036) Summary: Pull Request resolved: facebookresearch#1036 1. PYTEXT_HOME will add unrelated print in some cases, e.g. PyText -> Fluent2 -> other non-PyText project using Fluent2) 2. Corner case: PyText is imported as a module and packed into a single binary file, `__file__` will be the path of the binary file instead of path.py and cause exception 3. In this case, we set PYTEXT_HOME to be the folder of that binary file and assuming the data files will be put either in the same folder or providing a absolute path in config file Reviewed By: chenyangyu1988 Differential Revision: D17796032 fbshipit-source-id: 4258b71bc7dcbc80977ebada4aefb1c4222550b7
f0f329a
to
b22d9db
Compare
This pull request was exported from Phabricator. Differential Revision: D17796032 |
This pull request has been merged in ba21aff. |
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.
Differential Revision: D17796032