So I am developing a NLP Python script and when I try to run in my Kubuntu partition ( I have a dual partition with Windows 10) it takes some time to load the data and finally, it shows a KILLED message and the program stops. This only happens in the Kubuntu partition, but not in the Windows one.

The script:

EMBEDDING_FILE_LINUX = '/home/eneko98/embeddings/GoogleNews-vectors-negative300.bin'
word2vec = KeyedVectors.load_word2vec_format(EMBEDDING_FILE_LINUX, 
print('Embedding loaded to memory')
query = f"SELECT word1, word2, word3 FROM NLPApp_wordtable WHERE session_ID=1"
var = cursor.fetchone()
columns = []
[columns.append(e) for e in var]
word1 = str(columns[0])
word2 = str(columns[1])
word3 = str(columns[2])

def for_word_different(word1, word2, word3):
    doesnt_match = word2vec.doesnt_match([word1, word2, word3])
    print("The word that doesn't match is: " + doesnt_match)
    return doesnt_match

This is what dmesg shows: Out of memory: Killed process 6513 (python3) total-vm:12567468kB, anon-rss:4992024kB, file-rss:4kB, shmem-rss:0kB, UID:1000 pgtables:22188kB oom_score_adj:0

For some reason, although I have 8GB of RAM in my laptop, Kubuntu only shows 5.7GB, my Laptop is an Acer Swift 3 SF-14. Help is much appreciated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.