bartvm / nmt

Neural machine translation
MIT License
2 stars 2 forks source link

Get rid of single-GPU code #36

Open bartvm opened 8 years ago

bartvm commented 8 years ago

Considering Platoon is supposed to have a small overhead of only 5%, I'm wondering if it's not better to get rid of nmt_single.py entirely and simply take the 5% when training on 1 GPU. The advantage is that we need to maintain a lot less code (every time changes are made to nmt_single.py they need to be ported to nmt_worker.py and vice versa now).

Are there any objections to this? @anirudh9119 @JinseokNam

anirudh9119 commented 8 years ago

Yeah, Definitely a good idea! Infact I have not deleted from my git tree :)

On Tuesday 16 February 2016, Bart van Merriënboer notifications@github.com wrote:

Considering Platoon is supposed to have a small overhead of only 5%, I'm wondering if it's not better to get rid of nmt_single.py entirely and simply take the 5% when training on 1 GPU. The advantage is that we need to maintain a lot less code (every time changes are made to nmt_single.py they need to be ported to nmt_worker.py and vice versa now).

Are there any objections to this? @anirudh9119 https://github.com/anirudh9119 @JinseokNam https://github.com/JinseokNam

— Reply to this email directly or view it on GitHub https://github.com/bartvm/nmt/issues/36.

"Respect needs to be earned, but honour is an attitude of the heart. Not everyone will earn your respect, but everyone deserves to be shown honour."

nouiz commented 8 years ago

Why you need to duplicate everything? I suppose some refactoring would remove this need.

On Tue, Feb 16, 2016 at 10:33 AM, Anirudh Goyal notifications@github.com wrote:

Yeah, Definitely a good idea! Infact I have not deleted from my git tree :)

On Tuesday 16 February 2016, Bart van Merriënboer < notifications@github.com> wrote:

Considering Platoon is supposed to have a small overhead of only 5%, I'm wondering if it's not better to get rid of nmt_single.py entirely and simply take the 5% when training on 1 GPU. The advantage is that we need to maintain a lot less code (every time changes are made to nmt_single.py they need to be ported to nmt_worker.py and vice versa now).

Are there any objections to this? @anirudh9119 https://github.com/anirudh9119 @JinseokNam https://github.com/JinseokNam

— Reply to this email directly or view it on GitHub https://github.com/bartvm/nmt/issues/36.

  • - Anirudh

"Respect needs to be earned, but honour is an attitude of the heart. Not everyone will earn your respect, but everyone deserves to be shown honour."

— Reply to this email directly or view it on GitHub https://github.com/bartvm/nmt/issues/36#issuecomment-184731260.

bartvm commented 8 years ago

Yeah, refactoring would get rid of most duplicate code, although you end up with a lot of small functions. It's just that I didn't find the time, and deleting the file only takes a second.

JinseokNam commented 8 years ago

I think such an overhead cost is acceptable as long as there is no performance difference between nmt_single.py and nmt_worker.py when using 1 GPU.