From f8f85ed67553e05deb47fed715751ac839bc85e0 Mon Sep 17 00:00:00 2001 From: Andrew Truong Date: Mon, 26 Aug 2024 08:50:09 -0400 Subject: [PATCH] delete: extraneous import --- weave/tests/trace/op_versioning_solo.py | 1 - weave/tests/trace/test_op_versioning.py | 2 +- weave/trace/errors.py | 6 ++++++ weave/trace/serve_fastapi.py | 5 ++--- weave/trace/weave_init.py | 3 +-- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/weave/tests/trace/op_versioning_solo.py b/weave/tests/trace/op_versioning_solo.py index bacc0e27155a..ac3afc6dd396 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 3fc023e235c4..b77d35a49d1a 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 b1aeab7b3d08..752ac759e622 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 98adc7537b10..9351f968e7b7 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 55188cad443f..603cf0b35924 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