[英]Why i getting Highway.forward: `input` must be present when running : from elmoformanylangs import Embedder
I am trying to use ELMoForManyLangs programmatically, by using Embedder python object.我正在尝试通过使用 Embedder python object 以编程方式使用 ELMoForManyLangs。
from elmoformanylangs import Embedder
e = Embedder('/content/drive/MyDrive/ColabNotebooks/158', batch_size = 64)
When I run, I am getting the following error:当我运行时,我收到以下错误:
TypeError Traceback (most recent call last)
<ipython-input-11-e628da2114ae> in <module>()
----> 1 from elmoformanylangs import Embedder
2 # e = Embedder('/content/drive/MyDrive/ColabNotebooks/158', batch_size = 64)
10 frames
/usr/local/lib/python3.7/dist-packages/overrides/signature.py in ensure_all_positional_args_defined_in_sub(super_sig, sub_sig, super_type_hints, sub_type_hints, check_first_parameter, method_name)
193 if super_param.kind == Parameter.VAR_POSITIONAL:
194 if not sub_has_var_args:
--> 195 raise TypeError(f"{method_name}: `{super_param.name}` must be present")
196 continue
197 if (
TypeError: Highway.forward: `input` must be present
Do you have any suggestions to fix it?你有什么建议来解决它吗?
I had the same issue.我遇到过同样的问题。 It seems to be a problem related to overrides package.这似乎是与覆盖 package 相关的问题。 I solve downgrading the 'overrides' package in my virtual-env.我解决了在我的虚拟环境中降级“覆盖”package 的问题。 In particular I switched from overrides==6.0.1 to overrides==3.1.0.特别是我从 overrides==6.0.1 切换到 overrides==3.1.0。
So you should try to do:所以你应该尝试这样做:
pip uninstall overrides
pip install overrides==3.1.0
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.