facebookresearch / DrQA

Reading Wikipedia to Answer Open-Domain Questions
Other
4.48k stars 898 forks source link

OSError: [Errno 12] Cannot allocate memory #120

Closed ankitraj999 closed 6 years ago

ankitraj999 commented 6 years ago

I am trying to implement DrQA code but I am getting OSError: can't allocate memory. when I run eval.py file in script/retriever. Process doesn't uses the full RAM memory as it shown by htop command.

$ python eval.py ankitdataset.txt 04/24/2018 12:11:33 PM: [ Reading data ... ] 04/24/2018 12:11:33 PM: [ Initializing ranker... ] 04/24/2018 12:11:33 PM: [ Loading /home/omnie/DrQA/scripts/retriever/data/wikipedia/docs-tfidf-ngram=2-hash=16777216-tokenizer=simple.npz ] 04/24/2018 12:21:06 PM: [ Ranking... ] Traceback (most recent call last): File "eval.py", line 144, in initargs=(tok_class, tok_opts, db_class, db_opts) File "/usr/lib/python3.5/multiprocessing/context.py", line 118, in Pool context=self.get_context()) File "/usr/lib/python3.5/multiprocessing/pool.py", line 168, in init self._repopulate_pool() File "/usr/lib/python3.5/multiprocessing/pool.py", line 233, in _repopulate_pool w.start() File "/usr/lib/python3.5/multiprocessing/process.py", line 105, in start self._popen = self._Popen(self) File "/usr/lib/python3.5/multiprocessing/context.py", line 267, in _Popen return Popen(process_obj) File "/usr/lib/python3.5/multiprocessing/popen_fork.py", line 20, in init self._launch(process_obj) File "/usr/lib/python3.5/multiprocessing/popen_fork.py", line 67, in _launch self.pid = os.fork() OSError: [Errno 12] Cannot allocate memory

How can I solve this problem?

dfenglei commented 6 years ago

You can add more memory to solve this problem.