Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 02 10:50
    l-k-11235 closed #2177
  • Aug 02 10:50
    l-k-11235 synchronize #2177
  • Aug 02 10:18
    francoishernandez converted_to_draft #2177
  • Aug 02 10:13
    l-k-11235 opened #2177
  • Jul 29 11:00
    kyduff commented #2176
  • Jul 27 17:51
    kyduff synchronize #2176
  • Jul 26 17:59
    kyduff edited #2176
  • Jul 26 17:59
    kyduff opened #2176
  • Jul 26 16:51
    kyduff commented #1857
  • Jul 18 10:35
    markovalexander commented #2175
  • Jul 18 10:22
    solemn-leader edited #2175
  • Jul 18 10:22
    solemn-leader edited #2175
  • Jul 18 10:20
    solemn-leader opened #2175
  • Jul 18 09:26
    guillaumekln commented #2173
  • Jul 18 08:15
    vince62s commented #2173
  • Jul 18 07:41
    guillaumekln commented #2173
  • Jul 17 12:49
    vince62s commented #2173
  • Jul 17 12:48
    vince62s commented #2173
  • Jul 15 08:33
    guillaumekln closed #2174
  • Jul 15 08:33
    guillaumekln commented #2174
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
"
nashid
@nashid
OpenNMT cannot find GPU resources. Any help is welcome.

I can see pytorch can find GPU resources.

>>> torch.cuda.is_available()
True
>>> torch.cuda.current_device()
0
>>> torch.cuda.device(0)
<torch.cuda.device object at 0x7f8c0a3cec50>
>>> torch.cuda.device_count()
1
>>> torch.cuda.get_device_name(0)
'NVIDIA Tesla K80'
>>> torch.cuda.get_device_name(0)
'NVIDIA Tesla K80'

However, OpenNMT is not finding the GPU resource. What is going on here?
I am using OpenNMT from https://github.com/OpenNMT/OpenNMT-py/tree/1.2.0

Traceback (most recent call last):
  File "../../OpenNMT-py/train.py", line 6, in <module>
    main()
  File "/root/work/context/huggingface-models/OpenNMT-py/onmt/bin/train.py", line 197, in main
    train(opt)
  File "/root/work/context/huggingface-models/OpenNMT-py/onmt/bin/train.py", line 91, in train
    p.join()
  File "/root/miniconda3/envs/open-nmt-env/lib/python3.7/multiprocessing/process.py", line 140, in join
    res = self._popen.wait(timeout)
  File "/root/miniconda3/envs/open-nmt-env/lib/python3.7/multiprocessing/popen_fork.py", line 48, in wait
    return self.poll(os.WNOHANG if timeout == 0.0 else 0)
  File "/root/miniconda3/envs/open-nmt-env/lib/python3.7/multiprocessing/popen_fork.py", line 28, in poll
    pid, sts = os.waitpid(self.pid, flag)
  File "/root/work/context/huggingface-models/OpenNMT-py/onmt/bin/train.py", line 181, in signal_handler
    raise Exception(msg)
Exception: 

-- Tracebacks above this line can probably
                 be ignored --

Traceback (most recent call last):
  File "/root/work/context/huggingface-models/OpenNMT-py/onmt/bin/train.py", line 135, in run
    gpu_rank = onmt.utils.distributed.multi_init(opt, device_id)
  File "/root/work/context/huggingface-models/OpenNMT-py/onmt/utils/distributed.py", line 27, in multi_init
    world_size=dist_world_size, rank=opt.gpu_ranks[device_id])
  File "/root/miniconda3/envs/open-nmt-env/lib/python3.7/site-packages/torch/distributed/distributed_c10d.py", line 510, in init_process_group
    timeout=timeout))
  File "/root/miniconda3/envs/open-nmt-env/lib/python3.7/site-packages/torch/distributed/distributed_c10d.py", line 603, in _new_process_group_helper
    timeout)
