Skip to content

Commit

Permalink
move to legacy: weave_types
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtruong committed Aug 27, 2024
1 parent fdffde0 commit 257446a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions weave/weave_pydantic.py → weave/legacy/weave_pydantic.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from pydantic import BaseModel, create_model

from . import weave_types as types
from .legacy import infer_types
from .. import weave_types as types
from . import infer_types


def weave_type_to_pydantic(
Expand Down
3 changes: 2 additions & 1 deletion weave/serve_fastapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
from weave.trace.op import Op
from weave.trace.refs import ObjectRef

from . import errors, 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
2 changes: 1 addition & 1 deletion weave/weave_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,7 @@ def property_types(self) -> dict[str, Type]:

@classmethod
def typeclass_of_class(cls, check_class):
from . import weave_pydantic
from .legacy import weave_pydantic

if not issubclass(check_class, pydantic.BaseModel):
return cls
Expand Down

0 comments on commit 257446a

Please sign in to comment.