Skip to content
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

Tokenizer TF.Data Transform Crashes #84

Closed
luischinchillagarcia opened this issue Aug 30, 2019 · 4 comments
Closed

Tokenizer TF.Data Transform Crashes #84

luischinchillagarcia opened this issue Aug 30, 2019 · 4 comments

Comments

@luischinchillagarcia
Copy link

luischinchillagarcia commented Aug 30, 2019

When using the .apply method as a transformation for a tf.data object on to a text tokenizer, it crashes all Colab sessions (both in TF 1.x and 2.0). Here is a sample taken from the official colab notebook.

docs = tf.data.Dataset.from_tensor_slices([['Never tell me the odds.'],
                                           ["It's a trap!"]])
tokenizer = text.WhitespaceTokenizer()
tokenized_docs = docs.map(lambda x: tokenizer.tokenize(x))
iterator = tokenized_docs.make_one_shot_iterator()
print(iterator.get_next().to_list())
print(iterator.get_next().to_list())
@broken
Copy link
Member

broken commented Aug 30, 2019

We noticed this recently and identified the problem and should have this fixed soon.

@broken
Copy link
Member

broken commented Aug 30, 2019

fyi, you can force an earlier beta version to address this in the meantime.
!pip install tensorflow-text
!pip install tensorflow==2.0.0b1

@broken
Copy link
Member

broken commented Sep 11, 2019

I realized my earlier responses were vague. The issue is that the version of TF was nightly and was causing incompatibilities. I will update the colab to force specific versions of TF to match our own to prevent these issues.

Both of these work:
!pip install tensorflow-text==0.1.0rc2
!pip install tensorflow==1.14.0
or
!pip install tensorflow-text
!pip install tensorflow==2.0.0b1

tf-text-github-robot pushed a commit that referenced this issue Sep 11, 2019
* Specifies the TF version to prevent incompatibility crashes. (Fixes github #84).
* Adds an example for Wordpiece.
* Minor wording updates.

PiperOrigin-RevId: 268560981
@broken
Copy link
Member

broken commented Oct 19, 2019

We now have releases for TF 1.15 & 2.0, so I'm closing this issue.

@broken broken closed this as completed Oct 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants