text
text copied to clipboard
[Cherry Pick] move PATH_MANAGER to OSS
Summary:
Problem:
pytext got "No module named 'pytorch'" in issue https://github.com/facebookresearch/pytext/issues/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
Looks like we need to include iopath in requirements.txt
Is iopath fully available in OSS space?
There was an attempt to do this in the past, but reverted due to https://github.com/pytorch/text/issues/1380
Is
iopathfully available in OSS space?There was an attempt to do this in the past, but reverted due to #1380
It seems like iopath is still only available from conda-forge and according to #1380, we don't want to have a dependency on that channel. @hudeven should we revert this diff altogether or are there any other alternatives we can pursue?
cc @seemethere
I see. I can revert it then.
@Nayef211 I noticed that iopath is available in conda. The latest version is uploaded 1 year ago and likely to be outdated though: https://anaconda.org/iopath/iopath
@Nayef211 I noticed that iopath is available in conda. The latest version is uploaded 1 year ago and likely to be outdated though: https://anaconda.org/iopath/iopath
Yup in https://github.com/pytorch/text/issues/1380#issuecomment-904121322 @seemethere mentions that we don't want a dependency on the conda-forge channel which is the only channel that iopath is available in. He might have more context as to why this is the case.
we don't want a dependency on the
conda-forgechannel
Dependency resolution is very complex and adding (requiring) conda-forge channel often makes it impossible to install PyTorch due to constrains posed by other libraries.
@Nayef211 Can this be closed?
@Nayef211 Can this be closed?
Yup the original diff was reverted