Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 20:09
    paruul commented #239
  • 08:21
    Sanghyuk-Choi commented #1918
  • 08:20
    Sanghyuk-Choi commented #1918
  • May 13 15:45
    PosoSAgapo closed #2162
  • May 13 15:45
    PosoSAgapo closed #2163
  • May 13 13:01
    Ch3nYe closed #2148
  • May 12 06:22
    kagrze synchronize #2161
  • May 11 14:43
    PosoSAgapo edited #2163
  • May 11 10:11
    PosoSAgapo edited #2163
  • May 11 10:10
    PosoSAgapo edited #2163
  • May 11 10:04
    PosoSAgapo edited #2163
  • May 11 09:52
    PosoSAgapo opened #2163
  • May 10 12:38
    kagrze commented #2161
  • May 09 12:19
    kagrze commented #2161
  • May 09 09:58
    kagrze commented #2161
  • May 09 09:35
    kagrze commented #2161
  • May 08 12:25
    kagrze commented #2161
  • May 08 12:17
    kagrze commented #2161
  • May 08 12:09
    kagrze commented #2161
  • May 08 12:08
    kagrze commented #2161
Reza Fazeli
@rezasjourney
Hi - where can I find some info on copy_attn and coverage_attn. I am not quiet sure what these options are and what is the theory behind them. Thanks
Vincent Nguyen
@vince62s
@geekygirl123 you need to give more context on what you are trying to do. I am not sure to follow.
François Hernandez
@francoishernandez
Reza Fazeli
@rezasjourney
@francoishernandez amazing, thanks! I guess all these parameters in the Generator section are only relevant for summarization. Is that correct? And not something relevant for translation?
François Hernandez
@francoishernandez
yes
Vincent Nguyen
@vince62s
Just be aware that our implementation slightly differs from Abi See's.
Reza Fazeli
@rezasjourney
Perfect, thanks folks!
geekygirl123
@geekygirl123
I have multiple questions regarding copy mechanism implemented in Opennmt toolkit.
1) "Since we are using copy-attention [1] in the model, we need to preprocess the dataset such that source and target are aligned and use the same dictionary. " .This is a line from the readme . What does alignment between source and target words mean?
2) Has anyone tried copy mechanism with transformer architecture? If yes how was the performance?
Reza Fazeli
@rezasjourney
Hi folks. quick question. I'm assuming OpenNMT loads the model into memory for every translation. Is there a way to keep the model in memory to translate faster? I'm running translations on CPU
Also is there a way to make sure the model is using all CPU cores? I tried torch.set_num_threads(16) but didn't see any improvements. I'm running translation on a machine with multiple CPU cores
François Hernandez
@francoishernandez
Hi @rezasjourney
Did you have a look at the REST server? (https://forum.opennmt.net/t/simple-opennmt-py-rest-server/1392)
As for number of threads you might want to try the OMP_NUM_THREADS environment varibale.
İshak DÖLEK
@ishakdolek
Hi, I have preproceesed and trainned data with opennmt-py according to quickStart page. (https://opennmt.net/OpenNMT-py/quickstart.html) and generated some model (demo_model_step.xxxx.pt) . Now I want to use this model for predictions without onmt_translate. I created web appliaction and installed opennmt-py . I just used this model for some sentence predictions. How can I do this ? thanks in advance.
François Hernandez
@francoishernandez
This is probably what you're looking for: https://forum.opennmt.net/t/simple-opennmt-py-rest-server/1392
İshak DÖLEK
@ishakdolek
is it possible Char2Char translation with openNMT ?
François Hernandez
@francoishernandez
Not sure if you're referring to a specific model or architecture. If you just want to use a character level vocab rather than a word/subword level, you can probably just tokenize your data accordingly and run a classic pipeline.
İshak DÖLEK
@ishakdolek
@francoishernandez thank you.
Gaurav Ghati
@gauravghati
Hey all, I'm new to openNMT, and trying to run train the model by command given in README>me of data folder "python train.py -data data/data -save_model /n/rushlab/data/tmp -world_size 1 -gpu_ranks 0 -rnn_size 100 -word_vec_size 50 -layers 1 -train_steps 100 -optim adam -learning_rate 0.001", I'm getting acc 0, what should I do?
MinJune Kim
@qria
@qria
Hi, I'm a newbie trying to train a NMT model for Korean-English. I have a question about the amount of data it needs. Of course it won't be set in stone but I'm guessing you have a hunch of how much data it will need for it to be decent. I have 1.6M parallel sentence set. Will this be enough or do I have to scour the web for more?
Currently training with openNMT default setting (LSTM encoder/decoder w/ 500 hidden units) btw, probably will look into transformer models later
Vincent Nguyen
@vince62s
it's ok to start.
MinJune Kim
@qria
Thanks for the answer. I guess that means I'll need to focus on tuning the model because the result wasn't very impressive
cemyr
@cemyr_gitlab
Hi everyone, great to be here...
Ghost
@ghost~5ef9ef38d73408ce4fe8397f
Hi Geeks,
I'm going to preprocess data for handwritten Mathematcal expression recognization on images but i'm not understnading "--share_vocab, -share_vocab" this
please help me get idea about this argument.
Vincent Nguyen
@vince62s
This is only NMT type tasks. We share the source and target vocab. Not applicable to your task.
Isaac Ng
@isaacngcs
Hi, what arguments should I run onmt_preprocess with if I am training without parallel data?
Hobson Mokaya
@Atuti
Hi, how can I know that the training of the model is over. I have managed to preprocess the datasets and even run the train command, but I am not sure if the training is over. are there any files other than the '.vocab.pt', '.train.pt', and 'valid.pt', that I can check for to ascertain that the training is over.
François Hernandez
@francoishernandez
It should have saved some checkpoints using the base path you provided in -save_model. Also, you can check the logs of your training execution.
Hobson Mokaya
@Atuti
@francoishernandez thank you.
VedantParikh
@Vedant-06

Hi, I was using OpenNMT for English to Gujarati Translation. I used sentence piece transform for Gujarati Corpus. I trained the model for 70k sentences. But when I use translate.py for the output and printed out the verbose, I found that most of the subwords were being mapped to the <unk> tag. Eg.

"""
[2020-11-30 12:07:40,417 INFO]
SENT 1: ['but', 'some', 'really', 'good', 'work', 'is', 'being', 'done', 'around', 'us', ',', 'in', 'our', 'society', '.', 'and', 'all', 'this', 'has', 'been', 'possible', 'through', 'the', 'collective', 'efforts', 'of', 'a', '130', 'crore', 'countrymen', '.']
PRED 1: ▁છત <unk> <unk> ▁કરવા . . . . ▁સમગ્ર ▁ચ વ ર્ક ી સુર ક્ષ િત ▁અને ▁સમગ્ર ત ▁વધાર ો ▁છે ▁.
PRED SCORE: -30.2231
GOLD 1: <unk> <unk> <unk> <unk> <unk> <unk> <unk> આપણી <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> તે <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> .
GOLD SCORE: -674.3291

[2020-11-30 12:07:40,417 INFO]
SENT 2: ['this', 'can', 'pave', 'a', 'new', 'way', 'to', 'serve', 'the', 'purpose', 'of', 'ek', 'bharat', 'shresht', 'bharat', 'abhiyan', ',', 'ultimately', 'providing', 'a', 'great', 'boost', 'to', 'india’s', 'tourism', 'development', '.']
PRED 2: ▁સરપંચ ▁છું ▁ , ▁વિમુદ્રીકરણ ▁ <unk> ▁ , ▁ડેરી ▁ઉદ્યોગ નું ▁ઉદ્ઘાટન ▁કરવું ▁ , ▁ડેરી ઓ ▁ ,
PRED SCORE: -21.4394
GOLD 2: <unk> એક ભારત , શ્રેષ્ઠ ભારત <unk> <unk> પૂર્ણ <unk> <unk> માર્ગ <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> <unk> .
GOLD SCORE: -431.0326
"""

So is there any specific format, the input has to be given. Please guide me with this issue.
Thanks in advance.

Here GOLD Sentences are target gorund truth sentences.

VedantParikh
@Vedant-06
@francoishernandez
François Hernandez
@francoishernandez
Please do not multi-post. Discussion happening here: OpenNMT/OpenNMT-py#1954
Ze Xuan Ong
@ongzexuan
in the new data processing pipeline, what exactly does build-vocab do? Looking at the output, it seems like it maps vocab words to indices, but this mapping doesn't seem to be unique i.e. multiple words seem to share the same index
using the toy example in the quickstart, my example_vocab.src has the following snippet:
products 117 still 117 market 116 Hotel 116 see 115 great 114 today 114 through 114 against 112 rights 112 That 111 believe 111 therefore 110 under 110 case 109 same 109 But 109 offer 109
Ze Xuan Ong
@ongzexuan
ok never mind I should have noticed that the code wrote "Counter" and that these were counts and not indices
Megha Jain
@meghajain-1711
Hi everyone, I recently started exploring the OpenNMT-py library and was wondering if it supports splitting the dataset into train/valid/test sets or is it something we should preprocess earlier in our system ?
I understood we can specify it in the config file to be passed to build_vocab. Any help / link to appropriate doc is appreciated :)
François Hernandez
@francoishernandez
No it's not, you should do it before hand
Megha Jain
@meghajain-1711
Thanks @francoishernandez !
Megha Jain
@meghajain-1711
I had a few questions related to the REST Server as well. The server.py stated in the Documentation is showing as unavailable. Is there any upgrade in the server as well with the library upgrade ?
François Hernandez
@francoishernandez

I had a few questions related to the REST Server as well. The server.py stated in the Documentation is showing as unavailable. Is there any upgrade in the server as well with the library upgrade ?

I don't understand. Post an issue on the repo with exact command and error trace.

nashid
@nashid
preprocess.py does the tokenization step? OR the preprocessing steps lile splitting a given string by delimiters, multiple spaces, tabs are handled the preprocess.py?
François Hernandez
@francoishernandez
preprocess does not apply any tokenization, it just takes text data files and dump them in a more convenient format for training.
You need to apply tokenization before hand.
That being said, preprocess is no longer necessary since 2.0
nashid
@nashid
@francoishernandez ok. Can you please refer me to the last stable version with preprocess.py script?
Current "main" in the git repo does not have preprocess.py
nashid
@nashid
I was tryign to use https://github.com/OpenNMT/OpenNMT-py/tree/1.2.0 for last many hours

Note:

some features require Python 3.5 and after (eg: Distributed multigpu, entmax)
we currently only support PyTorch 1.4

So readme refers to "PyTorch 1.4" and setup.py is saying "torch>=1.6.0"
:-(
At the end, failing with " File "/root/miniconda3/envs/open-nmt-env/lib/python3.7/site-packages/torch-1.8.1-py3.7-linux-x86_64.egg/torch/multiprocessing/reductions.py", line 312, in reduce_storage
metadata = storage._sharefilename()
RuntimeError: error executing torch_shm_manager at "/root/miniconda3/envs/open-nmt-env/lib/python3.7/site-packages/torch-1.8.1-py3.7-linux-x86_64.egg/torch/bin/torch_shm_manager" at /pytorch/torch/lib/libshm/core.cpp:99
"