PaddlePaddle / PaddleHub

Awesome pre-trained models toolkit based on PaddlePaddle. (400+ models including Image, Text, Audio, Video and Cross-Modal with Easy Inference & Serving)【安全加固,暂停交互,请耐心等待】
https://www.paddlepaddle.org.cn/hub
Apache License 2.0
12.74k stars 2.07k forks source link

hub自动解压会报错? #2325

Open allenxln opened 6 months ago

allenxln commented 6 months ago

欢迎您反馈PaddleHub使用问题,非常感谢您对PaddleHub的贡献! 在留下您的问题时,辛苦您同步提供如下信息:

lac = hub.Module(name="lac") test_text = ["今天是个好天气。"]

results = lac.cut(text=test_text, use_gpu=False, batch_size=1, return_tag=True) print(results)

{'word': ['今天', '是', '个', '好天气', '。'], 'tag': ['TIME', 'v', 'q', 'n', 'w']}

然后就报错了。: 不知道源码是free了啥东西?

TIPS:我手动解压到 ~/.paddlehub/modules ,然后再跑就没报错了。是自动解压出了啥问题吗?

/home/ubuntu/miniconda3/envs/paddle_env/lib/python3.8/site-packages/_distutils_hack/init.py:26: UserWarning: Setuptools is replacing distutils. warnings.warn("Setuptools is replacing distutils.") Download https://bj.bcebos.com/paddlehub/paddlehub_dev/lac_2.4.0.zip [##################################################] 100.00% Decompress /home/ubuntu/.paddlehub/tmp/tmpb9b049u1/lac_2.4.0.zip free(): invalid pointer Aborted (core dumped) (paddle_env) (base) ubuntu@VM-12-2-ubuntu:~/.paddlehub$

w5688414 commented 6 months ago

我测了一下没什么问题,可能跟网络环境有关:

image