Skip to content
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

Wrong importing at triviaqa/utils #9

Open
Kkordik opened this issue Dec 1, 2023 · 0 comments
Open

Wrong importing at triviaqa/utils #9

Kkordik opened this issue Dec 1, 2023 · 0 comments

Comments

@Kkordik
Copy link

Kkordik commented Dec 1, 2023

I found out that files in triviaqa/utils have inputs with errors:
ModuleNotFoundError: No module named 'utils.utils'; 'utils' is not a package

At dataset_utils.py should be:

import utils

Instead of:

import utils.utils
import utils

Also at convert_to_squad_format.py are lots of such errors:

def get_text(qad, domain):
    ...
    return utils.utils.get_file_contents(local_file, encoding='utf-8')

The correct way would be to call get_file_contents as:

def get_text(qad, domain):
    ...
    return utils.get_file_contents(local_file, encoding='utf-8')

I found out that after correcting of dataset_utils.py as I showed and just moving convert_to_squad_format.py file from /triviaqa/utils to the main /triviaqa the error message disappears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant