Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Package]: torchtext (python-torchtext) #19405

Open
1 task done
Forneck opened this issue Mar 3, 2024 · 8 comments
Open
1 task done

[Package]: torchtext (python-torchtext) #19405

Forneck opened this issue Mar 3, 2024 · 8 comments
Labels
package request A new package was requested

Comments

@Forneck
Copy link

Forneck commented Mar 3, 2024

Why is it worth to add this package?

Because there is already the package python-torch, python-torchaudio and python-torchvision.
I'm trying to use it in a project for a GAN text-based along torch in python, but the torchtext install is unavailable through pkg. It fails through pip install

Home page URL

No response

Source code URL

https://github.com/pytorch/text

Packaging policy acknowledgement

  • I certify that I have read Termux Packaging Policy and understand that my request will be denied in case of violation.

Additional information

I need to use torchtext on a project along torch. So I used pkg search torchtext and got only python-torch, python-torchaudio and python-torchvision. already installed these, so I tried going through pip install torchtext. When it got around sentencepiece wheel, I got the signal 9 error on termux.
After that I disabled the limit on phantom process on Android 12 to try again but instead of getting error, the Termux app just closes in the same part.
That's why Im requesting the torchtext (python-torchtext) package.

@Forneck Forneck added the package request A new package was requested label Mar 3, 2024
@TomJo2000
Copy link
Member

To quote the relevant section from the packaging policy.

  • Not installable through cpan, gem, npm, or pip

    These packages should be installed through cpan, gem, npm, pip and
    so on.

This module looks like it should be installable through pip with minimal tweaking to the flags.
If it is not installable, please provide the error message you are getting from pip.

@Forneck
Copy link
Author

Forneck commented Mar 3, 2024

I tried install using pip install torchtext, buy when it goes to sentencepiece wheel it got the signal 9 error and closes termux. after I disabled the limit of phantom process, termux closes itself when trying to compile the sentencepiece part of torchtext installation. can't get the output but can try recording a video for it

@Forneck
Copy link
Author

Forneck commented Mar 4, 2024

XRecorder_03032024_205306.mp4

I tried recording a few times, but everytime the video recorder is killed a few seconds before termux got killed.
Using --verbose the process kill is around 12%-18% of compiling sentencepiece dependence of torchtext.

So I tried pip install sentencepiece to install the dependence before installing torchtext:

XRecorder_03032024_211316.mp4

this time I got the signal 9 kill, tried again and termux got killed at the same time without signal 9 error message.

@sylirre
Copy link
Member

sylirre commented Mar 4, 2024

Logs must be submitted as properly formatted text, not as video.

@sylirre
Copy link
Member

sylirre commented Mar 4, 2024

@Forneck
Copy link
Author

Forneck commented Mar 4, 2024

I did this guide, then instead of signal 9 the Termux is killed instead. That's why I can't get the text output. only the video.

it closes itself

@Forneck
Copy link
Author

Forneck commented Mar 4, 2024

pip install --verbose torchtext
Using pip 24.0 from /data/data/com.termux/files/usr/lib/python3.11/site-packages/pip (python 3.11)
Collecting torchtext
Obtaining dependency information for torchtext from https://files.pythonhosted.org/packages/f2/17/e7c588245aece7aa93f360894179374830daf60d7ed0bbb59332de3b3b61/torchtext-0.6.0-py3-none-any.whl.metadata
Using cached torchtext-0.6.0-py3-none-any.whl.metadata (6.3 kB)
Requirement already satisfied: tqdm in /data/data/com.termux/files/usr/lib/python3.11/site-packages (from torchtext) (4.66.1)
Requirement already satisfied: requests in /data/data/com.termux/files/usr/lib/python3.11/site-packages (from torchtext) (2.28.2)
Requirement already satisfied: torch in /data/data/com.termux/files/usr/lib/python3.11/site-packages (from torchtext) (2.1.2)
Requirement already satisfied: numpy in /data/data/com.termux/files/usr/lib/python3.11/site-packages (from torchtext) (1.26.4)
Requirement already satisfied: six in /data/data/com.termux/files/usr/lib/python3.11/site-packages (from torchtext) (1.16.0)
Collecting sentencepiece (from torchtext)
Using cached sentencepiece-0.2.0.tar.gz (2.6 MB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: charset-normalizer<4,>=2 in /data/data/com.termux/files/usr/lib/python3.11/site-packages (from requests->torchtext) (2.1.1)
Requirement already satisfied: idna<4,>=2.5 in /data/data/com.termux/files/usr/lib/python3.11/site-packages (from requests->torchtext) (3.4)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /data/data/com.termux/files/usr/lib/python3.11/site-packages (from requests->torchtext) (1.26.14)
Requirement already satisfied: certifi>=2017.4.17 in /data/data/com.termux/files/usr/lib/python3.11/site-packages (from requests->torchtext) (2022.12.7)
Requirement already satisfied: filelock in /data/data/com.termux/files/usr/lib/python3.11/site-packages (from torch->torchtext) (3.13.1)
Requirement already satisfied: fsspec in /data/data/com.termux/files/usr/lib/python3.11/site-packages (from torch->torchtext) (2023.12.2)
Requirement already satisfied: jinja2 in /data/data/com.termux/files/usr/lib/python3.11/site-packages (from torch->torchtext) (3.1.3)
Requirement already satisfied: networkx in /data/data/com.termux/files/usr/lib/python3.11/site-packages (from torch->torchtext) (3.2.1)
Requirement already satisfied: sympy in /data/data/com.termux/files/usr/lib/python3.11/site-packages (from torch->torchtext) (1.12)
Requirement already satisfied: typing-extensions in /data/data/com.termux/files/usr/lib/python3.11/site-packages (from torch->torchtext) (4.9.0)
Requirement already satisfied: MarkupSafe>=2.0 in /data/data/com.termux/files/usr/lib/python3.11/site-packages (from jinja2->torch->torchtext) (2.1.4)
Requirement already satisfied: mpmath>=0.19 in /data/data/com.termux/files/usr/lib/python3.11/site-packages (from sympy->torch->torchtext) (1.3.0)
Using cached torchtext-0.6.0-py3-none-any.whl (64 kB)
Building wheels for collected packages: sentencepiece
Building wheel for sentencepiece (setup.py): started

@Forneck
Copy link
Author

Forneck commented Mar 4, 2024

pip install --verbose --verbose torchtext

torchtext.txt

it crashes after Using cached torchtext-0.6.0-py3-none-any.whl (64 kB)
Downloading link https://files.pythonhosted.org/packages/f2/17/e7c588245aece7aa93f360894179374830daf60d7ed0bbb59332de3b3b61/torchtext-0.6.0-py3-none-any.whl (from https://pypi.org/simple/torchtext/) to /data/data/com.termux/files/usr/tmp/pip-unpack-g_jqkoc0/torchtext-0.6.0-py3-none-any.whl
Building wheels for collected packages: sentencepiece
Created temporary directory: /data/data/com.termux/files/usr/tmp/pip-wheel-xvrq8prf
Building wheel for sentencepiece (setup.py): started
Destination directory: /data/data/com.termux/files/usr/tmp/pip-wheel-xvrq8prf

apparently it tries to compile sentencepiece to install torchtext but it doesn't get redirected to the log because the crash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package request A new package was requested
Projects
None yet
Development

No branches or pull requests

3 participants