Simpletransformers: 'text_b'...for sequence pairs models; why not??

Created on 25 Dec 2019  路  5Comments  路  Source: ThilinaRajapakse/simpletransformers

HI and thanks for Great package ;)

Why when You initialize 'train_examples' , list of InputExample' s istances in ClassificationModel class, You don't allow to pass additional feature as second text, like a 'text_b' in df_train, for example...? to process sequences pair model...?

enhancement stale

Most helpful comment

It's because I only had single sentence tasks in mind when I first published the library. Most of the code to support sentence pair tasks should already be in place though, so I'll see what I can do about testing this and adding it quickly.

All 5 comments

It's because I only had single sentence tasks in mind when I first published the library. Most of the code to support sentence pair tasks should already be in place though, so I'll see what I can do about testing this and adding it quickly.

I am new to SimpleTransformers but I modified the part where text_b is considered as:

train_examples = [InputExample(i, text, text2, label) for i, (text, text2, label) in enumerate(zip(train_df.iloc[:, 0], train_df.iloc[:, 1], train_df.iloc[:, 2]))]

Is it ok to do that? I was getting value error before this edit, it seems that solved it. Of course, I do not know if it leads to more problems or not.

There's a chance it might work. If your final results are good, then it's probably working. Please let me know if it is!

Sentence pair tasks are now supported.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

caprone picture caprone  路  7Comments

mineshmathew picture mineshmathew  路  9Comments

Lalit-01 picture Lalit-01  路  4Comments

manueltonneau picture manueltonneau  路  4Comments

marctorsoc picture marctorsoc  路  6Comments