kentonl / e2e-coref

End-to-end Neural Coreference Resolution
Apache License 2.0
518 stars 174 forks source link

Hi, I already run setup_all.sh file. It’s giving same error. #85

Open mengzhi7 opened 4 years ago

mengzhi7 commented 4 years ago

Hi, I already run setup_all.sh file. It’s giving same error.

tensorflow.python.framework.errors_impl.NotFoundError: .\coref_kernels.so not found

Originally posted by @saxenakrati09 in https://github.com/kentonl/e2e-coref/issues/40#issuecomment-432382460

troublemaker-r commented 4 years ago

I am also meet the same errror.Have you solved it? I am running Win10.

chrisoutwright commented 3 years ago

I could not get the .so building as well (@mengzhi7, could you even get g++ to build from the .cc operation file?)

On windows, it seems like a complicated task, ensuring that all tensorflow includes and library files are there (for gpu ops also all cuda files needed for building). Essentially creating coref_kernels.so is a extension (python wrapper file) that has new tensorflow functionality and needs to be build from source , which is nearly as complicated as building tensorflow from source. See https://www.tensorflow.org/guide/create_op?hl=en Even on linux, I could get a .so file, but it does not seem compatible with win again. Check the -I and-L flags for the build command for g++, the paths must point to the right sources (in the setup_all.sh the variables for the paths stem from where the python executable (when using venv, check if it is using the correct interpreter path) finds them via

TF_CFLAGS=( $(python -c 'import tensorflow as tf; print(" ".join(tf.sysconfig.get_compile_flags()))') )
TF_LFLAGS=( $(python -c 'import tensorflow as tf; print(" ".join(tf.sysconfig.get_link_flags()))') )

As far as I can tell, one would have to build tensorflow completely from source, with the custom operation appended. See all the failed attempts at this user with loading/building an ops: https://stackoverflow.com/questions/50967670/g-fails-to-build-custom-tensorflow-gpu-op-on-windows-from-installed-binaries

Couldn't we just have the so files ready compiled (depends on tensorflow and (cuda) version i guess, so several variants would be needed)? Its really a frustration if one is not a programmer and just wants to try the model ... ending up compiling tensorflow which is really not an easy task ... I think one needs bezel instead of g++ maybe even cmake, but guides on building custom kernels are not easy to follow for me.

Bigchen8013 commented 2 years ago

@chrisoutwright Hi, have you solved this problem? Can it run on windows? Hope to get your reply, thank you very much!