bytedance / lightseq

LightSeq: A High Performance Library for Sequence Processing and Generation
Other
3.19k stars 328 forks source link

module "lightseq" has no attribute "training" #324

Open princelisjtu opened 2 years ago

princelisjtu commented 2 years ago

按照官方给定的方式安装后,在cd到相应的路径下,运行native_fs_transformer_export.py文件,会出现No module named 'export'的错误,通过ln -s软链接方式解决后,后续会报错module "lightseq" has no attribute "training" .

MowanHu commented 2 years ago

我也有类似的问题,按照官方pip安装之后的版本是2.2.1,example里的hf_bart_export.py根本没办法运行,报错缺少各种依赖,对比了目前项目中master版本的代码,发现很多地方都不一致,请问您也是一样的吗

princelisjtu commented 2 years ago

是的,也是同样的问题。

MowanHu commented 2 years ago

我把master里的源码重新复制了一份到自己环境的安装目录下就可以正常执行了,应该是安装版本和example里的代码版本没同步,你可以试一下

princelisjtu commented 2 years ago

你好!感谢提供解决方案哈,但是,我这边试了一下,依然还是报原来的错误。我这边git clone了最新的lightseq代码,然后把相应的lightseq文件夹复制到了自己环境的安装目录下,代替了原来的lightseq文件夹,运行代码时依然出现了原来的错误,不知道是否在哪个地方出现了错误,望不吝赐教,谢谢! 祝: 一切顺利!

------------------ 原始邮件 ------------------ 发件人: "bytedance/lightseq" @.>; 发送时间: 2022年6月17日(星期五) 下午3:05 @.>; @.**@.>; 主题: Re: [bytedance/lightseq] module "lightseq" has no attribute "training" (Issue #324)

我把master里的源码重新复制了一份到自己环境的安装目录下就可以正常执行了,应该是安装版本和example里的代码版本没同步,你可以试一下

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Taka152 commented 2 years ago

You can checkout the release tag to run the examples. Master may be not compatible with pypi latest version.

MowanHu commented 2 years ago

你好!感谢提供解决方案哈,但是,我这边试了一下,依然还是报原来的错误。我这边git clone了最新的lightseq代码,然后把相应的lightseq文件夹复制到了自己环境的安装目录下,代替了原来的lightseq文件夹,运行代码时依然出现了原来的错误,不知道是否在哪个地方出现了错误,望不吝赐教,谢谢! 祝: 一切顺利! ------------------ 原始邮件 ------------------ 发件人: "bytedance/lightseq" @.>; 发送时间: 2022年6月17日(星期五) 下午3:05 @.>; @.**@.>; 主题: Re: [bytedance/lightseq] module "lightseq" has no attribute "training" (Issue #324) 我把master里的源码重新复制了一份到自己环境的安装目录下就可以正常执行了,应该是安装版本和example里的代码版本没同步,你可以试一下 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

我就是直接copy到自己环境的安装目录下就可以了,你可以再看下那个init.py那个文件里内容的和master里一致吗,我上周应该就只改了这两个地方,过了几天有点记不清楚了😥

princelisjtu commented 2 years ago

好的,我看一下,谢谢!

hanguangmic commented 2 years ago

大佬 同样的问题有解决么

princelisjtu commented 2 years ago

是的,我也有这种问题,感觉他们提供的代码不是稳定版本。

------------------ 原始邮件 ------------------ 发件人: "bytedance/lightseq" @.>; 发送时间: 2022年6月17日(星期五) 上午10:49 @.>; @.**@.>; 主题: Re: [bytedance/lightseq] module "lightseq" has no attribute "training" (Issue #324)

我也有类似的问题,按照官方pip安装之后的版本是2.2.1,example里的hf_bart_export.py根本没办法运行,报错缺少各种依赖,对比了目前项目中master版本的代码,发现很多地方都不一致,请问您也是一样的吗

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>