Unverified Commit 39367e6b authored by Alana's avatar Alana Committed by GitHub
Browse files

Quick fix that got inadvertently removed a few days ago

parent cbe5fa66
......@@ -8,14 +8,14 @@ def test_featurize():
correctly outputs input_ids and attention_mask."""
from deepchem.feat.bert_tokenizer import BertFeaturizer
from transformers import BertTokenizerFast
sequence = [
sequences = [
'[CLS] D L I P T S S K L V [SEP]', '[CLS] V K K A F F A L V T [SEP]'
]
sequence_long = ['[CLS] D L I P T S S K L V V K K A F F A L V T [SEP]']
tokenizer = BertTokenizerFast.from_pretrained(
"Rostlab/prot_bert", do_lower_case=False)
featurizer = BertFeaturizer(tokenizer)
feats = featurizer(sequence)
feats = featurizer(sequences)
long_feat = featurizer(sequence_long)
assert (len(feats) == 2)
assert (all([len(f) == 3 for f in feats]))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment