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

SQuAD predictions fail #22

Open
WingCode opened this issue Dec 13, 2019 · 0 comments
Open

SQuAD predictions fail #22

WingCode opened this issue Dec 13, 2019 · 0 comments

Comments

@WingCode
Copy link

WingCode commented Dec 13, 2019

@kamalkraj Thank you for giving clear instructions with respect to SQuAD which wasn't available in the main repo

With the following parameters:

run_squad.py --mode=predict \
--albert_config_file=../albert_base_resources/config.json \
--model_dir=../albert_base_resources/ \
--input_meta_data_path=../squad_out_v1.1/squad_v1.1_meta_data \
--predict_file=../squad_dataset/dev_small.json.txt \
--spm_model_file=../albert_base_resources/vocab/30k-clean.model 

dev_small.json.txt

Fails with object referred before assigned

So, shouldn't this line:

ALBERT-TF2.0/run_squad.py

Lines 565 to 567 in 8d0cc21

if FLAGS.version_2_with_negative:
get_raw_results = get_raw_results_v2
for result in get_raw_results(predictions):

modified to:

        if FLAGS.version_2_with_negative:
            predicted = get_raw_results_v2(predictions)
        else:
            predicted = get_raw_results(predictions)
        for result in predicted:
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