Skip to content

Commit

Permalink
move to trace: serve_fastapi
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtruong committed Aug 28, 2024
1 parent e741c0d commit f8759ac
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion weave/deploy/modal/stub.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
@asgi_app(label=safe_name(uri.name))
def fastapi_app() -> FastAPI:
from weave import api
from weave.serve_fastapi import object_method_app
from weave.trace.serve_fastapi import object_method_app

uri_ref = parse_uri(os.environ["MODEL_REF"])
if not isinstance(uri_ref, ObjectRef):
Expand Down
2 changes: 1 addition & 1 deletion weave/trace/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def serve(

from weave.legacy import wandb_api

from ..serve_fastapi import object_method_app
from .serve_fastapi import object_method_app

client = weave_client_context.require_weave_client()
# if not isinstance(
Expand Down
4 changes: 2 additions & 2 deletions weave/serve_fastapi.py → weave/trace/serve_fastapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
from weave.trace.op import Op
from weave.trace.refs import ObjectRef

from . import errors
from .legacy import weave_pydantic
from .. import errors
from ..legacy import weave_pydantic

key_cache: cache.LruTimeWindowCache[str, typing.Optional[bool]] = (
cache.LruTimeWindowCache(datetime.timedelta(minutes=5))
Expand Down

0 comments on commit f8759ac

Please sign in to comment.