NameError: name 'preprocess_examples' is not defined

#2
by bobbyOne - opened

Hello,

I am trying to run the example code from https://e-tweedy.github.io/roberta.html.

For
from lib.utils import preprocess_examples

train_dataset = squad['train'].map(
preprocess_examples,
batched=True,
remove_columns=squad['train'].column_names,
fn_kwargs = {
'tokenizer':tokenizer,
}
)

I am getting this error:
ModuleNotFoundError Traceback (most recent call last)
c:.......Cell 10 line 1
----> 1 from lib.utils import preprocess_examples
3 train_dataset = squad['train'].map(
4 preprocess_examples,
5 batched=True,
(...)
9 }
10 )

ModuleNotFoundError: No module named 'lib.utils'

I have tried importing lib, and utils

Please post the library that provides lib.utils and preprocess_examples.

Thank you

Hello! That is a html export of the notebook in this repository:
https://github.com/e-tweedy/roberta-qa-squad2
If you clone the repository, you will have the necessary modules to import and should work properly

Thank you. using the github repo with lib directory worked.

bobbyOne changed discussion status to closed

Sign up or log in to comment