cogcomp-nlp icon indicating copy to clipboard operation
cogcomp-nlp copied to clipboard

SRL taking too much memory

Open qiangning opened this issue 7 years ago • 1 comments

This is a follow-up issue from iss #656 . In #656 , I reported my observation that our pipeline would fail if one wanted to add Verb SRL via a computer with insufficient memory.

Some data points:

  • 16G Mac (my laptop). Fails.
  • 32G Ubuntu (my desktop). Fails.
  • 32G AWS Linux. Fails.
  • 32G Mac. Works. (Ben's laptop; thanks @Slash0BZ)
  • 64G AWS Linux. Works.
  • Our server, which usually have >100G. Works.

Originally, I thought this was due to the fact that our current Verb_SRL "unnecessarily" requires NER_CONLL, but now I realize:

  • Adding NER_CONLL isn't by mistake, since NER_CONLL is defined explicitly in the feature files. For example, see this line.
    • My first question is: is NER really critical for Verb SRL? @christos-c
    • To evaluate the importance of this NER feature for SRL myself, I have also tried to delete the ne embedding feature in all those feature files and also remove NER_CONLL from this line. Then I have tried to retrain the SRL model via this. However, the trainer failed with some missing TA views like DEPENDENCE:PARSE_STANFORD. @christos-c is there any obvious errors in my procesure?
  • Even if we managed to remove NER_CONLL from SRL, I guess the memory consumption of SRL wouldn't be significantly reduced. I tested myself and also confirmed with @yxd126 that NER_CONLL normally takes roughly 8G memory, which isn't the major reason why SRL is failing on machines with less than 32G memories. So I think the main problem resides in SRL itself.
    • @Slash0BZ Can you share your memory profiling result regarding this issue?
    • @christos-c Is our SRL supposed to be this memory extensive? I'm asking since I tried allennlp srl and it runs smoothly on an AWS machine with 16G memory. This is a critical problem for me since AWS machines with 64G memories are too expensive.

qiangning avatar Nov 09 '18 23:11 qiangning

(adding @SB299792458 to the thread since he's working on a new version of SRL)

danyaljj avatar Nov 09 '18 23:11 danyaljj