RuntimeError: ProcessGroupNCCL is only supported with GPUs, no GPUs found!
François Hernandez
@francoishernandez
So readme refers to "PyTorch 1.4" and setup.py is saying "torch>=1.6.0"
Trust the latest information, which is setup.py -- the readme was probably not updated when upgrading for 1.6 support
For your GPU issue, I don't know, never seen it. Maybe create a detailed issue on github with your setup, commands, etc.
Peng Shi
@shipengAlan
Hi everyone. I try to do some experiments by customizing Transfomer. Does OpenNMT-py support this ? And how I can do that ? Thanks a lot
ANASUA BANERJEE
@anasua123:matrix.org
[m]
Hi everyone. I try to execute the preprocess part but it throws an error "No module named 'onmt.bin.preprocess'" and if i installed the omnt then it is showing another error . can anyone plz guide me how to resolve this one
François Hernandez
@francoishernandez
@anasua123:matrix.org the whole preprocess logic has been removed since 2.0. Check the docs for quickstart and some more comprehensive examples: https://opennmt.net/OpenNMT-py/quickstart.html
bcabgil
@bcabgil
Hello! Is it possible to build a text classification model from a pre trained bert sequence to sequence translation model using openNMT-py? Is there a way to get the outputs of a specific layer of the pre-trained model instead of the translated sequence?
Suzenne
@Suzenne
Why I got a very low bleu score (bleu1 is around 2.9 ) ,using an about 180 thousand en-zh corpus to train the model with the config is consist of quick-start and config-transformer-base-1GPU.yaml ? Is there something wrong ?
πόσο σ' αγαπώ.
@PosoSAgapo
Why the model behaves differently in training and tranlsation? Even translation on the training dataset cannot give the same performance when the model is training, like the model gets 70% on training, after training, using the model to translate the train set, the accuracy is just 30%.
Guillaume Klein
@guillaumekln
Suzenne
@Suzenne
What's the meaning of these weights?
76c2f8ce25967709c248e1765cc5658.png
Karen Lastmann Assaraf
@karen.lastmannassaraf_gitlab
Hi!
Did someone already converted an opennmt self attention encoder-decoder to a hugging face transformer?
Thanks!
1190301804
@1190301804
does Opennmt support the simultaneous translation just like fairseq ?
Guillaume Klein
@guillaumekln
No, it does not.
neenaloysius
@neenaloysius
I need to run the Multi-Unit Transformer https://github.com/ElliottYan/Multi_Unit_Transformer. Tht repo suggests to use the preprocessing in OpenNMT and expects vocab.pt file. But now vocab.pt file is not generated as per the latest NMT version. can anyone please help
James
@JOHW85

https://huggingface.co/blog/constrained-beam-search

Wonder if this can be implemented in OpenNMT/Ctranslate?

Guillaume Klein
@guillaumekln
Maybe. Can you open a feature request in the CTranslate2 GitHub repository? Make sure to specify what should be implemented from this blog post and add the relevant links/papers. Thanks.
James
@JOHW85
OpenNMT/CTranslate2#739
I've posted a feature request
neo
@code2graph

For a Neural Machine Translation (NMT) task, my input data has relational information. Probably I can use Graph Neural Network (GNN) and use a Graph2Seq model. But I can't find a good generational model for GNN.

So I want to use a Transformer model. But then the massive problem is how can I embed structural information in a Transformer? Is there any open source artefact for Relational Transformer that I can use out of the box?

neo
@code2graph
I read to alleviate the problem of Out of Vocabulary (OOV), there are two techniques:
  1. BPE
  2. Copy mechanism
    It appears to me they are two orthogonal approaches. Can we combine the two, i.e., we use both the copy mechanism and BPE? Are there any work out there that combines the two? I cant find any.
neo
@code2graph
Anyone have a pointer regarding BPE and copy mechanism. Please help.