Comments (47)
@rsennrich @pjwilliams @Avmb can you please guide .
from nematus.
from nematus.
thank you so much for your guidance. i also want to ask you one more doubt regarding translate.py . i was actually trying to only train the model for 10 epochs just to see how the model is actually working but i got this error
DataLossError (see above for traceback): Unable to open table file /home/sakhuja/experiment/nematus/model.npz: Data loss: file is too short to be an sstable: perhaps your file is in a different file format and you need to use a different restore operator?
[[Node: save/RestoreV2 = RestoreV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, ..., DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_INT32], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]]
i want to know why this error is occuring and also,
as, the maximum number of epochs you have set is 5000 but it takes a lot of time in training can you please suggest me how much epochs i should take for training to run this model. BEFORE I TOOK 350 EPOCHS, BUT as you are good at it so please provide me with some guidance.
thank you so much once again. 👍
from nematus.
i am using the same tensorflow version 1.8.0 for both saving and restoring the model still the error is coming.
and i also want to ask you in translate.py what is the input which we have to provide and output i made a output2.txt file
from nematus.
hey can you please help me with this . I am waiting for your reply.
thank you so much.
from nematus.
from nematus.
Thank you so much for your reply and concern.
The command which I wrote for training is :
jigyasa$ python nmt.py --source_dataset /Users/jigyasa/Desktop/thesis/code_generation_bpefiles/train/decldesc_train_bpe --target_dataset /Users/jigyasa/Desktop/thesis/code_generation_bpefiles/train/bodies_train_bpe --dictionaries /Users/jigyasa/Desktop/thesis/dataset_for_my_thesis/code_generation_nmt_dictionary/train/decldesc_train_bpe.json /Users/jigyasa/Desktop/thesis/dataset_for_my_thesis/code_generation_nmt_dictionary/train/bodies_train_bpe.json --valid_datasets /Users/jigyasa/Desktop/thesis/code_generation_bpefiles/validate/decldesc_valid_bpe /Users/jigyasa/Desktop/thesis/code_generation_bpefiles/validate/bodies_valid_bpe --model /Users/Jigyasa/Desktop/model.npz --max_epochs 350
I just created a file with touch command and named it as model.npz and I gave the path of this file as shown above.
please let me know if this is right or not .
Best Regards,
JIgyasa
from nematus.
touch
creates an empty file. If you created an empty file named model.npz
: why?
from nematus.
I created an empty file for a model so that all the things can store there in the model file .
And then i gave the path to that model .
Please suggest me then how to make a model file and then if not touch which command to use ?
Thank you
Regards
Jigyasa
from nematus.
@pjwilliams and @rsennrich please guide me.
Thank you
Best regards
Jigyasa
from nematus.
from nematus.
hi @pjwilliams thank you so much for your reply this means a lot. Actually firstly i did my training without giving any model but after some epochs around 200 maybe the error came that the model cannot store .. the model path not found. like that ... that is why i gave the model name model.npz with a path .
over there in the read me it is given to give the parameter --model path what does it really mean?
these two commands I added afterwards .. due to some errors..
--model /Users/Jigyasa/Desktop/model.npz --max_epochs 350
now as you suggest should I train the model again and without these two commands ?
and I also want to ask you one more question regarding the epochs that the max epochs set by you is 5000 . So, it is a lot and can take a lot of training time . can you please also tell me if I don't give any epoch how much time it can take for code generation task.? @rsennrich @pjwilliams
Best Regards,
Jigyasa Sakhuja
Eagerly waiting for your reply.
Thank you so much once again.
from nematus.
from nematus.
Thank you so much for your reply . As suggested by you i have run the desired command and now my training has started once again . I hope this time I don't get any error, but if I will get any I will update you once again regarding that.
Thank you so much once again @pjwilliams for your support and guidance , This means a lot.
Best Regards,
Jigyasa Sakhuja
from nematus.
hey @pjwilliams @rsennrich I have been training this model on code documentation dataset since past 6 days and I have reached only till 181 epochs and the last recent info was this.
INFO: [2018-08-08 16:46:23] Epoch: 177 Update: 25000 Loss/word: 1.57721595451 Words/sec: 170.468366283 Sents/sec: 3.5156388417
So, I want to know how much time the training can take because it is taking a lot of time .
and also is there any faster way to do the training . If yes please suggest as I have not even set the number of epochs as you told not do give any number of epochs while training this model.
Thank you once again. Waiting for your reply. :)
Best Regards,
Jigyasa Sakhuja
from nematus.
from nematus.
from nematus.
from nematus.
Hey i got the GPU access and I am running the Code on it 👍 . I hope it works for me now.
from nematus.
from nematus.
from nematus.
i am working on code generation dataset (code-docstring-corpusp) provided by @rsennrich in automated python code generation and code documentation . I Have not generated my own dataset.
Please tell me is the dataset alryt? @rsennrich @pjwilliams
best regards,
Jigyasa Sakhuja
from nematus.
automatic code generation / documentation is more difficult than translation, so the high validation loss is no big surprise. Maybe @Avmb has his own numbers for comparison.
from nematus.
okay @rsennrich thank you for your guidance
from nematus.
hi @pjwilliams @rsennrich as i told you that i am done with my training but i am not able to run translate.py. whenever i run it i get an error as nematus creates a lot of model and we have to take the model with the best validation loss .
so can you please guide me how to actually go forward with this:
these were the models which i got after the training and i did my training as you told . Now please can you tell me how to proceed further because when i am giving this command it is giving me an error
from nematus.
<img width="567" alt="screen shot 2018-08-31 at 17 58 20" src="https://user-images.githubusercontent.com/37703929/44923088-7f033500-ad47-11e8-8992-de116898962b.png"
and when i gave my model as nematus it was running and i got this error ::
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "nematus/translate.py", line 150, in _start_worker
output_item = self._translate(process_id, input_item, models, sess)
File "nematus/translate.py", line 166, in _translate
x, x_mask, _, _ = prepare_data(x, y_dummy, maxlen=None)
File "/home/sakhuja/jigyasa_project/nematus-master/nematus/util.py", line 36, in prepare_data
n_factors = len(seqs_x[0][0])
IndexError: list index out of range
ERROR: Translate worker process 14340 crashed with exitcode 1
I do not know where i am going wrong can you please guide me @rsennrich @pjwilliams @Avmb
from nematus.
from nematus.
hi @pjwilliams i have taken the dataset of @Avmb and i have done the tokenization and Byte pair encoding of @rsennrich than i generated the datasets. I really want to know in the input and output what files we need to specify and what we need to specify in the -model as so many models are generated.
this is my source dataset that is the decdesc file for code generation this is my target dataset that is the body file@pjwilliams ,@Avmb and @rsennrich please have a look to my dataset :) and please let me know 👍
Thank you so much :)
from nematus.
your command looks fine; like Phil mentioned, translate.py would crash if empty lines are input, but this is now fixed in commit 3d97d78.
Note that, if you don't see any empty lines during training, the model won't necessarily learn what to do if it encounters empty input at test time.
from nematus.
<img width="570" alt="screen shot 2018-09-07 at 12 33 30" src="https://user-images.githubusercontent.com/37703929/45214277-4c52c280-b29a-11e8-844b-67662459c89d.png"
thank you for your updates @rsennrich after doing this i got this attribute error.Can you please see to it
from nematus.
from nematus.
@pjwilliams yes i made the modification as @rsennrich told me. According to that commit which he has shown me.So i have updated my translate.py file , util.py and nmt.py according to his before comment.
and i just tried to run another file score.py i got this result but nothing came in my output.txt file , it was blank
from nematus.
from nematus.
okay thank you so much :) i am doing that only now
from nematus.
hey @pjwilliams and @rsennrich I want to ask in translate.py in input and output what file we need to give ? i gave in input the test file of declation and description and i gave the bodies as output but i think this is not correct because in the ouput we will get the translations. So, can you please guide a little bit.
from nematus.
"--output" is the file path that you want to write to. The right "--input" depends on what type of translation system you trained: it should be the same type of text that you had on the source side at training time, preprocessed in the same way.
from nematus.
okay thank you so much :)
from nematus.
In score.py file i am getting the ouput for every sentence. For e.g. i am getting score like this
But my question is how to know about the result? @pjwilliams @rsennrich
Thank you :)
from nematus.
What do you mean by "how to know about the result"? Would you like to produce translations, or model scores?
from nematus.
i want to know about the score of the translation.. for ex BLEU score. So, that i can see what is the result .. output i mean
from nematus.
from nematus.
Thank you so much for helping. :) @pjwilliams
from nematus.
@pjwilliams in score.py file how is the scoring actually done? for ex: if i am getting score 231 for a line then what it means ? As you can see the result in output_score.txt
from nematus.
from nematus.
so basically the more the average, the better is the score. ryt? @pjwilliams
from nematus.
from nematus.
okay thank you so much :)
from nematus.
Related Issues (20)
- Docker: No module named 'rescore' HOT 1
- Throws error when running with rnn_dropout_embedding: true parameter HOT 5
- Load model from Opus-MT HOT 6
- how to map --external_validation_script option to the current nematus with tensorflow? HOT 4
- reimplement rnn of nematus
- How to continue training from the last checkpoint HOT 5
- Why use tie_encoder_decoder_embeddings instead of tie_decoder_embeddings in line 131 of transformer.py? HOT 3
- question about the self-attention in the Encoder HOT 2
- decoding in the Transformer-based model HOT 12
- Training stops after few epochs HOT 1
- beam search HOT 1
- translation_maxlen HOT 2
- Performance issues in the difinition of generate_initial_memories, nematus/transformer_inference.py HOT 1
- OP_REQUIRES failed at strided_slice_op.cc:108 : Invalid argument: slice index -1 of dimension 1 out of bounds. HOT 2
- Config mrt_ml_mix seems to be unused HOT 1
- TensorArray Not Used on line 240 of mrt_utils.py
- multiple models (with same vocabulary) for ensemble decoding HOT 2
- None exception HOT 4
- Question about running on GPU HOT 3
- A request for system version updates HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nematus.