question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

from elmoformanylangs import Embedder

See original GitHub issue

from elmoformanylangs import Embedder

in this line, i got error like this

TypeError: Highway.forward: input must be present

Can anyone help me?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:9

github_iconTop GitHub Comments

7reactions
palebootcommented, May 14, 2021

So this is how I managed to get it to work on Colab. Keep in mind that this is just a naive attempt to debug using informations from the traceback that I got. I am by no means experienced in pytorch, so I don’t really know any implications that this will cause. YMMV

  1. Clone the repo as per usual
  2. Open ELMoForManyLangs/elmoformanylangs/modules/highway.py
  3. Edit line 47-48:
47     def forward(self, inputs: torch.Tensor) -> torch.Tensor:  # pylint: disable=arguments-differ
48         current_input = inputs

to

47    def forward(self, *input: torch.Tensor) -> None:  # pylint: disable=arguments-differ
48        current_input = input[0]
  1. Install via pip: pip install -e ELMoForManyLangs/
3reactions
palebootcommented, May 19, 2021

Turns out the culprit is simpler than I thought; the addition of signature check in overrides v5.0.0. The fix is simply by adding check_signature=False in line 46 of ELMoForManyLangs/elmoformanylangs/modules/highway.py:

46    @overrides(check_signature=False)

I’ve opened PR #96 as a permanent fix, hopefully it gets merged.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why i getting Highway.forward: `input` must be present ...
I am trying to use ELMoForManyLangs programmatically, by using Embedder python object. from elmoformanylangs import Embedder e ...
Read more >
simple-elmo
Simple_elmo is a Python library to work with pre-trained ELMo embeddings in TensorFlow. This is a significantly updated wrapper to the original ELMo ......
Read more >
ELMoForManyLangs | ELMo representations trained on many ...
Implement ELMoForManyLangs with how-to, Q&A, fixes, code snippets. kandi ratings - Low support, No Bugs, ... from elmoformanylangs import Embedder e ...
Read more >
kernel2fd6368435
import ELMoForManyLangs.elmoformanylangs as elmo ... Elmo menghasilkan embedding ala Word2Vec, tetapi embedding kata tersebut juga berdasarkan kata-kata di ...
Read more >
Jsondecodeerror: expecting value: line 1 column 1 (char 0)
So i use ELMoForManyLangs for my NLP task. ... "valid_size": 0, "eval_steps": 10000}' import ELMoForManyLangs.elmoformanylangs as elmo
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found