Skip to content
Permalink
Browse files

refactor(client): remove benchmark client

  • Loading branch information...
hanxiao committed Sep 29, 2019
1 parent 66b78f9 commit 1b85375cdc4af5c2287ddd359f8fcc96f5544348
Showing with 6 additions and 6 deletions.
  1. +1 −0 gnes/encoder/base.py
  2. +5 −6 tests/test_flair_encoder.py
@@ -49,6 +49,7 @@ def encode(self, text: List[str], *args, **kwargs) -> Union[Tuple, np.ndarray]:


class BaseNumericEncoder(BaseEncoder):
"""Note that all NumericEncoder can not be used as the first encoder of the pipeline"""

def encode(self, data: np.ndarray, *args, **kwargs) -> np.ndarray:
pass
@@ -17,15 +17,14 @@ def setUp(self):
if line:
self.test_str.append(line)

self.flair_encoder = FlairEncoder(
model_name=os.environ.get('FLAIR_CI_MODEL'),
pooling_strategy="REDUCE_MEAN")
self.flair_encoder = FlairEncoder(model_name=os.environ.get('FLAIR_CI_MODEL'))

@unittest.SkipTest
def test_encoding(self):
vec = self.flair_encoder.encode(self.test_str)
self.assertEqual(vec.shape[0], len(self.test_str))
self.assertEqual(vec.shape[1], 512)
vec = self.flair_encoder.encode(self.test_str[:2])
print(vec.shape)
self.assertEqual(vec.shape[0], 2)
self.assertEqual(vec.shape[1], 4196)

@unittest.SkipTest
def test_dump_load(self):

0 comments on commit 1b85375

Please sign in to comment.
You can’t perform that action at this time.