[serving] Update dependencies

This commit is contained in:
Julien Chaumond
2020-01-27 19:58:00 -05:00
parent 9ca21c838b
commit 5004d5af42
2 changed files with 2 additions and 2 deletions

View File

@@ -63,7 +63,7 @@ extras["sklearn"] = ["scikit-learn"]
extras["tf"] = ["tensorflow"] extras["tf"] = ["tensorflow"]
extras["torch"] = ["torch"] extras["torch"] = ["torch"]
extras["serving"] = ["pydantic", "uvicorn", "fastapi"] extras["serving"] = ["pydantic", "uvicorn", "fastapi", "starlette"]
extras["all"] = extras["serving"] + ["tensorflow", "torch"] extras["all"] = extras["serving"] + ["tensorflow", "torch"]
extras["testing"] = ["pytest", "pytest-xdist"] extras["testing"] = ["pytest", "pytest-xdist"]

View File

@@ -2,7 +2,6 @@ import logging
from argparse import ArgumentParser, Namespace from argparse import ArgumentParser, Namespace
from typing import Any, List, Optional from typing import Any, List, Optional
from starlette.responses import JSONResponse
from transformers import Pipeline from transformers import Pipeline
from transformers.commands import BaseTransformersCLICommand from transformers.commands import BaseTransformersCLICommand
from transformers.pipelines import SUPPORTED_TASKS, pipeline from transformers.pipelines import SUPPORTED_TASKS, pipeline
@@ -13,6 +12,7 @@ try:
from fastapi import FastAPI, HTTPException, Body from fastapi import FastAPI, HTTPException, Body
from fastapi.routing import APIRoute from fastapi.routing import APIRoute
from pydantic import BaseModel from pydantic import BaseModel
from starlette.responses import JSONResponse
_serve_dependancies_installed = True _serve_dependancies_installed = True
except (ImportError, AttributeError): except (ImportError, AttributeError):