Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
aniketmaurya committed Aug 14, 2021
1 parent fedd539 commit 16322b6
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
4 changes: 0 additions & 4 deletions chitra/serve/base.py
Expand Up @@ -65,7 +65,3 @@ def set_default_processor(self) -> DataProcessor:
{ModelServer.get_available_api_types()}"
)
return self.data_processor

@abc.abstractmethod
def run(self):
raise NotImplementedError
3 changes: 2 additions & 1 deletion tests/serve/cloud/test_chalice_server.py
Expand Up @@ -14,7 +14,8 @@

MODEL_PATH = "examples/assets/model.pth"
if not os.path.exists(MODEL_PATH):
MODEL_PATH = "https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/efficientnet_b0_ra-3dd342df.pth"
MODEL_PATH = "https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/\
efficientnet_b0_ra-3dd342df.pth"

url = (
"https://raw.githubusercontent.com/aniketmaurya/chitra/master/docs/assets/logo.png"
Expand Down
9 changes: 0 additions & 9 deletions tests/serve/test_model_server.py
@@ -1,7 +1,4 @@
import pytest

from chitra.serve import ModelServer
from chitra.serve import constants as const


def dummy_model(x: str):
Expand All @@ -11,9 +8,3 @@ def dummy_model(x: str):
def test_get_available_api_types():
model_server = ModelServer.get_available_api_types()
assert isinstance(model_server, list)


def test_model_server_run():
model_server = ModelServer(api_type=const.TXT_CLF, model=dummy_model)
with pytest.raises(NotImplementedError):
model_server.run()

0 comments on commit 16322b6

Please sign in to comment.