diff --git a/weave/tests/trace/op_versioning_solo.py b/weave/tests/trace/op_versioning_solo.py index bacc0e27155..ac3afc6dd39 100644 --- a/weave/tests/trace/op_versioning_solo.py +++ b/weave/tests/trace/op_versioning_solo.py @@ -1,7 +1,6 @@ import numpy as np import weave -from weave.legacy.weave import artifact_fs @weave.op() diff --git a/weave/tests/trace/test_op_versioning.py b/weave/tests/trace/test_op_versioning.py index 3fc023e235c..b77d35a49d1 100644 --- a/weave/tests/trace/test_op_versioning.py +++ b/weave/tests/trace/test_op_versioning.py @@ -5,7 +5,7 @@ import pytest import weave -from weave.legacy.weave import artifact_fs, derive_op, op_def +from weave.legacy.weave import artifact_fs, derive_op from weave.trace_server.trace_server_interface import FileContentReadReq, ObjReadReq diff --git a/weave/trace/errors.py b/weave/trace/errors.py index b1aeab7b3d0..752ac759e62 100644 --- a/weave/trace/errors.py +++ b/weave/trace/errors.py @@ -17,3 +17,9 @@ class WeaveOpSerializeError(WeaveSerializeError): ... class WeaveInitError(Error): ... + + +class WeaveDefinitionError(Error): ... + + +class WeaveWandbAuthenticationException(Error): ... diff --git a/weave/trace/serve_fastapi.py b/weave/trace/serve_fastapi.py index 98adc7537b1..9351f968e7b 100644 --- a/weave/trace/serve_fastapi.py +++ b/weave/trace/serve_fastapi.py @@ -12,13 +12,12 @@ except ImportError: from typing_extensions import Annotated # type: ignore -from weave.legacy.weave import cache, op_args, pyfunc_type_util +from weave.legacy.weave import cache, op_args, pyfunc_type_util, weave_pydantic from weave.legacy.weave.wandb_api import WandbApiAsync +from weave.trace import errors from weave.trace.op import Op from weave.trace.refs import ObjectRef -from ..legacy.weave import errors, weave_pydantic - key_cache: cache.LruTimeWindowCache[str, typing.Optional[bool]] = ( cache.LruTimeWindowCache(datetime.timedelta(minutes=5)) ) diff --git a/weave/trace/weave_init.py b/weave/trace/weave_init.py index 55188cad443..603cf0b3592 100644 --- a/weave/trace/weave_init.py +++ b/weave/trace/weave_init.py @@ -1,7 +1,6 @@ import typing -from weave.legacy.weave import errors -from weave.trace import autopatch, init_message, trace_sentry, weave_client +from weave.trace import autopatch, errors, init_message, trace_sentry, weave_client from weave.trace.client_context import weave_client as weave_client_context from weave.trace_server import remote_http_trace_server, sqlite_trace_server