-
Notifications
You must be signed in to change notification settings - Fork 7
add taskmodules and models from pie-modules #498
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
add taskmodules and models from pie-modules #498
Conversation
…leClassificationModel) and taskmodules (except CrossTextBinaryCorefTaskModule, ExtractiveQuestionAnsweringTaskModule, and RESpanPairClassificationTaskModule)
8236e00 to
b6ac518
Compare
|
regarding: "investigate why tests fail with missing nltk model error (only on CI, not local!)" @RainbowRivey did some investigation:
|
…to use assertions to check the expected types
This PR implements #459, i.e., it adds the models and taskmodules implemented originally in pie-modules (except for QA and span-pair based RE, see potential follow-ups below).
SequenceClassificationModelWithPoolerSequencePairSimilarityModelWithPoolerSimpleTokenClassificationModelSimpleGenerativeModelSimpleSequenceClassificationModelTokenClassificationModelWithSeq2SeqEncoderAndCrfRETextClassificationWithIndicesTaskModuleTextToTextTaskModuleLabeledSpanExtractionByTokenClassificationTaskModulePointerNetworkTaskModuleForEnd2EndRECrossTextBinaryCorefTaskModuleIMPORTANT: This restricts the version of transformers to
>=4.35.0,<4.37.0! So, this is breaking.requires:
Additional changes:
tabulate, andpytorch-crfto dev dependenciestorchmetrics[text] >=1.5, <2to solve conflicts withnltk(textloads the required additional dependencies and>=1.5ensures that no deprecated nltk models are loaded. Note that we already use the modern nltk models inpie_documents.document.processing.NltkSentenceSplitter)SpanNotAlignedWithTokenExceptionandget_aligned_token_spantoutils.documentRequiresMaxInputLengthandRequiresTaskmoduleConfigtomodels.interfacefollow-ups:
AutoAnnotationPipelinework #502