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
Prepare Upgrade to TensorFlow 2 #222
Comments
I can help with the Rpi build. |
Good to know qemu is so slow! So not an option for us in practice. We have a Raspberry Pi 4 with 4 GB RAM and an Nvidia Jetson in our lab for development. |
Its usually OK, but tensorflow took 7 hours in Raspberrypi 4 running on two threads. If you have a super strong intel machine it might be worth it, but I'd recommend using a Pi just for now, since its a once-per-version build. |
We're also building the Edit: Would qemu profit from more cores? We think about getting an AMD Threadripper... |
You could also use multi-arch to build it using docker hub. If you use a local x86_64 machine it might also build. |
i built your project in FreeNAS Jail (FreeBSD 11.2 at this moment) , but it has only Tensorflow 1.14 :) it would be sad if i cant build tensorflow 2 in freebsd ... is it possible make it compatible with tensorflow v1 and v2 in same time? |
Where do you have TF 1.14 from? We'll probably stick with it until after our first stable release. |
i build TF 1.14 from FreeBSD ports |
Can you check for us if / when they have TF2? I've used FreeBSD many years ago. You're also welcome to write a howto for our docs. |
i'll try later write some howto about FreeBSD (especially FreeNAS jail) (dont have much time 😞 ) |
@savegame Sorry for being a bit off topic in this thread, but I try to build photoprism under FreeBSD as well (that is, a FreeBSD 12.1 jail, not inside FreeNAS, but this shouldn't matter).
Well, yes, there is no libtensorflow.so. |
You might need to build it from source. Takes a couple of hours to compile though. |
I'm building |
You need TensorFlow for C, not Python. |
As of right now, TensorFlow for Go seems broken for the average developer: Their downloadable C library is also outdated. CPU requirements not really documented as well. |
Note there is a workaround: tensorflow/tensorflow#41808 (comment) |
Yeah, but we really don't have time for hacks and workarounds right now. Need to compile it for different CPU architectures as well, including GPU support. Would be OK doing this as a full time job if there was nothing else to do. |
In case you need it, I think this link might help to prepare TF2 (maybe 3) support for Nvidia GPU. |
Since Google / the TensorFlow team decided to make it harder to use TensorFlow with Go (wonder why...), the next best/only option is to migrate our backend to this fork maintained by @galeone: Ideally, we do this when the fork is getting updated to the then latest version in the upcoming weeks/months. Waiting is fine if it saves us from having to upgrade to a new TF version twice in short order. In our particular situation, upgrading also means that we (may) have to build and distribute new C libraries for all supported architectures and operating systems. This can be a lot of extra work, unless there are existing binaries, which has often not been the case in the past. We therefore plan accordingly, as hoping for luck is not a strategy. |
Eventually, I updated the fork today. You can depend on https://github.com/galeone/tensorflow/tree/r2.9-go |
Wow, that was quick! Thanks a lot! So now it's up to us to update our dependencies and refactor existing code as needed 🥳 Do you happen to know if binary models exported with TF 1.x remain compatible or how to convert them if needed? |
In TensorFlow 2.x you can only use the SavedModel serialization format. Hence, if you have some "frozen" models you can't import and use them. |
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 Moreover, if you use (or plan to use) galeone/tfgo the dependency of tfgo on galeone/tensorflow is already updated. |
@galeone Thanks for the update! I really appreciate it! Due to limited resources, we unfortunately have to wait with the upgrade until we have released the extended multi-user support. |
FreeBSD Ports seems to have tensorflow 2.9.1 but tensorflox 1.x never made in officially (though I have a personal binary pkg for that for personal use published on GitHub) because porting bazel-based stuff seems to be quite complex and in the end no one finished it properly for an old version, so I look forward to when 2.x will be supported too. 😁 |
@lapo-luchini Thank you for letting us know! We appreciate any help we can get. However, I understand that migrating to TF2 might be too much of a challenge for contributors. I'll otherwise give it a try once we've finished adding support for OAuth2, OIDC, and 2FA (see e.g. #3943) and have resolved the known issues related to facial recognition. |
As a developer, I want to use the latest TensorFlow version so that I continue to get updates and can use all features.
We are currently using TensorFlow
1.14.0
Acceptance Criteria:
The text was updated successfully, but these errors were encountered: