From 78aa00a4ab5d2196393f8afdbb9d76b11066deba Mon Sep 17 00:00:00 2001 From: Jael Gu Date: Tue, 8 Nov 2022 15:36:42 +0800 Subject: [PATCH] Remove useless parameter Signed-off-by: Jael Gu --- codebert.py | 1 - 1 file changed, 1 deletion(-) diff --git a/codebert.py b/codebert.py index db11eac..de3ed5b 100644 --- a/codebert.py +++ b/codebert.py @@ -45,7 +45,6 @@ class CodeBert(NNOperator): def __init__(self, model_name: str = 'huggingface/CodeBERTa-small-v1', device: str = None): super().__init__() self.model_name = model_name - assert modality in ['nlp', 'code'], 'Invalid modality value. Accept only "nlp" or "code".' if device is None: device = 'cuda' if torch.cuda.is_available() else 'cpu'