You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running python command/inference/get_embedding.py, I got an error.
Traceback (most recent call last):
File "command/inference/get_embedding.py", line 52, in <module>
emb0 = loaded(sample0_emb, features_only=True)[0]['features']
File "/usr/local/miniconda3/envs/trex/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
torch.jit.Error: The following operation failed in the TorchScript interpreter.
Traceback of TorchScript, serialized code (most recent call last):
File "code/__torch__/fairseq/modules/trex_encoder.py", line 252, in forward
else:
pass
ops.prim.RaiseException(_44)
~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
return _45
class ByteCombineCNN(Module):
Traceback of TorchScript, original code (most recent call last):
File "/data/binVul/trex-main/fairseq/modules/trex_encoder.py", line 166, in forward
if self.layernorm_embedding is not None:
x = self.layernorm_embedding(x)
~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
x = self.dropout_module(x)
if self.quant_noise is not None:
RuntimeError: This Python function is annotated to be ignored and cannot be run
The text was updated successfully, but these errors were encountered:
is trying to load the jit model saved by TorchScript, but it is not saved (by line 12 and 13). I have now commented that out and made line 15 temporarily available. Try again?
Hi @peikexin9, I have finetuned a model by using the script
./command/finetune/finetune.sh
.get_embedding.py is modified as follows:
When running
python command/inference/get_embedding.py
, I got an error.The text was updated successfully, but these errors were encountered: