Repository navigation
Description
System information
- Have I written custom code (as opposed to using a stock example script
provided in TensorFlow): No - OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux-4.19.0-9-amd64-x86_64-with-debian-10.4
- Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue
happens on a mobile device: - TensorFlow installed from (source or binary): Not installed (golang go command pull tensorflow from github)
- TensorFlow version (use command below): 2.3.0 (same bug in 2.2.0)
- Python version: 2.7.16 (but python 3.7 is installed too)
- Bazel version (if compiling from source): 3.1.0
- GCC/Compiler version (if compiling from source):
- CUDA/cuDNN version:
- GPU model and memory:
- Exact command to reproduce: go get github.com/tensorflow/tensorflow/tensorflow/go
Describe the problem
BUG --- As in [email protected], [email protected] fail at installation.
Source code / logs
From inside GOPATH:
go: found github.com/tensorflow/tensorflow/tensorflow/go in github.com/tensorflow/tensorflow v2.3.0+incompatible
go: finding module for package github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto
go: finding module for package github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto
../../go/pkg/mod/github.com/tensorflow/[email protected]+incompatible/tensorflow/go/saved_model.go:25:2: module github.com/tensorflow/tensorflow@latest found (v2.3.0+incompatible), but does not contain package github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto
From inside a go.mod compliant directory:
go: found github.com/tensorflow/tensorflow/tensorflow/go in github.com/tensorflow/tensorflow v2.3.0+incompatible
go: finding module for package github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto
go: finding module for package github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto
../../go/pkg/mod/github.com/tensorflow/[email protected]+incompatible/tensorflow/go/saved_model.go:25:2: module github.com/tensorflow/tensorflow@latest found (v2.3.0+incompatible), but does not contain package github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto
Looks like exactly the same old bug from [email protected] from this issue: #39307
Activity
naspredam commentedon Aug 2, 2020
Happened the same for me... in order to use go with tensorflow I used the 1.15.0 as go dependency.
But still, it seems that there is a dependency issue on the 2.2+... and for python 3.8 it should use 2.2+
pbatk commentedon Aug 22, 2020
I can confirm this occurs for me as well. For the time being I am using the 2.3.0 C library with the 2.1.0 Go module. There are warnings at link time but it seems to function for all my usage. If this needs further debugging I'm happy to help out to expedite the process. I'd prefer to keep the library and module versions in sync
batara666 commentedon Aug 28, 2020
confirmed, urgently need fix
batara666 commentedon Aug 28, 2020
this broke the whole go tensorflow
rubens21 commentedon Aug 29, 2020
Same issue here :(
And it is not happening only in 2.3. It is affecting all 2.* versions.
I found discussions #39744 and here #40752
There was a PR (e5e495d) the supposedly would fix the issue, but I checkout master and tested it, and I got the same error.
@jhseu since your changes are not in a tag yet, I tested using master branch. I got the same error.
I followed the steps in https://github.com/tensorflow/tensorflow/blob/master/tensorflow/go/README.md, and I did not found the proto files in the Go code (in src/github...), they were generated inside Bazel cache directories.
I believe the problem is that Bazel is generating the files, so they are created inside Bazel building dirs (bazel-tensorflow/tensorflow/go/vendor/github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto).
Should we have a script to generate the files within the golang code?
I am trying to make it work in my environment by generating the proto files, but I am having other issues because the importing path from other libs...
Help, please :(
rubens21 commentedon Aug 30, 2020
Well, it is working for me now, but I had to do some hacks to make it works.
First, differently of what I said in the comment above, we do have a script that generates the proto files outside Bazel dir, however it only generates inside a vendor dir (https://github.com/tensorflow/tensorflow/blob/master/tensorflow/go/genop/generate.sh#L70).
These are the steps I followed to make it works in my environment
3.a(Copying it to a system location) step will fail, you must copylibtensorflow_framework.so.2instead oflibtensorflow_framework.so${GOPATH}/src/github.com/tensorflow/tensorflow/go test github.com/tensorflow/tensorflow/tensorflow/go, if you get the error saying "libtensorflow.so.2: cannot open shared object file: No such file or directory", may need to execute the step 3.b instead of the 3.aAssuming the test is passing, you may continue.
If your Go project is using Go modules ON, you will have to:
github.com/tensorflow/tensorflowlooks like a Go module project.Just keep in mind that it is a workaround. I did it because the bug was blocking me.
48 remaining items
tenhan commentedon Sep 28, 2022
I am facing the similar problem:
Will this be fixed?
galeone commentedon Sep 28, 2022
Use tfgo or galeone/tensorflow
#41808 (comment)
galeone commentedon Oct 23, 2022
FYI I updated https://github.com/galeone/tensorflow to TensorFlow 2.10 (https://github.com/galeone/tensorflow/tree/r2.10-go)
You can update via
go get -u github.com/galeone/tensorflow/tensorflow/[email protected]Moreover, if you use (or plan to use) galeone/tfgo the dependency of tfgo on galeone/tensorflow is already updated.
SuryanarayanaY commentedon Mar 1, 2023
Hi @jobale ,
Tensorflow Golang instructions has been maintained by a community member.Please find the attached source.
The source is updated till 2.11 version.
As TF 2.3 version is not actively supported, Please try with latest version by following the instructions in above source and let us know if having any problems there. Thanks!
SuryanarayanaY commentedon Mar 23, 2023
Closing as stale. Please reopen if you'd like to work on this further. Thanks.
google-ml-butler commentedon Mar 23, 2023
Are you satisfied with the resolution of your issue?
Yes
No
PR #41808: [XLA:GPU] Migrate CollectivePermute command buffer support…
PR #41808: [XLA:GPU] Migrate CollectivePermute command buffer support…