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

paddle.trainer .config_parser #6

Closed
mingtop opened this issue Aug 31, 2016 · 12 comments
Closed

paddle.trainer .config_parser #6

mingtop opened this issue Aug 31, 2016 · 12 comments

Comments

@mingtop
Copy link

mingtop commented Aug 31, 2016

I0831 15:27:18.271451 18844 Util.cpp:113] Calling runInitFunctions
I0831 15:27:18.271617 18844 Util.cpp:126] Call runInitFunctions done.
F0831 15:27:18.277050 18844 PythonUtil.cpp:120] Check failed: (pyModule) != nullptr Python Error: <type 'exceptions.ImportError'> : No module named paddle.trainer.config_parser
Python Callstack:
Import Python Modulepaddle.trainer.config_parser failed.
*** Check failure stack trace: ***
@ 0x7f6f31c25daa (unknown)
@ 0x7f6f31c25ce4 (unknown)
@ 0x7f6f31c256e6 (unknown)
@ 0x7f6f31c28687 (unknown)
@ 0x832e19 paddle::callPythonFuncRetPyObj()
@ 0x832ffc paddle::callPythonFunc()
@ 0x6a94e3 paddle::TrainerConfigHelper::TrainerConfigHelper()
@ 0x6a9b24 paddle::TrainerConfigHelper::createFromFlags()
@ 0x53af73 main
@ 0x7f6f30e31f45 (unknown)
@ 0x5466b5 (unknown)
@ (nil) (unknown)
/home/jamin/Paddle/bin/paddle: line 46: 18844 Aborted (core dumped) ${DEBUGGER} $MYDIR/../opt/paddle/bin/paddle_trainer ${@:2}


I used anaconda python , at first I make install to /opt/Paddle.
I think this error is because I use the sudo make install ?
when I use ipython , I can import paddle.trainer.config_parser well , but I can't train by ./train.sh ,
?

@emailweixu
Copy link
Collaborator

paddlepaddle has not been tested against anaconda python. Can you check which python paddlepaddle is linked with by looking at build/CMakeCache file?

@reyoung
Copy link
Collaborator

reyoung commented Aug 31, 2016

Maybe you need install PaddlePaddle's python package manually. Try to find the file paddle*.whl in your install directory. It normally at "/usr/local/opt/paddle/share/wheels/" if you did not change DESTDIR or CMAKE_INSTALL_PREFIX.

During make process, PaddlePaddle will install some python package to default python interpreter in system, not anaconda.

@mingtop
Copy link
Author

mingtop commented Aug 31, 2016

@emailweixu

I added this to build:

cmake -DWITH_GPU=ON -DWITH_DOC=OFF -DWITH_SWIG_PY=ON -DCMAKE_INSTALL_PREFIX=/home/youhost -DPYTHON_INCLUDE_DIR=/home/youhost/anaconda/include/python2.7 -DPYTHON_LIBRARY=/home/youhost/anaconda/lib/libpython2.7.so ..

From cmake file , I found this:
if(WITH_PYTHON)
find_package(PythonLibs 2.7 REQUIRED)
find_package(PythonInterp REQUIRED)
find_package(NumPy REQUIRED)
endif()
so to make python find my python libs I added : -DPYTHON_LIBRARY=/home/youhost/anaconda/lib
ref: https://cmake.org/cmake/help/v3.0/module/FindPythonLibs.html

build successed

-- Found PythonLibs: /home/youhost/anaconda/lib/libpython2.7.so (found suitable version "2.7.12", minimum required is "2.7")
-- Found PythonInterp: /home/youhost/anaconda/bin/python2.7 (found suitable version "2.7.12", minimum required is "2.7")

but But still has this error ...

F0831 20:01:44.284020 28877 PythonUtil.cpp:120] Check failed: (pyModule) != nullptr Python Error: <type 'exceptions.ImportError'> : No module named paddle.trainer.config_parser

太多坑了啊.

Another: gflags no found .

-- No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available.
-- Failed to find installed gflags CMake configuration, searching for gflags build directories exported with CMake.
-- Failed to find an installed/exported CMake configuration for gflags, will perform search for installed gflags components.

Hope your team slove this , Thank you every much~

@mingtop
Copy link
Author

mingtop commented Aug 31, 2016

@reyoung yes . pypaddle_.whl and paddle_.whl in my install path.

@reyoung
Copy link
Collaborator

reyoung commented Aug 31, 2016

@mingtop Just run anaconda's pip install these wheels, and will solve this problem

like this http://stackoverflow.com/questions/28002897/wheel-file-installation

@Xiaomi2008
Copy link

I'm having the same problem when calling train.sh

@qingqing01
Copy link
Contributor

@mingtop @Xiaomi2008 I have tested against anaconda2 python, I can run train.sh successfully. And the python package is installed in /home/xxx/anaconda2/lib/python2.7/site-packages/paddle-0.8.0b0-py2.7.egg on my machine which is CentOS.

@Xiaomi2008 You may need to install PaddlePaddle's python package manually as @reyoung mentioned above.

@Xiaomi2008
Copy link

@qingqing01
I used pip install pypaddle__.whl and paddle__.whl , the problem is still exist and I use python2.7, not anaconda python. please help.

@qingqing01
Copy link
Contributor

