fix n_examples for lm tasks
@@ -274,6 +274,11 @@ def get_tasks(train_tasks, eval_tasks, max_seq_len, path=None,
tasks.append(task)
for task in tasks: # hacky
+ if isinstance(task, LanguageModelingTask): # should be true to seq task?
+ task.n_tr_examples = len(task.train_data_text)
+ task.n_val_examples = len(task.val_data_text)
+ task.n_te_examples = len(task.test_data_text)
+ else:
task.n_tr_examples = len(task.train_data_text[0])
task.n_val_examples = len(task.val_data_text[0])
task.n_te_examples = len(task.test_data_text[0])
