dls_lm = DataBlock(
blocks = TextBlock.from_folder(hindi_txt_path,is_lm=True),
get_items = get_text_files(hindi_txt_path),
splitter = RandomSplitter(0.1)
).dataloaders(hindi_txt_path,path = hindi_txt_path ,bs = 128,
seq_len = 80 )
I have 2 questions
-
here in this “hindi_txt_path” I have 130,000 .txt files (around 300 Mb) data but for testing and check everything working I need only 500 files so how to achieve with the above code
I try with get_text_files(hindi_txt_path)[:500] but it did’t work -
and after running the above code 2nd time ("because I just deliberately stops code execution for change first time ") it gives this error
FileNotFoundError: [Errno 2] No such file or directory: ‘/content/train/train_tok/counter.pkl’
I am running this code in colab
Thanks for any help