Skip to content
This repository was archived by the owner on Nov 22, 2022. It is now read-only.

Add Roberta model into BertPairwiseModel #1336

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pytext/models/bert_classification_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import torch.nn as nn
from pytext.common.constants import Stage
from pytext.config.component import create_loss
from pytext.data.bert_tensorizer import BERTTensorizer
from pytext.data.bert_tensorizer import BERTTensorizer, BERTTensorizerBase
from pytext.data.dense_retrieval_tensorizer import ( # noqa
BERTContextTensorizerForDenseRetrieval,
PositiveLabelTensorizerForDenseRetrieval,
Expand Down Expand Up @@ -139,10 +139,10 @@ class BertPairwiseModel(BasePairwiseModel):

class Config(BasePairwiseModel.Config):
class ModelInput(ModelInputBase):
tokens1: BERTTensorizer.Config = BERTTensorizer.Config(
tokens1: BERTTensorizerBase.Config = BERTTensorizer.Config(
columns=["text1"], max_seq_len=128
)
tokens2: BERTTensorizer.Config = BERTTensorizer.Config(
tokens2: BERTTensorizerBase.Config = BERTTensorizer.Config(
columns=["text2"], max_seq_len=128
)
labels: LabelTensorizer.Config = LabelTensorizer.Config()
Expand Down