hbarnes
(Heather Barnes)
November 24, 2017, 11:04pm
1
I keep getting the following error while trying to run these two lines in the lesson 4 notebook:
FILES = dict(train=TRN_PATH, validation=VAL_PATH, test=VAL_PATH)
md = LanguageModelData(PATH, TEXT, **FILES, bs=bs, bptt=bptt, min_freq=10)
TypeError Traceback (most recent call last)
in ()
----> 1 md = LanguageModelData(PATH, TEXT, **FILES, bs=bs, bptt=bptt, min_freq=10)
TypeError: init () missing 3 required positional arguments: ‘trn_ds’, ‘val_ds’, and ‘test_ds’
Anyone else have this? Any ideas on how to correct this? Thanks!
hbarnes
(Heather Barnes)
November 24, 2017, 11:19pm
3
Yes all other cells until that point worked fine.
What I posted earlier is the full error message.
hbarnes
(Heather Barnes)
November 24, 2017, 11:26pm
5
I just tried that and it says already up to date. I also did a git pull a few hours ago just before running this notebook. Anything else I might need to do to update the api?
wgpubs
(WG)
November 24, 2017, 11:29pm
6
That isn’t the most current version of the notebook so not sure what to say.
See here for what I do whenever I start development and see if that resolves anything: These 4 lines will solve 80% of your problems
hafidz
(Hafidz Zulkifli)
February 2, 2018, 8:22am
7
I’m getting the same error as well. However, this is from the lang_model notebook.
All lines above it ran successfully and the codes are the latest pull.
Han
February 8, 2018, 12:17am
8
If you consult the documentation for the command (shift + tab on jupyter notebook with the cursor inside the function) you will see:
" This class provides the entry point for dealing with supported NLP tasks.
Usage:
Use one of the factory constructors (from_dataframes, from_text-files) to
obtain an instance of the class. "
So to fix your error, use “from_text-files” like so:
md = LanguageModelData.from_text_files(PATH, TEXT, **FILES, bs=bs, bptt=bptt, min_freq=10)
4 Likes