Skip to content

Seq2seq NMT tutorial needs refactoring #935

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

Closed
seanpmorgan opened this issue Jan 26, 2020 · 2 comments
Closed

Seq2seq NMT tutorial needs refactoring #935

seanpmorgan opened this issue Jan 26, 2020 · 2 comments
Labels
bug Something isn't working help wanted Needs help as a contribution seq2seq tutorials

Comments

@seanpmorgan
Copy link
Member

Per the email from TF-Docs team:
https://groups.google.com/a/tensorflow.org/forum/#!topic/addons/F6MrrMfVVBA

This notebook is failing for:

nbconvert.preprocessors.execute.CellExecutionError: An error occurred while executing the following cell:
------------------
# load dataset
filename = 'deu.txt' #change filename if necessary
doc = load_documnet(filename)

#clean sentences and save clean data
pairs = doc_sep_pair(doc)
clean_sentences = clean_sentences(pairs)
# uncomment to check mapping
#for i in range(100):
#	print('[%s] => [%s]' % (clean_sentences[i,0], clean_sentences[i,1]))
------------------

---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
 in 
      1 # load dataset
      2 filename = 'deu.txt' #change filename if necessary
----> 3 doc = load_documnet(filename)
      4 
      5 #clean sentences and save clean data

 in load_documnet(filename)
      2 def load_documnet(filename):
      3         # open the file as read only
----> 4         file = open(filename, mode='rt', encoding='utf-8')
      5         # read all text
      6         text = file.read()

FileNotFoundError: [Errno 2] No such file or directory: 'deu.txt'
FileNotFoundError: [Errno 2] No such file or directory: 'deu.txt'
@seanpmorgan seanpmorgan added bug Something isn't working tutorials seq2seq labels Jan 26, 2020
@seanpmorgan
Copy link
Member Author

Seperately as @john-8704 noted in #806 this tutorial doesn't utilize the seq2seq subpackage in TFA. It should be rebuilt to showcase how to use it. If it helps some sample code can be found here:
https://github.com/tensorflow/addons/tree/master/tensorflow_addons/seq2seq#sample-code-and-migration-guide-from-tf-1x

cc @Om-Pandey

@seanpmorgan seanpmorgan added the help wanted Needs help as a contribution label Jan 28, 2020
@Om-Pandey
Copy link
Contributor

@seanpmorgan I looked into the issue, seems like I didn't add the seq2seq package from TFA, the dataset issue though I think is some kind of an environment refreshing problem cause it is working just fine on my end, I ran it 15-16 times, seems neat.... I was trying to do the tfa.seq2seq but I am running into #676 .. please tell me if there is any way to go about this, meanwhile, I will try other options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Needs help as a contribution seq2seq tutorials
Projects
None yet
Development

No branches or pull requests

2 participants