addons icon indicating copy to clipboard operation
addons copied to clipboard

Bug in Seq2Seq tutorial

Open Morasiu opened this issue 5 years ago • 2 comments

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Win10
  • TensorFlow version and how it was installed (source or binary): '2.1.0', Just pip install
  • TensorFlow-Addons version and how it was installed (source or binary): '0.8.2', Just pip install
  • Python version: 3.7
  • Is GPU used? (yes/no): Yes

Describe the bug

I just straight up copied all the code from the tutorial and merged it into one script. When I try to run it I got:

at:

data = raw_data[:10000, :2] 
Exception has occurred: IndexError
too many indices for array

I guess that because of raw_data has a structure like this:

raw_data = [
    ["en", "ger"],
    ["en2", "ger"]
]

So a simple change to should resolve this.

data = raw_data[:10000] 

Code to reproduce the issue

Just code from the tutorial.

Other info / logs

I can provide it if will be necessary.

Morasiu avatar Feb 28 '20 09:02 Morasiu

Maybe we should run the notebooks in our CI to make sure this kind of problem doesn't happen again?

gabrieldemarmiesse avatar Feb 28 '20 09:02 gabrieldemarmiesse

In this part of the code tf or tfa are not used. I ran this notebook on colab and I didn't encounter any problem. This is colab env packages and their versions.

py = '3.6.9'
GCC = `8.3.0`
tf = '2.1.0'
nltk = '3.2.5'
np = '1.17.5'
tfa = '0.8.2'

If the problem is not about packages, it might have something to do with Windows.

us avatar Mar 04 '20 22:03 us