tensorflow/text

Universal distribution / Windows binaries

sbarman25 opened this issue ยท 25 comments

Hello,

Is it possible to add Windows binaries / universal distribution? I couldn,'t install this library on Windows, no wonder there are no binaries for windows on pypi .

tensorflow-probability project provides universal distribution. See pypi .

I don't know if it's a problem with how bazel build is configured or something else. It would be great to have it on all platforms.

Many Thanks.

Windows is something we do wish to add. We've had some difficulties getting a working package though, which is why it is not available yet. The difference between this library and tensorflow-probability is we make use of custom ops written in c++, and building those shared libraries to work well with Tensorflow inside Windows has had issues; plus, the lengthy build times on Windows has made iterating on these issues slow. While the next beta release (this week) will not include Windows, we would like for the next release to include it.

@broken since these are custom ops, will they be included in the graph when you do a SavedModel export? Will I be able to run these ops from java or TF serving (non-python envs). What do I need to do to run these at inference time?

Not all ops are custom ops, but for those that are I've been working with the tf serving team to have our ops included. They'll be available in the next TF serving release for TF 2.0. It will include all (except for normalize) of our currently released ops. Their latest 1.x release was done before my changes to include these ops was added.

We'll add the newest ops once we determine the current build issues with the new TF build environment, but TF serving should have custom build instructions if you want to include anything that is not already included.

Do we have a release date for tensorflow-text on Windows?

ok, so Tensorflow SIG-addons is out now. There must be a way to build those shared libraries for Windows. It's already 6 months since I posted this.

Hi guys,

any news on this one?

Kind regards

Bumping this. Would be really, really great if we could use tensorflow-text on Windows 10... ๐Ÿ™

In the meantime, could you update the README to mention that this package is not available for Windows? I know the Python Package Index only lists Linux and MacOS downloads, but it took me a lot of time of troubleshooting to notice that.

Thanks for the awesome code, by the way! I have it working in a Colab notebook instead now to be in a Linux environment.

Sad we can't use this package on Windows

Any news on this? Timeline?

This issue was mentioned nearly a year ago, and so far no official news on Tensorflow-Text for Windows. Will we eventually get it, or will we be forced to keep to Colab (or other OS, of course) to be able to use it for the long term?

We were trying to get this into 2.3.x, but missed the deadline. I expect a Windows release with 2.4.

tmbo commented

awesome that sounds super exciting ๐Ÿš€ what's the timeline for that 2.4 release?

The lack of Windows suport breaks the usage of TensorFlow Hub in Windows.
The delay of supporting Windows harms the experience of TensorFlow ecosystem, especially in NLP.

https://tfhub.dev/google/universal-sentence-encoder-multilingual/3

@broken Any ETA on the 2.4 release? Thank you!

We release our versions in sync with the core TF branch, but may release a beta earlier if we're ready but the core branch doesn't look to release soon. Apologies, but at this time, I can't give a specific date.

Just a friendly reminder that Tensorflow has published first release candidate of 2.4.0 which looks stable enough to develop & test against.

We just release 2.4.0-rc0. This includes packages for Windows. I encourage everybody to test them out, as we haven't had a significant amount of time to test them.

Note that the build for Py3.8 was incorrect and will not work. This will be fixed for the next release. However, Py3.6 and Py3.7 should work.

@broken thank you!

We just released 2.4.0-rc1 that includes a working build for Py3.8. This is the first release using the automated build, but I don't think it will be too different from the previous release candidate which appears to be working well. Thanks everybody for your patience; it was surprisingly tricky to get right.

Hi tensorflow-text 2.4.0-rc1 is still not working in windows 10 for python 3.8. versions. I installed it in Anaconda environment and running on my windows machine. Is it not compatible with Anaconda? Do I need to download any other dependencies? If it works for anyone, please let me know.

@GaneshGS The closest I've tested would be miniconda on linux or just normal install on Windows. Can you open a new issue for this? Please include how you installed it, the error message you got, and what you did to get the error. Thanks.

@broken, Hi, sure. I can open a new issue for this problem.

Not sure about conda, but I can confirm the package works with tensorflow-cpu==2.4.0 with the normal Python distribution. Quick test to verify:

>cd %TEMP%
>py -3.8 -m venv tf-text
>tf-text\Scripts\activate.bat
(tf-text) >pip install tensorflow-text==2.4.0rc1; pip install tensorflow-cpu==2.4.0 "numpy<1.19.4"
(tf-text) >python
Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.platform
'win32'
>>> import tensorflow_text as text
>>> tokenizer = text.WhitespaceTokenizer()
>>> tokens = tokenizer.tokenize(['everything not saved will be lost.', u'Sadโ˜น'.encode('UTF-8')])
2020-12-16 21:58:08.508903: I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_devices not set
2020-12-16 21:58:08.509878: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
WARNING:tensorflow:From C:\Users\tester\AppData\Local\Temp\tst\lib\site-packages\tensorflow\python\util\dispatch.py:201: batch_gather (from tensorflow.python.ops.array_ops) is deprecated and will be removed after 2017-10-25.
Instructions for updating:
`tf.batch_gather` is deprecated, please use `tf.gather` with `batch_dims=-1` instead.
>>> tokens.to_list()
[[b'everything', b'not', b'saved', b'will', b'be', b'lost.'], [b'Sad\xe2\x98\xb9']]

Downgrade of numpy is necessary because of numpy/numpy#16744 and we are stuck with the broken win10 2004 build.

Awesome! @broken thank you for the great work! ๐ŸŽ†

@hoefling Thanks a lot for the inputs! I used tensroflow-cpu==2.4.0 and my problem is solved. Thanks a lot! @broken, I'll close the other issue which created sometime ago.