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

ValueError: substring not found #78

Open
bipinkc19 opened this issue May 31, 2021 · 13 comments
Open

ValueError: substring not found #78

bipinkc19 opened this issue May 31, 2021 · 13 comments

Comments

@bipinkc19
Copy link

image

I cant disclose the text, but this is the error I get in every model

@neelkantnewra
Copy link

I have also faced the same issue, Can you check your text if it contains any trademark symbol in between any word.

for example:
interface to Teamcenter™s Business
when I removed that ™ from the above string it works fine,
interface to Teamcenter's Business

@bipinkc19
Copy link
Author

bipinkc19 commented Jun 1, 2021

image
If I remove the has and put some other word like free it works

@bipinkc19
Copy link
Author

How do we fix this
image

@neelkantnewra
Copy link

neelkantnewra commented Jun 1, 2021

Okay, I got that, I have commented on a specific problem. In my case, I am using a pdf file consisting of 50 pages, I checked it with some pages, it was throwing the same error, Maybe it is due to the model not able to generate the answer of specific text.

If you want an instant solution then I will suggest using try: exception at least you will get some question and answer.

This is just a temporary solution. I am looking into this issue. will update soon.

neelkantnewra added a commit to neelkantnewra/question_generation that referenced this issue Jun 1, 2021
@bipinkc19
Copy link
Author

May be when it can't generate the answers in some text and throws error like you said.
Thank you for looking in to it.

@neelkantnewra
Copy link

I have done a pull request, lets see when it will be accepted, you can always try the approach of Exception handling.

@ghost
Copy link

ghost commented Jun 10, 2021

@neelkantnewra how was the inference times for 50 pg pdf? Also did you try fine tuning the model?

@neelkantnewra
Copy link

@neelkantnewra how was the inference times for 50 pg pdf? Also did you try fine tuning the model?

I don't remember exactly, currently, I am busy with another project. Yes, we fine-tune it, else it will give the worse result.

@razauh
Copy link

razauh commented Sep 1, 2021

I had the same error, There are some special characters in input string which models are unable to process. So just remove special characters and it will work.

@neelkantnewra
Copy link

I had the same error, There are some special characters in input string which models are unable to process. So just remove special characters and it will work.

That is one case, but when the model is not finding any suitable question-answer pair it through an empty dict and since it is empty we get a Value error. we can solve this by exception Handling as previously mentioned.

@sabhi27
Copy link

sabhi27 commented Oct 25, 2021

@neelkantnewra how was the inference times for 50 pg pdf? Also did you try fine tuning the model?

I don't remember exactly, currently, I am busy with another project. Yes, we fine-tune it, else it will give the worse result.

@neelkantnewra Can you please guide us with the fine-tuning code on custom data?

@liesketrommelen
Copy link

liesketrommelen commented Nov 3, 2021

When using the text "42 is the answer to life, universe and everything" same error occurs. How to solve this?

@rajats
Copy link

rajats commented Dec 7, 2021

@liesketrommelen You need to use transformers 3.0.0

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

6 participants