@Xiaomi2008 You should ensure that the python used for compiling and running PaddlePaddle is the same. Then if you have install paddle-xxx.wh successfully. You maybe see the package like: your/python/path(or system lib path)/lib/python2.7/site-packages/paddle-0.8.0b0-py2.7.egg/.

You can test it as follows. If there is no problem when importing, then installation is successful and I think it will be ok when run train.sh.

python
import paddle.trainer.config_parser

@Xiaomi2008
Copy link

@qingqing01 I did see paddle in xxx/lib/python2.7/site-packages/paddle-0.8.0b0-py2.7.egg/
and I import paddle.trainer.config_parser with no error. But still got No this error when running train.sh.
BTW, my system is Ubuntu 14.04 server

@reyoung
Copy link
Collaborator

reyoung commented Sep 13, 2016

@Xiaomi2008 Will the latest PaddlePaddle get this error? We did some fixes in 674d69c .

@zhuyong0000
Copy link

还是有 ImportError: No module named _sysconfigdata_nd的错误
需要将paddle\utils\PythonUtil.cpp的
Py_SetProgramName(argv[0]);
改为
Py_SetProgramName((char*)"python");
就正常了

@reyoung reyoung closed this as completed Sep 28, 2016
qingqing01 pushed a commit to qingqing01/Paddle that referenced this issue Aug 10, 2017
…amework_proto

Feature/refactorize framework proto
wangkuiyi pushed a commit that referenced this issue Sep 30, 2017
iclementine pushed a commit that referenced this issue Dec 30, 2021
* add dirichlet sample op and cpu backend kernel

* add Dirichlet op cuda kernel  (#6)

* add dirichlet op hip kernel

Co-authored-by: Feiyu Chan <[email protected]>
jim19930609 added a commit that referenced this issue Jan 10, 2022
…st=allcases (#38811)

* Added shared_ptr<Allocation> member & corresponding interfaces to Storage

* Removed original pten::Allocation from Storage and adjusted the interfaces accordingly

* Fixed issues with storage offset

* Used place to malloc allocation for TensorStorage

* [Unify Tensors PR #3]Ported framework::Tensor interfaces to pten::DenseTensor

* Fixed issues with place

* Added comments

* Moved mutable_data with stream argument to DenseTensor

* Added set_offset interface

* Fixed CI issues,test=allcases

* [Unify Tensors PR #4] Port LoDTensor interfaces to DenseTensor

* Removed friend class EigenTensor/EigenMatrix/EigenVector from Tensor

* Modified framework::Tensor to inherit from DenseTensor

* Reverted changes too pten_layout() interface

* Removed friend classes

* Rearranged cfunction calls from tensor.data<void>() to tensor.data()

* Fixed CI issues

* Fixed lite issues

* Fixed data() interface issues,test=allcases

* Resolved IsInitialized() issues

* Fixed ResetHolder() issues

* Fixed MKLDNN & Storage issues

* Resolved ShareBufferWith() issues

* Fixed LoD issues

* Removed interfaces & members from lod_tensor,test=allcases
paddle-bot-old bot pushed a commit that referenced this issue Mar 30, 2022
jim19930609 added a commit to jim19930609/Paddle that referenced this issue Apr 1, 2022
jim19930609 added a commit to jim19930609/Paddle that referenced this issue Apr 1, 2022
paddle-bot-old bot pushed a commit that referenced this issue May 17, 2022
add default value for prim_enabled api doc
zhoutianzi666 pushed a commit to zhoutianzi666/Paddle that referenced this issue May 23, 2022
danleifeng pushed a commit to danleifeng/Paddle that referenced this issue May 29, 2022
[GpuGraph] remove  useless variables and adjust log level
zhaoyinglia pushed a commit to zhaoyinglia/Paddle that referenced this issue Sep 14, 2022
[AutoParallel] Update to the new strategy impl
jack603047588 referenced this issue in jack603047588/Paddle Nov 9, 2022
jack603047588 referenced this issue in jack603047588/Paddle Nov 9, 2022
根据cvrq需求,修改dump格式,便于cvrq不修改qcal等相关脚本
qizhaoaoe pushed a commit to qizhaoaoe/Paddle that referenced this issue Mar 3, 2023
NotHaozi pushed a commit to NotHaozi/Paddle that referenced this issue Jun 15, 2023
tianyan01 pushed a commit to tianyan01/Paddle that referenced this issue Nov 30, 2023
add fmt support int8 and fix some int8 bug
Fridge003 pushed a commit to Fridge003/Paddle that referenced this issue Mar 20, 2024
wwbitejotunn pushed a commit to wwbitejotunn/Paddle that referenced this issue Jun 21, 2024
* Hide the internal symbols and remve the hdim16 implementation.

* Remove SYMBOL_EXPORT.

* Remove some debugging statements.

* Change has_attn_bias and has_attn_mask to arguments instead of template.

* Avoid to compile the no-used .cu files.

* Remove return_softmax related template and argument.

* Remove the support of is_causal for the implementation with mask and bias.

* Reorganize codes.

* Polish codes.

* Add check of softmax_scale.
ckl117 referenced this issue in ckl117/Paddle Jul 22, 2024
atan2 precision in adfm-pnc
WAYKEN-TSE pushed a commit to WAYKEN-TSE/Paddle that referenced this issue Dec 6, 2024
tianshuo78520a added a commit to tianshuo78520a/Paddle that referenced this issue Dec 11, 2024
YuanRisheng pushed a commit that referenced this issue Dec 11, 2024
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

6 participants