Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Commit

Permalink
refactor(client): remove benchmark client
Browse files Browse the repository at this point in the history
  • Loading branch information
hanhxiao committed Sep 29, 2019
1 parent 66b78f9 commit 1b85375
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions gnes/encoder/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 5 additions & 6 deletions tests/test_flair_encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 1b85375

Please sign in to comment.