简体   繁体   中英

save gensim doc2vec trained model on google colab

I am training text data using gensim doc2vec model on google colab repository GPU runtime, and want to save trained model in test.d2v file. following is code snippet

T = [TaggedDocument(doc, [i]) for i, doc in enumerate(data['info'])]
model = Doc2Vec(T,alpha=.025, min_alpha=.025, min_count=1)
model.save('test.d2v')

Following error is generated in colab notebook.

** /usr/local/lib/python3.6/dist-packages/smart_open/smart_open_lib.py:253: UserWarning: This function is deprecated, use smart_open.open instead. See the migration notes for details: https://github.com/RaRe-Technologies/smart_open/blob/master/README.rst#migrating-to-the-new-open-function 'See the migration notes for details: %s' % _MIGRATION_NOTES_URL

A warning isn't necessarily an error, especially one that's just mentioning a 'deprecation'. Does your save file work? If so, it's safe to ignore this warning. See a prior answer for more details.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM