Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in running ./download_models.sh #58

Open
YukeWang96 opened this issue May 23, 2023 · 3 comments
Open

Error in running ./download_models.sh #58

YukeWang96 opened this issue May 23, 2023 · 3 comments

Comments

@YukeWang96
Copy link

Hi,

When I execute ./download_models.sh, encounter the following problem

lowercase models
OpenAI GPT
BERT BASE LOWERCASED
BERT LARGE LOWERCASED
cased models
Transformer XL
ELMO ORIGINAL 5.5B
ELMO ORIGINAL
BERT BASE CASED
BERT LARGE CASED
Building common vocab
Better speed can be achieved with apex installed from https://www.github.com/nvidia/apex.
Traceback (most recent call last):
  File "lama/vocab_intersection.py", line 7, in <module>
    from lama.modules import build_model_by_name
  File "/data/datasets/yuke/LAMA/lama/modules/__init__.py", line 8, in <module>
    from .elmo_connector import Elmo
  File "/data/datasets/yuke/LAMA/lama/modules/elmo_connector.py", line 10, in <module>
    from allennlp.modules.elmo import _ElmoBiLm #, Elmo as AllenNLP_Elmo
  File "/home/yuke_wang/anaconda3/envs/lama37/lib/python3.7/site-packages/allennlp/modules/__init__.py", line 9, in <module>
    from allennlp.modules.elmo import Elmo
  File "/home/yuke_wang/anaconda3/envs/lama37/lib/python3.7/site-packages/allennlp/modules/elmo.py", line 20, in <module>
    from allennlp.modules.highway import Highway
  File "/home/yuke_wang/anaconda3/envs/lama37/lib/python3.7/site-packages/allennlp/modules/highway.py", line 12, in <module>
    class Highway(torch.nn.Module):
  File "/home/yuke_wang/anaconda3/envs/lama37/lib/python3.7/site-packages/allennlp/modules/highway.py", line 49, in Highway
    def forward(self, inputs: torch.Tensor) -> torch.Tensor:  # pylint: disable=arguments-differ
  File "/home/yuke_wang/anaconda3/envs/lama37/lib/python3.7/site-packages/overrides/overrides.py", line 83, in overrides
    return _overrides(method, check_signature, check_at_runtime)
  File "/home/yuke_wang/anaconda3/envs/lama37/lib/python3.7/site-packages/overrides/overrides.py", line 170, in _overrides
    _validate_method(method, super_class, check_signature)
  File "/home/yuke_wang/anaconda3/envs/lama37/lib/python3.7/site-packages/overrides/overrides.py", line 189, in _validate_method
    ensure_signature_is_compatible(super_method, method, is_static)
  File "/home/yuke_wang/anaconda3/envs/lama37/lib/python3.7/site-packages/overrides/signature.py", line 113, in ensure_signature_is_compatible
    method_name,
  File "/home/yuke_wang/anaconda3/envs/lama37/lib/python3.7/site-packages/overrides/signature.py", line 220, in ensure_all_positional_args_defined_in_sub
    raise TypeError(f"{method_name}: `{super_param.name}` must be present")
TypeError: Highway.forward: `input` must be present

Is there any solution to this? Thanks!

@pardeep889
Copy link

pardeep889 commented Aug 17, 2023

The traceback indicates that there's an issue related to the usage of the Highway module from the allennlp library. The error message "Highway.forward: input must be present" suggests that there's a missing input argument when calling the forward method of the Highway module.

Without more context and details about the specific code and its purpose, it's a bit challenging to provide a specific solution. However, the error indicates that you need to ensure that the required input argument is provided when calling the forward method of the Highway module. Double-check the code where this module is being used and make sure that all necessary input parameters are correctly provided.

@RafoSoc
Copy link

RafoSoc commented Nov 14, 2023

Hi, I managed to solve this problem by commenting out lines 8 and 21 of the init.py file which is in the modules directory, shown in the figure below.

Screenshot_20231114_124716

@LeeSomm
Copy link

LeeSomm commented Jun 28, 2024

An alternative method is to deprecate the installation of overrides.
pip uninstall overrides
pip install overrides==3.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants