PaddlePaddle / PaddleCloud

PaddlePaddle Docker images and K8s operators for PaddleOCR/Detection developers to use on public/private cloud.
Apache License 2.0
283 stars 76 forks source link

paddlenlp 镜像报错 #711

Open hezhiyang2000 opened 1 year ago

hezhiyang2000 commented 1 year ago

docker pull paddlecloud/paddlenlp:develop-cpu-78ee06 后使用镜像 docker run -it paddlecloud/paddlenlp:develop-cpu-78ee06 bash 执行命令 python import paddlenlp 出现错误 λ 36ba362fb6bd /home/PaddleNLP ipython Python 3.7.13 (default, Apr 24 2022, 01:04:09) Type 'copyright', 'credits' or 'license' for more information IPython 7.34.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import paddlenlp grep: warning: GREP_OPTIONS is deprecated; please use an alias or script /usr/local/lib/python3.7/dist-packages/pkg_resources/init.py:121: DeprecationWarning: pkg_resources is deprecated as an API warnings.warn("pkg_resources is deprecated as an API", DeprecationWarning) /usr/local/lib/python3.7/dist-packages/pkg_resources/init.py:2870: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('mpl_toolkits'). Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages declare_namespace(pkg) /usr/local/lib/python3.7/dist-packages/pkg_resources/init.py:2870: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('google'). Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages declare_namespace(pkg) /usr/local/lib/python3.7/dist-packages/pkg_resources/init.py:2870: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('zope'). Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages declare_namespace(pkg) /usr/local/lib/python3.7/dist-packages/_distutils_hack/init.py:33: UserWarning: Setuptools is replacing distutils. warnings.warn("Setuptools is replacing distutils.")

ModuleNotFoundError Traceback (most recent call last)

in ----> 1 import paddlenlp /home/PaddleNLP/paddlenlp/__init__.py in 33 import paddle 34 ---> 35 from . import ( 36 data, 37 dataaug, /home/PaddleNLP/paddlenlp/dataaug/__init__.py in 15 from .base_augment import FileAugment 16 from .char import * ---> 17 from .sentence import * 18 from .word import * /home/PaddleNLP/paddlenlp/dataaug/sentence.py in 15 import paddle 16 ---> 17 from ..taskflow import Taskflow 18 from ..transformers import ( 19 AutoModelForCausalLM, /home/PaddleNLP/paddlenlp/taskflow/__init__.py in 13 # limitations under the License. 14 ---> 15 from .taskflow import Taskflow /home/PaddleNLP/paddlenlp/taskflow/taskflow.py in 36 from .sentiment_analysis import SentaTask, SkepTask, UIESentaTask 37 from .text2text_generation import ChatGLMTask ---> 38 from .text_classification import TextClassificationTask 39 from .text_correction import CSCTask 40 from .text_feature_extraction import TextFeatureExtractionTask /home/PaddleNLP/paddlenlp/taskflow/text_classification.py in 24 25 from ..data import DataCollatorWithPadding ---> 26 from ..prompt import ( 27 AutoTemplate, 28 PromptDataCollatorWithPadding, /home/PaddleNLP/paddlenlp/prompt/__init__.py in 13 # limitations under the License. 14 ---> 15 from .prompt_args import * 16 from .prompt_model import * 17 from .prompt_tokenizer import * /home/PaddleNLP/paddlenlp/prompt/prompt_args.py in 15 from dataclasses import dataclass, field 16 ---> 17 from ..trainer import TrainingArguments 18 from ..utils.log import logger 19 /home/PaddleNLP/paddlenlp/trainer/__init__.py in 16 from .training_args import * 17 from .compression_args import * ---> 18 from .trainer import * 19 from .trainer_callback import * 20 from .trainer_utils import * /home/PaddleNLP/paddlenlp/trainer/trainer.py in 46 47 from ..data import DataCollator, DataCollatorWithPadding, default_data_collator ---> 48 from ..peft import LoRAModel, PrefixModelForCausalLM 49 from ..transformers.model_utils import PretrainedModel, _add_variant, unwrap_model 50 from ..transformers.tokenizer_utils import PretrainedTokenizer /home/PaddleNLP/paddlenlp/peft/__init__.py in 13 # limitations under the License. 14 ---> 15 from .lora import LoRAConfig, LoRAModel 16 from .prefix import PrefixConfig, PrefixModelForCausalLM /home/PaddleNLP/paddlenlp/peft/lora/__init__.py in 14 15 from .lora_config import LoRAConfig ---> 16 from .lora_layers import ( 17 ColumnParallelLoRALinear, 18 ColumnParallelLoRAMergedLinear, /home/PaddleNLP/paddlenlp/peft/lora/lora_layers.py in 19 import paddle.nn as nn 20 import paddle.nn.functional as F ---> 21 from paddle.distributed.fleet.layers.mpu import mp_ops 22 from paddle.distributed.fleet.meta_parallel import ColumnParallelLinear 23 ModuleNotFoundError: No module named 'paddle.distributed.fleet.layers'