galeone/tfgo

installation issue: can't find for_core_protos_go_proto

Closed this issue · 10 comments

pa-m commented

go get github.com/galeone/tfgo
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
../../../../.gvm/pkgsets/go1.15/global/pkg/mod/github.com/tensorflow/tensorflow@v2.4.1+incompatible/tensorflow/go/saved_model.go:25:2: module github.com/tensorflow/tensorflow@latest found (v2.4.1+incompatible), but does not contain package github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto

Working on the same machine I never encountered this problem, so I had to google a bit.

We end up in this (IMHO bad) behavior of go get that does not respect the replace directive. golang/go#30354

So I had to fix my fork (https://github.com/galeone/tensorflow/tree/r2.4-go)
and update the code to point to the fork directly ( 74b2cd0 ).

For some reason (no idea why it happens) go get have some problem in fetching the latest commit of this branch, and fetches some old commit (??).
For this reason, for now, until this cache (I guess) gets pruned, you can go get the package in this way (from a go module):

go get github.com/galeone/tfgo@74b2cd09435e5becd7fbcf4efc17996ca2d41654

edit: the cache has been pruned, now simply go get github.com/galeone/tfgo works.

Closing, but feel free to give feedback about this solution.

This issue continues to persist for me and the command given above: go get github.com/galeone/tfgo
still gives the same error (cannot find package "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto").

go get github.com/galeone/tfgo@74b2cd09435e5becd7fbcf4efc17996ca2d41654 gives the error:
go: cannot use path@version syntax in GOPATH mode

The fix is to run: go mod download github.com/galeone/tfgo@74b2cd09435e5becd7fbcf4efc17996ca2d41654 with the fix found from here

I'm still having issues, trying to run the example given here is giving me the same error as before cannot find package "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto" despite appearing to have downloaded successfully at first.

@true-zero are you running go get github.com/galeone/tfgo inside a new module or elsewhere?

If it's inside a new module (where you have run go mod init or where you already have go.mod) it should work.

If you're running this command outside of a module, then using go mod download maybe it the preferred way.

However thanks for this second comment:

I'm still having issues, trying to run the example given here is giving me the same error as before cannot find package "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto" despite appearing to have downloaded successfully at first.

You made me notice that I completely forgot to update the readme: we shouldn't use the official tensorflow/tensorflow package, but we should use the fork we automatically download when using go get (galeone/tensorflow).

I'm reopening this issue and I'll close when the documentation is updated (in a few minutes).

Let me know if you need any other help

Just pushed 84b9a5e with the updated examples 👍

Try them and let me know if it works for you.

Closing after about 24 hours. I suppose it works for you - let me know otherwise.

cannot find package "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto" continues to persist

cannot find package "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto" continues to persist

Can you create a minimal reproducible example? I don't know how to help you otherwise 😄

pa-m commented

Worked for me. very nice. Thank you.

Worked for me. very nice. Thank you.

❤️