wandb 0.21.3__py3-none-win32.whl → 0.22.0__py3-none-win32.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wandb/__init__.py +1 -1
- wandb/__init__.pyi +1 -1
- wandb/_analytics.py +65 -0
- wandb/_iterutils.py +8 -0
- wandb/_pydantic/__init__.py +10 -11
- wandb/_pydantic/base.py +3 -53
- wandb/_pydantic/field_types.py +29 -0
- wandb/_pydantic/v1_compat.py +47 -30
- wandb/_strutils.py +40 -0
- wandb/apis/public/__init__.py +42 -0
- wandb/apis/public/api.py +17 -4
- wandb/apis/public/artifacts.py +5 -4
- wandb/apis/public/automations.py +2 -1
- wandb/apis/public/registries/_freezable_list.py +6 -6
- wandb/apis/public/registries/_utils.py +2 -1
- wandb/apis/public/registries/registries_search.py +4 -0
- wandb/apis/public/registries/registry.py +7 -0
- wandb/apis/public/runs.py +24 -6
- wandb/automations/_filters/expressions.py +3 -2
- wandb/automations/_filters/operators.py +2 -1
- wandb/automations/_validators.py +20 -0
- wandb/automations/actions.py +4 -2
- wandb/automations/events.py +4 -5
- wandb/bin/gpu_stats.exe +0 -0
- wandb/bin/wandb-core +0 -0
- wandb/cli/beta.py +48 -130
- wandb/cli/beta_sync.py +226 -0
- wandb/integration/dspy/__init__.py +5 -0
- wandb/integration/dspy/dspy.py +422 -0
- wandb/integration/weave/weave.py +55 -0
- wandb/proto/v3/wandb_internal_pb2.py +234 -224
- wandb/proto/v3/wandb_server_pb2.py +38 -57
- wandb/proto/v3/wandb_sync_pb2.py +87 -0
- wandb/proto/v3/wandb_telemetry_pb2.py +12 -12
- wandb/proto/v4/wandb_internal_pb2.py +226 -224
- wandb/proto/v4/wandb_server_pb2.py +38 -41
- wandb/proto/v4/wandb_sync_pb2.py +38 -0
- wandb/proto/v4/wandb_telemetry_pb2.py +12 -12
- wandb/proto/v5/wandb_internal_pb2.py +226 -224
- wandb/proto/v5/wandb_server_pb2.py +38 -41
- wandb/proto/v5/wandb_sync_pb2.py +39 -0
- wandb/proto/v5/wandb_telemetry_pb2.py +12 -12
- wandb/proto/v6/wandb_base_pb2.py +3 -3
- wandb/proto/v6/wandb_internal_pb2.py +229 -227
- wandb/proto/v6/wandb_server_pb2.py +41 -44
- wandb/proto/v6/wandb_settings_pb2.py +3 -3
- wandb/proto/v6/wandb_sync_pb2.py +49 -0
- wandb/proto/v6/wandb_telemetry_pb2.py +15 -15
- wandb/proto/wandb_generate_proto.py +1 -0
- wandb/proto/wandb_sync_pb2.py +12 -0
- wandb/sdk/artifacts/_validators.py +50 -49
- wandb/sdk/artifacts/artifact.py +7 -7
- wandb/sdk/artifacts/exceptions.py +2 -1
- wandb/sdk/artifacts/storage_handlers/gcs_handler.py +1 -1
- wandb/sdk/artifacts/storage_handlers/http_handler.py +1 -3
- wandb/sdk/artifacts/storage_handlers/local_file_handler.py +1 -1
- wandb/sdk/artifacts/storage_handlers/s3_handler.py +3 -2
- wandb/sdk/artifacts/storage_policies/_factories.py +63 -0
- wandb/sdk/artifacts/storage_policies/wandb_storage_policy.py +59 -124
- wandb/sdk/interface/interface.py +10 -0
- wandb/sdk/interface/interface_shared.py +9 -0
- wandb/sdk/lib/asyncio_compat.py +88 -23
- wandb/sdk/lib/gql_request.py +18 -7
- wandb/sdk/lib/printer.py +9 -13
- wandb/sdk/lib/progress.py +8 -6
- wandb/sdk/lib/service/service_connection.py +42 -12
- wandb/sdk/mailbox/wait_with_progress.py +1 -1
- wandb/sdk/wandb_init.py +9 -9
- wandb/sdk/wandb_run.py +13 -1
- wandb/sdk/wandb_settings.py +55 -0
- wandb/wandb_agent.py +35 -4
- {wandb-0.21.3.dist-info → wandb-0.22.0.dist-info}/METADATA +1 -1
- {wandb-0.21.3.dist-info → wandb-0.22.0.dist-info}/RECORD +76 -64
- {wandb-0.21.3.dist-info → wandb-0.22.0.dist-info}/WHEEL +0 -0
- {wandb-0.21.3.dist-info → wandb-0.22.0.dist-info}/entry_points.txt +0 -0
- {wandb-0.21.3.dist-info → wandb-0.22.0.dist-info}/licenses/LICENSE +0 -0
wandb/integration/weave/weave.py
CHANGED
@@ -10,6 +10,7 @@ The integration can be disabled by setting the WANDB_DISABLE_WEAVE environment v
|
|
10
10
|
|
11
11
|
from __future__ import annotations
|
12
12
|
|
13
|
+
import importlib.util
|
13
14
|
import os
|
14
15
|
import sys
|
15
16
|
import threading
|
@@ -21,6 +22,31 @@ _weave_init_lock = threading.Lock()
|
|
21
22
|
_DISABLE_WEAVE = "WANDB_DISABLE_WEAVE"
|
22
23
|
_WEAVE_PACKAGE_NAME = "weave"
|
23
24
|
|
25
|
+
# This list is adapted from https://github.com/wandb/weave/blob/master/weave/integrations/__init__.py
|
26
|
+
_AVAILABLE_WEAVE_INTEGRATIONS = [
|
27
|
+
"anthropic",
|
28
|
+
"autogen",
|
29
|
+
"cohere",
|
30
|
+
"crewai",
|
31
|
+
"dspy",
|
32
|
+
"google.genai",
|
33
|
+
"groq",
|
34
|
+
"huggingface_hub.inference",
|
35
|
+
"instructor",
|
36
|
+
"langchain",
|
37
|
+
"litellm",
|
38
|
+
"llama_index",
|
39
|
+
"mcp",
|
40
|
+
"mistral",
|
41
|
+
"notdiamond",
|
42
|
+
"openai",
|
43
|
+
"agents",
|
44
|
+
"smolagents",
|
45
|
+
"verdict",
|
46
|
+
"verifiers",
|
47
|
+
"vertexai",
|
48
|
+
]
|
49
|
+
|
24
50
|
|
25
51
|
def setup(entity: str | None, project: str | None) -> None:
|
26
52
|
"""Set up automatic Weave initialization for the current W&B run.
|
@@ -43,6 +69,7 @@ def setup(entity: str | None, project: str | None) -> None:
|
|
43
69
|
# If weave is not yet imported, we can't init it from here. Instead, we'll
|
44
70
|
# rely on the weave library itself to detect a run and init itself.
|
45
71
|
if _WEAVE_PACKAGE_NAME not in sys.modules:
|
72
|
+
_maybe_suggest_weave_installation()
|
46
73
|
return
|
47
74
|
|
48
75
|
# If weave has already been imported, initialize immediately
|
@@ -61,3 +88,31 @@ def setup(entity: str | None, project: str | None) -> None:
|
|
61
88
|
weave.init(project_path)
|
62
89
|
except Exception as e:
|
63
90
|
wandb.termwarn(f"Failed to automatically initialize Weave: {e}")
|
91
|
+
|
92
|
+
|
93
|
+
def _maybe_suggest_weave_installation() -> None:
|
94
|
+
"""Suggest Weave installation or import if any target library is imported."""
|
95
|
+
imported_libs = [lib for lib in _AVAILABLE_WEAVE_INTEGRATIONS if lib in sys.modules]
|
96
|
+
if not imported_libs:
|
97
|
+
return
|
98
|
+
|
99
|
+
weave_spec = importlib.util.find_spec(_WEAVE_PACKAGE_NAME)
|
100
|
+
if weave_spec is None:
|
101
|
+
# Weave is not installed
|
102
|
+
msg = (
|
103
|
+
"Use W&B Weave for improved LLM call tracing. Install Weave with "
|
104
|
+
"`pip install weave` then add `import weave` to the top of your script."
|
105
|
+
)
|
106
|
+
else:
|
107
|
+
# Weave is installed but not imported
|
108
|
+
msg = (
|
109
|
+
"Use W&B Weave for improved LLM call tracing. Weave is installed "
|
110
|
+
"but not imported. Add `import weave` to the top of your script."
|
111
|
+
)
|
112
|
+
|
113
|
+
wandb.termlog(f"Detected [{', '.join(imported_libs)}] in use.", repeat=False)
|
114
|
+
wandb.termlog(msg, repeat=False)
|
115
|
+
wandb.termlog(
|
116
|
+
"For more information, check out the docs at: https://weave-docs.wandb.ai/",
|
117
|
+
repeat=False,
|
118
|
+
)
|