Skip to content

Commit

Permalink
move to legacy: weave_internal
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtruong committed Aug 27, 2024
1 parent 8b7d953 commit 86b5b61
Show file tree
Hide file tree
Showing 97 changed files with 304 additions and 316 deletions.
2 changes: 1 addition & 1 deletion examples/experimental/skip_test/Confusion Matrix.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"from PIL import Image\n",
"import weave\n",
"from weave.legacy import storage\n",
"from weave import weave_internal\n",
"from weave.legacy import weave_internal\n",
"#weave.use_frontend_devmode()"
]
},
Expand Down
2 changes: 1 addition & 1 deletion examples/experimental/skip_test/Diffusion explore 2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"outputs": [],
"source": [
"import weave\n",
"from weave import weave_internal\n",
"from weave.legacy import weave_internal\n",
"from weave.legacy.ecosystem.all import langchain\n",
"weave.use_frontend_devmode()"
]
Expand Down
2 changes: 1 addition & 1 deletion examples/experimental/skip_test/Diffusion explore.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"outputs": [],
"source": [
"import weave\n",
"from weave import weave_internal\n",
"from weave.legacy import weave_internal\n",
"from weave.legacy.ecosystem.all import langchain"
]
},
Expand Down
2 changes: 1 addition & 1 deletion examples/experimental/skip_test/Diffusion story.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"outputs": [],
"source": [
"import weave\n",
"from weave import weave_internal\n",
"from weave.legacy import weave_internal\n",
"from weave.legacy.ecosystem.all import langchain\n",
"weave.use_frontend_devmode()"
]
Expand Down
2 changes: 1 addition & 1 deletion examples/experimental/skip_test/art_explore.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"outputs": [],
"source": [
"import weave\n",
"from weave import weave_internal\n",
"from weave.legacy import weave_internal\n",
"from weave.legacy.ecosystem.all import langchain"
]
},
Expand Down
2 changes: 1 addition & 1 deletion examples/experimental/skip_test/weave_scifi.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"outputs": [],
"source": [
"import weave\n",
"from weave import weave_internal\n",
"from weave.legacy import weave_internal\n",
"from weave.legacy.ecosystem.all import langchain\n",
"weave.use_frontend_devmode()"
]
Expand Down
2 changes: 1 addition & 1 deletion examples/experimental/tag_search.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"outputs": [],
"source": [
"import weave\n",
"from weave import weave_internal"
"from weave.legacy import weave_internal"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion examples/reference/panels/plot/synced_axes.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"outputs": [],
"source": [
"from weave.legacy.panels.panel_plot import Signals, AxisSelections, Plot\n",
"from weave import weave_internal\n",
"from weave.legacy import weave_internal\n",
"\n",
"\n",
"domain_node = weave_internal.const(None)\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/reference/vis/Distribution.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"metadata": {},
"outputs": [],
"source": [
"from weave import weave_internal\n",
"from weave.legacy import weave_internal\n",
"# Numeric distribution\n",
"dist = wandb.Distribution(\n",
" items,\n",
Expand Down
2 changes: 1 addition & 1 deletion weave/legacy/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from . import ref_base as _ref_base
from weave.legacy import wandb_api as _wandb_api

from .. import weave_internal as _weave_internal
from weave.legacy import weave_internal as _weave_internal

from weave.legacy import util as _util

Expand Down
2 changes: 1 addition & 1 deletion weave/legacy/arrow/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import pyarrow.compute as pc

from weave.legacy import api as api
from weave import weave_internal
from weave.legacy import weave_internal
from weave.legacy import weave_types as types
from weave.legacy import errors, arrow_util, artifact_base, artifact_mem, box, mappers_arrow
from weave.legacy.arrow.arrow import (
Expand Down
4 changes: 1 addition & 3 deletions weave/legacy/arrow/list_.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@
import pyarrow.compute as pc
import typing_extensions

from weave import (
weave_internal,
)
from weave.legacy import weave_types as types
from weave.legacy import (
weave_internal,
errors,
_dict_utils,
artifact_base,
Expand Down
4 changes: 2 additions & 2 deletions weave/legacy/codify.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,15 +201,15 @@ def _node_to_code(node: graph.Node, wrap_const_node: bool = True) -> str:

if current_frame is not None and node.name in current_frame:
return node.name
return f"weave.weave_internal.make_var_node({_type_to_code(node.type)}, '{node.name}')"
return f"weave.legacy.weave_internal.make_var_node({_type_to_code(node.type)}, '{node.name}')"
elif isinstance(node, graph.ConstNode):
if isinstance(node.type, weave_types.Function):
vars = list(node.type.input_types.keys())
return lambda_wrapped_object_to_code_no_format(node.val, vars)
else:
val_as_code = object_to_code_no_format(node.val)
if wrap_const_node:
return f"weave.weave_internal.const({val_as_code})"
return f"weave.legacy.weave_internal.const({val_as_code})"
else:
return val_as_code
elif isinstance(node, graph.OutputNode):
Expand Down
4 changes: 1 addition & 3 deletions weave/legacy/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
import re
import typing

from weave import (
weave_internal,
)
from weave.legacy import weave_types as types
from weave.legacy import (
weave_internal,
errors,
engine_trace,
box,
Expand Down
6 changes: 2 additions & 4 deletions weave/legacy/derive_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@
import inspect
import typing

from weave import (
storage,
weave_internal,
)
from weave.legacy import weave_types as types
from weave.legacy import (
storage,
weave_internal,
errors,
parallelism,
registry_mem,
Expand Down
2 changes: 1 addition & 1 deletion weave/legacy/eager.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from weave.legacy import context_state, graph

from .. import weave_internal
from weave.legacy import weave_internal
from weave.legacy import weave_types as types

WeaveIterObjectType = typing.TypeVar("WeaveIterObjectType")
Expand Down
2 changes: 1 addition & 1 deletion weave/legacy/ecosystem/wandb/panel_distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import typing

import weave
from weave import weave_internal
from weave.legacy import weave_internal
from weave.legacy import panel_util
from weave.legacy.ecosystem.wandb import weave_plotly

Expand Down
2 changes: 1 addition & 1 deletion weave/legacy/ecosystem/wandb/panel_geo.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import typing

import weave
from weave import weave_internal
from weave.legacy import weave_internal
from weave.legacy.ecosystem.wandb import weave_plotly


Expand Down
2 changes: 1 addition & 1 deletion weave/legacy/ecosystem/wandb/panel_scatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import typing

import weave
from weave import weave_internal
from weave.legacy import weave_internal
from weave.legacy.ecosystem.wandb import weave_plotly


Expand Down
2 changes: 1 addition & 1 deletion weave/legacy/ecosystem/wandb/panel_time_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import typing

import weave
from weave import weave_internal
from weave.legacy import weave_internal
from weave.legacy.ecosystem.wandb import weave_plotly
from weave.legacy.language_features.tagging import tagged_value_type
from weave.legacy.panel_util import make_node
Expand Down
2 changes: 1 addition & 1 deletion weave/legacy/ecosystem/wandb/test_panel_distribution.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import random

import weave
from weave import weave_internal
from weave.legacy import weave_internal
from weave.legacy.ecosystem.wandb import panel_distribution


Expand Down
2 changes: 1 addition & 1 deletion weave/legacy/ecosystem/wandb/weave_plotly.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from plotly import graph_objs as go

import weave
from weave import weave_internal
from weave.legacy import weave_internal
from weave.legacy import infer_types


Expand Down
4 changes: 1 addition & 3 deletions weave/legacy/execute_fast.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import logging

from weave import (
weave_internal,
)
from weave.legacy import weave_types as types
from weave.legacy import (
weave_internal,
errors,
engine_trace,
ref_base,
Expand Down
2 changes: 1 addition & 1 deletion weave/legacy/make_type.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .. import weave_internal
from weave.legacy import weave_internal
from weave.legacy import weave_types as types


Expand Down
2 changes: 1 addition & 1 deletion weave/legacy/mappers_publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import typing

from weave.legacy import storage
from weave import weave_internal
from weave.legacy import weave_internal
from weave.legacy import weave_types as types
from weave.legacy.node_ref import ref_to_node

Expand Down
Loading

0 comments on commit 86b5b61

Please sign in to comment.