From b3cb5c94e382e651b6662c92353f2a1d517755fa Mon Sep 17 00:00:00 2001 From: Tim Sweeney Date: Fri, 16 Aug 2024 13:49:09 -0700 Subject: [PATCH 01/12] chore: Fix mypy in weave_init --- weave/init_message.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/weave/init_message.py b/weave/init_message.py index ffb6da21cf6..34f107139dd 100644 --- a/weave/init_message.py +++ b/weave/init_message.py @@ -44,10 +44,17 @@ def _print_version_check() -> None: if use_message: print(use_message) - orig_module = wandb._wandb_module - wandb._wandb_module = "weave" - weave_messages = wandb.sdk.internal.update.check_available(weave.__version__) - wandb._wandb_module = orig_module + weave_messages = None + if hasattr(weave, "_wandb_module"): + try: + orig_module = wandb._wandb_module # type: ignore + wandb._wandb_module = "weave" # type: ignore + weave_messages = wandb.sdk.internal.update.check_available( + weave.__version__ + ) + wandb._wandb_module = orig_module # type: ignore + except Exception: + weave_messages = None if weave_messages: use_message = ( From a8936c2db8d6b5fde554249ef05a0e0af38452d6 Mon Sep 17 00:00:00 2001 From: Tim Sweeney Date: Fri, 16 Aug 2024 14:09:52 -0700 Subject: [PATCH 02/12] chore: Fixes smart flattening to only skip custom types --- .../PagePanelComponents/Home/Browse2/browse2Util.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/weave-js/src/components/PagePanelComponents/Home/Browse2/browse2Util.ts b/weave-js/src/components/PagePanelComponents/Home/Browse2/browse2Util.ts index 85303bcc1cd..9bfb3e3e1d4 100644 --- a/weave-js/src/components/PagePanelComponents/Home/Browse2/browse2Util.ts +++ b/weave-js/src/components/PagePanelComponents/Home/Browse2/browse2Util.ts @@ -7,7 +7,11 @@ export const flattenObjectPreservingWeaveTypes = (obj: { [key: string]: any; }) => { return flattenObject(obj, '', {}, (key, value) => { - return typeof value !== 'object' || value == null || value._type == null; + return ( + typeof value !== 'object' || + value == null || + value._type !== 'CustomWeaveType' + ); }); }; From e7ff109956decc75acd0d307ac8c218d7b56900e Mon Sep 17 00:00:00 2001 From: Weave Build Bot Date: Fri, 16 Aug 2024 21:13:56 +0000 Subject: [PATCH 03/12] chore(bot): update frontend bundle sha [no ci] --- weave/frontend/index.html | 2 +- weave/frontend/sha1.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/weave/frontend/index.html b/weave/frontend/index.html index df8fc6d8d32..ece4bec1eff 100644 --- a/weave/frontend/index.html +++ b/weave/frontend/index.html @@ -91,7 +91,7 @@ - + diff --git a/weave/frontend/sha1.txt b/weave/frontend/sha1.txt index cd7dda9fcf6..e6f622e4e43 100644 --- a/weave/frontend/sha1.txt +++ b/weave/frontend/sha1.txt @@ -1 +1 @@ -227b1744ef346252dbd08110d9db4f09e752fcfc +162b7d481adba453dfb6af402634f72b5aa5139a From bce0fbd442b8ade1b479101e1b37aa5f468cccb2 Mon Sep 17 00:00:00 2001 From: Tim Sweeney Date: Fri, 16 Aug 2024 14:48:03 -0700 Subject: [PATCH 04/12] fix: Empty panels now have nicer not found messages (#2154) * init * fixed --- .../Home/Browse3/NotFoundPanel.tsx | 20 ++++++++++++++++++ .../Home/Browse3/pages/CallPage/CallPage.tsx | 21 +++---------------- .../Home/Browse3/pages/ObjectVersionPage.tsx | 3 ++- .../Home/Browse3/pages/OpVersionPage.tsx | 3 ++- 4 files changed, 27 insertions(+), 20 deletions(-) create mode 100644 weave-js/src/components/PagePanelComponents/Home/Browse3/NotFoundPanel.tsx diff --git a/weave-js/src/components/PagePanelComponents/Home/Browse3/NotFoundPanel.tsx b/weave-js/src/components/PagePanelComponents/Home/Browse3/NotFoundPanel.tsx new file mode 100644 index 00000000000..54aeb4477aa --- /dev/null +++ b/weave-js/src/components/PagePanelComponents/Home/Browse3/NotFoundPanel.tsx @@ -0,0 +1,20 @@ +import {ErrorPanel} from '@wandb/weave/components/ErrorPanel'; +import React, {FC, useContext} from 'react'; + +import {Button} from '../../../Button'; +import {useClosePeek, WeaveflowPeekContext} from './context'; + +export const NotFoundPanel: FC<{title: string}> = ({title}) => { + const close = useClosePeek(); + const {isPeeking} = useContext(WeaveflowPeekContext); + return ( +
+
+ {isPeeking &&
+
+ +
+
+ ); +}; diff --git a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/CallPage/CallPage.tsx b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/CallPage/CallPage.tsx index 517bb1b4e24..78af2e03159 100644 --- a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/CallPage/CallPage.tsx +++ b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/CallPage/CallPage.tsx @@ -1,5 +1,4 @@ import Box from '@mui/material/Box'; -import {ErrorPanel} from '@wandb/weave/components/ErrorPanel'; import {Loading} from '@wandb/weave/components/Loading'; import {useViewTraceEvent} from '@wandb/weave/integrations/analytics/useViewEvents'; import React, {FC, useCallback} from 'react'; @@ -9,12 +8,9 @@ import {makeRefCall} from '../../../../../../util/refs'; import {Button} from '../../../../../Button'; import {Tailwind} from '../../../../../Tailwind'; import {Browse2OpDefCode} from '../../../Browse2/Browse2OpDefCode'; -import { - TRACETREE_PARAM, - useClosePeek, - useWeaveflowCurrentRouteContext, -} from '../../context'; +import {TRACETREE_PARAM, useWeaveflowCurrentRouteContext} from '../../context'; import {FeedbackGrid} from '../../feedback/FeedbackGrid'; +import {NotFoundPanel} from '../../NotFoundPanel'; import {isEvaluateOp} from '../common/heuristics'; import {CenteredAnimatedLoader} from '../common/Loader'; import {SimplePageLayoutWithHeader} from '../common/SimplePageLayout'; @@ -26,7 +22,6 @@ import {CallDetails} from './CallDetails'; import {CallOverview} from './CallOverview'; import {CallSummary} from './CallSummary'; import {CallTraceView, useCallFlattenedTraceTree} from './CallTraceView'; - export const CallPage: FC<{ entity: string; project: string; @@ -34,7 +29,6 @@ export const CallPage: FC<{ path?: string; }> = props => { const {useCall} = useWFHooks(); - const close = useClosePeek(); const call = useCall({ entity: props.entity, @@ -45,16 +39,7 @@ export const CallPage: FC<{ if (call.loading) { return ; } else if (call.result === null) { - return ( -
-
-
-
- -
-
- ); + return ; } return ; }; diff --git a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/ObjectVersionPage.tsx b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/ObjectVersionPage.tsx index f4be43cd81c..f8c85adeae7 100644 --- a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/ObjectVersionPage.tsx +++ b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/ObjectVersionPage.tsx @@ -4,6 +4,7 @@ import React, {useMemo} from 'react'; import {maybePluralizeWord} from '../../../../../core/util/string'; import {LoadingDots} from '../../../../LoadingDots'; +import {NotFoundPanel} from '../NotFoundPanel'; import {CustomWeaveTypeProjectContext} from '../typeViews/CustomWeaveTypeDispatcher'; import {WeaveCHTableSourceRefContext} from './CallPage/DataTableView'; import {ObjectViewerSection} from './CallPage/ObjectViewerSection'; @@ -59,7 +60,7 @@ export const ObjectVersionPage: React.FC<{ if (objectVersion.loading) { return ; } else if (objectVersion.result == null) { - return
Object not found
; + return ; } return ( diff --git a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/OpVersionPage.tsx b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/OpVersionPage.tsx index 030b8980675..8b76964845a 100644 --- a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/OpVersionPage.tsx +++ b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/OpVersionPage.tsx @@ -1,6 +1,7 @@ import React, {useMemo} from 'react'; import {LoadingDots} from '../../../../LoadingDots'; +import {NotFoundPanel} from '../NotFoundPanel'; import {OpCodeViewer} from '../OpCodeViewer'; import { CallsLink, @@ -35,7 +36,7 @@ export const OpVersionPage: React.FC<{ if (opVersion.loading) { return ; } else if (opVersion.result == null) { - return
Op version not found
; + return ; } return ; }; From 2c049d42ec1424c42463b7b47eb15b81d2f0d6e4 Mon Sep 17 00:00:00 2001 From: Weave Build Bot Date: Fri, 16 Aug 2024 21:52:25 +0000 Subject: [PATCH 05/12] chore(bot): update frontend bundle sha [no ci] --- weave/frontend/index.html | 2 +- weave/frontend/sha1.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/weave/frontend/index.html b/weave/frontend/index.html index ece4bec1eff..256e3484f1d 100644 --- a/weave/frontend/index.html +++ b/weave/frontend/index.html @@ -91,7 +91,7 @@ - + diff --git a/weave/frontend/sha1.txt b/weave/frontend/sha1.txt index e6f622e4e43..b30a7d88326 100644 --- a/weave/frontend/sha1.txt +++ b/weave/frontend/sha1.txt @@ -1 +1 @@ -162b7d481adba453dfb6af402634f72b5aa5139a +015f333e5a2840e84937f4fb35bc51abaecef511 From a5c860cf3dbde72f8b7e86e469e03514bb38ec12 Mon Sep 17 00:00:00 2001 From: Tim Sweeney Date: Fri, 16 Aug 2024 15:09:27 -0700 Subject: [PATCH 06/12] fix: No longer crash when object or op not found in UI #2155 --- .../pages/wfReactInterface/tsDataModelHooks.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/wfReactInterface/tsDataModelHooks.ts b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/wfReactInterface/tsDataModelHooks.ts index 93f239b2d23..b659a35b845 100644 --- a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/wfReactInterface/tsDataModelHooks.ts +++ b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/wfReactInterface/tsDataModelHooks.ts @@ -669,6 +669,13 @@ const useOpVersion = ( }; } + if (opVersionRes.obj == null) { + return { + loading: false, + result: null, + }; + } + const returnedResult = convertTraceServerObjectVersionToOpSchema( opVersionRes.obj ); @@ -812,6 +819,13 @@ const useObjectVersion = ( }; } + if (objectVersionRes.obj == null) { + return { + loading: false, + result: null, + }; + } + const returnedResult: ObjectVersionSchema = convertTraceServerObjectVersionToSchema(objectVersionRes.obj); From cd13371dd043616025a784ba1455fdfc88035c21 Mon Sep 17 00:00:00 2001 From: Weave Build Bot Date: Fri, 16 Aug 2024 22:13:50 +0000 Subject: [PATCH 07/12] chore(bot): update frontend bundle sha [no ci] --- weave/frontend/index.html | 2 +- weave/frontend/sha1.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/weave/frontend/index.html b/weave/frontend/index.html index 256e3484f1d..6714e87ac97 100644 --- a/weave/frontend/index.html +++ b/weave/frontend/index.html @@ -91,7 +91,7 @@ - + diff --git a/weave/frontend/sha1.txt b/weave/frontend/sha1.txt index b30a7d88326..dbac154c956 100644 --- a/weave/frontend/sha1.txt +++ b/weave/frontend/sha1.txt @@ -1 +1 @@ -015f333e5a2840e84937f4fb35bc51abaecef511 +efaf19cc49446df9098bb71c48277cb610acd0c6 From bd2f5acd648af82901d157079b81f44993081ace Mon Sep 17 00:00:00 2001 From: Jamie Rasmussen <112953339+jamie-rasmussen@users.noreply.github.com> Date: Mon, 19 Aug 2024 08:27:59 -0500 Subject: [PATCH 08/12] fix: scroll overflow on call summary tab (#2162) --- .../Home/Browse3/pages/CallPage/CallSummary.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/CallPage/CallSummary.tsx b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/CallPage/CallSummary.tsx index 793191fbd80..daa866cb4fe 100644 --- a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/CallPage/CallSummary.tsx +++ b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/CallPage/CallSummary.tsx @@ -32,7 +32,7 @@ export const CallSummary: React.FC<{ ); return ( -
+
Date: Mon, 19 Aug 2024 14:28:49 +0100 Subject: [PATCH 09/12] Update tutorial-tracing_2.md (#2160) --- docs/docs/tutorial-tracing_2.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/docs/tutorial-tracing_2.md b/docs/docs/tutorial-tracing_2.md index 108571cf650..da1980f1155 100644 --- a/docs/docs/tutorial-tracing_2.md +++ b/docs/docs/tutorial-tracing_2.md @@ -5,7 +5,6 @@ In the [Track LLM inputs & outputs](/quickstart) tutorial, the basics of trackin In this tutorial you will learn how to: - **Track data** as it flows though your application - **Track metadata** at call time -- **Export data** that was logged to Weave ## Tracking nested function calls From 8b8ec3d7ef7a4d0e1bef86c396d2f9974ef7041f Mon Sep 17 00:00:00 2001 From: Weave Build Bot Date: Mon, 19 Aug 2024 13:33:34 +0000 Subject: [PATCH 10/12] chore(bot): update frontend bundle sha [no ci] --- weave/frontend/index.html | 2 +- weave/frontend/sha1.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/weave/frontend/index.html b/weave/frontend/index.html index 6714e87ac97..120c2b0902c 100644 --- a/weave/frontend/index.html +++ b/weave/frontend/index.html @@ -91,7 +91,7 @@ - + diff --git a/weave/frontend/sha1.txt b/weave/frontend/sha1.txt index dbac154c956..6e9345ef6c5 100644 --- a/weave/frontend/sha1.txt +++ b/weave/frontend/sha1.txt @@ -1 +1 @@ -efaf19cc49446df9098bb71c48277cb610acd0c6 +2cc27ce1e62cbd6f166f7d24f94288fa6409d32a From 2e8ba2360fae68a5ce8d7040d4db96f215c74501 Mon Sep 17 00:00:00 2001 From: Jeff Rooks Date: Mon, 19 Aug 2024 11:22:04 -0400 Subject: [PATCH 11/12] pass ore attrs to legacy icon (#2163) --- .../src/common/components/elements/LegacyWBIcon.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/weave-js/src/common/components/elements/LegacyWBIcon.tsx b/weave-js/src/common/components/elements/LegacyWBIcon.tsx index b1fce5a4895..fa440a9ba03 100644 --- a/weave-js/src/common/components/elements/LegacyWBIcon.tsx +++ b/weave-js/src/common/components/elements/LegacyWBIcon.tsx @@ -26,6 +26,10 @@ export interface LegacyWBIconProps { style?: any; 'data-test'?: any; + + role?: string; + ariaHidden?: string; + ariaLabel?: string; } const LegacyWBIconComp = React.forwardRef( @@ -42,6 +46,10 @@ const LegacyWBIconComp = React.forwardRef( onMouseLeave, style, 'data-test': dataTest, + role, + title, + ariaHidden, + ariaLabel, }, ref ) => { @@ -59,6 +67,10 @@ const LegacyWBIconComp = React.forwardRef( onMouseLeave, style, 'data-test': dataTest, + role, + title, + 'aria-hidden': ariaHidden, + 'aria-label': ariaLabel, }; if (ref == null) { return ; From d87cfbd37751c61475db648e231a43fcd4bc0190 Mon Sep 17 00:00:00 2001 From: Weave Build Bot Date: Mon, 19 Aug 2024 15:27:17 +0000 Subject: [PATCH 12/12] chore(bot): update frontend bundle sha [no ci] --- weave/frontend/index.html | 2 +- weave/frontend/sha1.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/weave/frontend/index.html b/weave/frontend/index.html index 120c2b0902c..c96a45a9ae8 100644 --- a/weave/frontend/index.html +++ b/weave/frontend/index.html @@ -91,7 +91,7 @@ - + diff --git a/weave/frontend/sha1.txt b/weave/frontend/sha1.txt index 6e9345ef6c5..7a517474529 100644 --- a/weave/frontend/sha1.txt +++ b/weave/frontend/sha1.txt @@ -1 +1 @@ -2cc27ce1e62cbd6f166f7d24f94288fa6409d32a +18eebed493dc14f0fbaa3ab62505c6bdfd42ad6f