-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
18503fa
commit 186eed0
Showing
6 changed files
with
458 additions
and
269 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,17 @@ | ||
from .rnabert import RnaBertConfig, RnaBertModel, RnaTokenizer | ||
from .rnabert import ( | ||
RnaBertConfig, | ||
RnaBertForMaskedLM, | ||
RnaBertForSequenceClassification, | ||
RnaBertForTokenClassification, | ||
RnaBertModel, | ||
RnaTokenizer, | ||
) | ||
|
||
__all__ = ["RnaBertConfig", "RnaBertModel", "RnaTokenizer"] | ||
__all__ = [ | ||
"RnaBertConfig", | ||
"RnaBertModel", | ||
"RnaBertForMaskedLM", | ||
"RnaBertForSequenceClassification", | ||
"RnaBertForTokenClassification", | ||
"RnaTokenizer", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,36 @@ | ||
from transformers import AutoConfig, AutoModel, AutoTokenizer | ||
from transformers import ( | ||
AutoConfig, | ||
AutoModel, | ||
AutoModelForMaskedLM, | ||
AutoModelForSequenceClassification, | ||
AutoModelForTokenClassification, | ||
AutoModelWithLMHead, | ||
AutoTokenizer, | ||
) | ||
|
||
from multimolecule.tokenizers.rna import RnaTokenizer | ||
|
||
from .configuration_rnabert import RnaBertConfig | ||
from .modeling_rnabert import RnaBertModel | ||
from .modeling_rnabert import ( | ||
RnaBertForMaskedLM, | ||
RnaBertForSequenceClassification, | ||
RnaBertForTokenClassification, | ||
RnaBertModel, | ||
) | ||
|
||
__all__ = ["RnaBertConfig", "RnaBertModel", "RnaTokenizer"] | ||
__all__ = [ | ||
"RnaBertConfig", | ||
"RnaBertModel", | ||
"RnaTokenizer", | ||
"RnaBertForMaskedLM", | ||
"RnaBertForSequenceClassification", | ||
"RnaBertForTokenClassification", | ||
] | ||
|
||
AutoConfig.register("rnabert", RnaBertConfig) | ||
AutoModel.register(RnaBertConfig, RnaBertModel) | ||
AutoModelForMaskedLM.register(RnaBertConfig, RnaBertForMaskedLM) | ||
AutoModelForSequenceClassification.register(RnaBertConfig, RnaBertForSequenceClassification) | ||
AutoModelForTokenClassification.register(RnaBertConfig, RnaBertForTokenClassification) | ||
AutoModelWithLMHead.register(RnaBertConfig, RnaBertForTokenClassification) | ||
AutoTokenizer.register(RnaBertConfig, RnaTokenizer) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.