allennlp.commands.elmo doesn't exists anymore

Created on 19 Jun 2020  路  6Comments  路  Source: allenai/allennlp

Hi :)
last weak my code works on the colab. but now after I install allennlp I get an error on the following line.
from allennlp.commands.elmo import ElmoEmbedder
and the error is : ModuleNotFoundError: No module named 'allennlp.commands.elmo'
I searched this repository for ElmoEmbedder but none found.

bug

Most helpful comment

We removed the elmo command in v1.0. If you want to use the elmo command then you need to check out v0.9.0. We removed this command because elmo is becoming a bit old and we didn't think it made sense to continue supporting it as a top-level command.

What are you trying to do specifically? You might still be able to accomplish your goals in 1.0, but I'm not sure exactly what you're trying to do.

All 6 comments

We removed the elmo command in v1.0. If you want to use the elmo command then you need to check out v0.9.0. We removed this command because elmo is becoming a bit old and we didn't think it made sense to continue supporting it as a top-level command.

What are you trying to do specifically? You might still be able to accomplish your goals in 1.0, but I'm not sure exactly what you're trying to do.

I am just playing with the code which I took from https://github.com/ohyicong/glove_elmo/blob/master/main.py and using the output of this code for another network that I have created.

We removed the elmo command in v1.0. If you want to use the elmo command then you need to check out v0.9.0. We removed this command because elmo is becoming a bit old and we didn't think it made sense to continue supporting it as a top-level command.

version 0.9.0 worked fine. thx.

Hi,
How can I get the embed_sentence() functionality in v1.0 ?

Thanks!

That functionality does not exist in 1.0, although you could copy the code that provided this into your code without too much work. See https://github.com/allenai/allennlp/blob/v0.9.0/allennlp/commands/elmo.py#L213.

Great ! I'll give it a try.

My real goal is to get sentence embeddings in a bilm-tf environment, where I have incrementally trained an Elmo model.

Was this page helpful?
0 / 5 - 0 ratings