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

在运行示例代码时遇到错误,liveness info missing for vars: {'$phi66.0'} #7

Open
kevingeng opened this issue Nov 25, 2020 · 2 comments

Comments

@kevingeng
Copy link

kevingeng commented Nov 25, 2020

在--dataset=baidu或dianping数据集上运行训练名利时遇到如下错误:

RuntimeError: Failed in object mode pipeline (step: remove phis nodes) liveness info missing for vars: {'$phi66.0'}

错误源自numba,在如下位置触发:
File "/data/notebook/chinese-opinion-target-extraction/utils/preprocess.py", line 109, in construct_features features['char_tag'] = make_char_tag(features['word'], origin['ot'])

请问可以从那些方面尝试解决?谢谢。

详细错误如下:

(venv) [root@www chinese-opinion-target-extraction]# python main.py --mode=train --dataset=baidu
Using TensorFlow backend.
2020-11-25 13:45:40.301496: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /data/anaconda3/envs/spacynew/lib:
2020-11-25 13:45:40.301581: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Using dataset baidu
Loading Segment Model...
Model loaded succeed
Loading dictionary
Processing dataset/baidu/train.txt ...
5%|███▋ | 424/8533 [01:32<09:11, 14.71it/s]Traceback (most recent call last):
File "main.py", line 79, in
preprocess(dataset)
File "/data/notebook/chinese-opinion-target-extraction/utils/preprocess.py", line 156, in preprocess
for line in handle_data('dataset/%s/%s.txt' % (dataset_name, dataset_type)):
File "/data/notebook/chinese-opinion-target-extraction/utils/preprocess.py", line 142, in handle_data
tqdm(open(dataset, 'r', encoding='utf-8').readlines())]
File "/data/notebook/chinese-opinion-target-extraction/utils/preprocess.py", line 141, in
data = [construct_features(json.loads(line)) for line in
File "/data/notebook/chinese-opinion-target-extraction/utils/preprocess.py", line 109, in construct_features
features['char_tag'] = make_char_tag(features['word'], origin['ot'])
File "/data/notebook/chinese-opinion-target-extraction/venv/lib/python3.7/site-packages/numba/core/dispatcher.py", line 434, in _compile_for_args
raise e
File "/data/notebook/chinese-opinion-target-extraction/venv/lib/python3.7/site-packages/numba/core/dispatcher.py", line 367, in _compile_for_args
return self.compile(tuple(argtypes))
File "/data/notebook/chinese-opinion-target-extraction/venv/lib/python3.7/site-packages/numba/core/compiler_lock.py", line 32, in _acquire_compile_lock
return func(*args, **kwargs)
File "/data/notebook/chinese-opinion-target-extraction/venv/lib/python3.7/site-packages/numba/core/dispatcher.py", line 1004, in compile
is_lifted_loop=True,)
File "/data/notebook/chinese-opinion-target-extraction/venv/lib/python3.7/site-packages/numba/core/compiler.py", line 665, in compile_ir
norw_cres = compile_local(func_ir.copy(), norw_flags)
File "/data/notebook/chinese-opinion-target-extraction/venv/lib/python3.7/site-packages/numba/core/compiler.py", line 662, in compile_local
lifted_from=lifted_from)
File "/data/notebook/chinese-opinion-target-extraction/venv/lib/python3.7/site-packages/numba/core/compiler.py", line 373, in compile_ir
return self._compile_ir()
File "/data/notebook/chinese-opinion-target-extraction/venv/lib/python3.7/site-packages/numba/core/compiler.py", line 432, in _compile_ir
return self._compile_core()
File "/data/notebook/chinese-opinion-target-extraction/venv/lib/python3.7/site-packages/numba/core/compiler.py", line 405, in _compile_core
raise e
File "/data/notebook/chinese-opinion-target-extraction/venv/lib/python3.7/site-packages/numba/core/compiler.py", line 396, in _compile_core
pm.run(self.state)
File "/data/notebook/chinese-opinion-target-extraction/venv/lib/python3.7/site-packages/numba/core/compiler_machinery.py", line 341, in run
raise patched_exception
File "/data/notebook/chinese-opinion-target-extraction/venv/lib/python3.7/site-packages/numba/core/compiler_machinery.py", line 332, in run
self._runPass(idx, pass_inst, state)
File "/data/notebook/chinese-opinion-target-extraction/venv/lib/python3.7/site-packages/numba/core/compiler_lock.py", line 32, in _acquire_compile_lock
return func(*args, **kwargs)
File "/data/notebook/chinese-opinion-target-extraction/venv/lib/python3.7/site-packages/numba/core/compiler_machinery.py", line 291, in _runPass
mutated |= check(pss.run_pass, internal_state)
File "/data/notebook/chinese-opinion-target-extraction/venv/lib/python3.7/site-packages/numba/core/compiler_machinery.py", line 264, in check
mangled = func(compiler_state)
File "/data/notebook/chinese-opinion-target-extraction/venv/lib/python3.7/site-packages/numba/core/typed_passes.py", line 734, in run_pass
post_proc.run(emit_dels=False)
File "/data/notebook/chinese-opinion-target-extraction/venv/lib/python3.7/site-packages/numba/core/postproc.py", line 82, in run
vlt.deadmaps.combined)
File "/data/notebook/chinese-opinion-target-extraction/venv/lib/python3.7/site-packages/numba/core/utils.py", line 349, in get
res = instance.dict[self.name] = self.func(instance)
File "/data/notebook/chinese-opinion-target-extraction/venv/lib/python3.7/site-packages/numba/core/postproc.py", line 54, in deadmaps
self.usedefs.defmap)
File "/data/notebook/chinese-opinion-target-extraction/venv/lib/python3.7/site-packages/numba/core/analysis.py", line 180, in compute_dead_maps
raise RuntimeError(msg)
RuntimeError: Failed in object mode pipeline (step: remove phis nodes)
liveness info missing for vars: {'$phi66.0'}
5%|███▋ | 426/8533 [01:36<30:35, 4.42it/s]
(venv) [root@www chinese-opinion-target-extraction]#

@lsvih
Copy link
Collaborator

lsvih commented Nov 25, 2020

可能是 numba 更新过了,把用 numba 的地方注释掉就行了,虽然会慢一点但是不会有问题

@kevingeng
Copy link
Author

kevingeng commented Nov 27, 2020 via email

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

2 participants