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

Commit

Permalink
move PATH_MANAGER to OSS
Browse files Browse the repository at this point in the history
Summary:
## Problem:
pytext got "No module named 'pytorch'" in issue #1706

It's due to `from pytorch.text.fb.utils import PATH_MANAGER` is internal only but imported in pytext. Actually, `pytorch/text/fb/utils/__init__.py` should be open sourced.

## Solution:
This diff moved it to OSS as `from torchtext.utils import PATH_MANAGER` and updated all the references

Reviewed By: Nayef211

Differential Revision: D39292896

fbshipit-source-id: c0046d62e64145b60ad9a5298b366f0f1a348369
  • Loading branch information
hudeven authored and facebook-github-bot committed Sep 7, 2022
1 parent 0dfebbd commit b932448
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pytext/utils/file_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# the import everywhere in PyText
# TODO: @stevenliu use PathManagerFactory after it's released to PyPI
from iopath.common.file_io import HTTPURLHandler
from pytorch.text.fb.utils import PATH_MANAGER as PathManager # noqa
from torchtext.utils import PATH_MANAGER as PathManager # noqa


def register_http_url_handler():
Expand Down

0 comments on commit b932448

Please sign in to comment.