logo
Browse Source

Remove useless parameter

Signed-off-by: Jael Gu <mengjia.gu@zilliz.com>
main
Jael Gu 2 years ago
parent
commit
78aa00a4ab
  1. 1
      codebert.py

1
codebert.py

@ -45,7 +45,6 @@ class CodeBert(NNOperator):
def __init__(self, model_name: str = 'huggingface/CodeBERTa-small-v1', device: str = None): def __init__(self, model_name: str = 'huggingface/CodeBERTa-small-v1', device: str = None):
super().__init__() super().__init__()
self.model_name = model_name self.model_name = model_name
assert modality in ['nlp', 'code'], 'Invalid modality value. Accept only "nlp" or "code".'
if device is None: if device is None:
device = 'cuda' if torch.cuda.is_available() else 'cpu' device = 'cuda' if torch.cuda.is_available() else 'cpu'

Loading…
Cancel
Save