weave-haystack 3.1.0__tar.gz → 3.2.0__tar.gz
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.
- weave_haystack-3.2.0/CHANGELOG.md +20 -0
- {weave_haystack-3.1.0 → weave_haystack-3.2.0}/PKG-INFO +2 -1
- {weave_haystack-3.1.0 → weave_haystack-3.2.0}/example/hybrid_retrieval.py +1 -1
- weave_haystack-3.2.0/pydoc/config_docusaurus.yml +14 -0
- {weave_haystack-3.1.0 → weave_haystack-3.2.0}/pyproject.toml +16 -3
- {weave_haystack-3.1.0 → weave_haystack-3.2.0}/src/haystack_integrations/components/connectors/weave/weave_connector.py +7 -1
- {weave_haystack-3.1.0 → weave_haystack-3.2.0}/src/haystack_integrations/tracing/weave/tracer.py +4 -0
- {weave_haystack-3.1.0 → weave_haystack-3.2.0}/tests/test_weave_connector.py +2 -4
- weave_haystack-3.1.0/CHANGELOG.md +0 -9
- weave_haystack-3.1.0/pydoc/config_docusaurus.yml +0 -29
- {weave_haystack-3.1.0 → weave_haystack-3.2.0}/.gitignore +0 -0
- {weave_haystack-3.1.0 → weave_haystack-3.2.0}/LICENSE.txt +0 -0
- {weave_haystack-3.1.0 → weave_haystack-3.2.0}/README.md +0 -0
- {weave_haystack-3.1.0 → weave_haystack-3.2.0}/example/README.md +0 -0
- {weave_haystack-3.1.0 → weave_haystack-3.2.0}/src/haystack_integrations/components/connectors/py.typed +0 -0
- {weave_haystack-3.1.0 → weave_haystack-3.2.0}/src/haystack_integrations/components/connectors/weave/__init__.py +0 -0
- {weave_haystack-3.1.0 → weave_haystack-3.2.0}/src/haystack_integrations/tracing/py.typed +0 -0
- {weave_haystack-3.1.0 → weave_haystack-3.2.0}/src/haystack_integrations/tracing/weave/__init__.py +0 -0
- {weave_haystack-3.1.0 → weave_haystack-3.2.0}/tests/test_tracer.py +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [integrations/weave-v3.1.0] - 2026-01-14
|
|
4
|
+
|
|
5
|
+
### 🚀 Features
|
|
6
|
+
|
|
7
|
+
- Update weave components to auto call run `warm_up` (#2750)
|
|
8
|
+
|
|
9
|
+
### 🧹 Chores
|
|
10
|
+
|
|
11
|
+
- Standardize Weave integration - pt.2 (#2739)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [integrations/weave-v3.0.0] - 2026-01-13
|
|
15
|
+
|
|
16
|
+
### 🧹 Chores
|
|
17
|
+
|
|
18
|
+
- Standardize Weave integration (#2738)
|
|
19
|
+
|
|
20
|
+
<!-- generated by git-cliff -->
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: weave-haystack
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.2.0
|
|
4
4
|
Summary: An integration of Weights & Biases Weave tracer with Haystack
|
|
5
5
|
Project-URL: Source, https://github.com/deepset-ai/haystack-core-integrations
|
|
6
6
|
Project-URL: Documentation, https://github.com/deepset-ai/haystack-core-integrations/blob/main/integrations/weave/README.md
|
|
@@ -15,6 +15,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.12
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
18
19
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
19
20
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
20
21
|
Requires-Python: >=3.10
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
loaders:
|
|
2
|
+
- modules:
|
|
3
|
+
- haystack_integrations.components.connectors.weave.weave_connector
|
|
4
|
+
- haystack_integrations.tracing.weave.tracer
|
|
5
|
+
search_path: [../src]
|
|
6
|
+
processors:
|
|
7
|
+
- type: filter
|
|
8
|
+
documented_only: true
|
|
9
|
+
skip_empty_modules: true
|
|
10
|
+
renderer:
|
|
11
|
+
description: Weights & Bias integration for Haystack
|
|
12
|
+
id: integrations-weave
|
|
13
|
+
filename: weave.md
|
|
14
|
+
title: Weave
|
|
@@ -19,6 +19,7 @@ classifiers = [
|
|
|
19
19
|
"Programming Language :: Python :: 3.11",
|
|
20
20
|
"Programming Language :: Python :: 3.12",
|
|
21
21
|
"Programming Language :: Python :: 3.13",
|
|
22
|
+
"Programming Language :: Python :: 3.14",
|
|
22
23
|
"Programming Language :: Python :: Implementation :: CPython",
|
|
23
24
|
"Programming Language :: Python :: Implementation :: PyPy",
|
|
24
25
|
]
|
|
@@ -44,7 +45,7 @@ git_describe_command = 'git describe --tags --match="integrations/weave-v[0-9]*"
|
|
|
44
45
|
installer = "uv"
|
|
45
46
|
dependencies = ["haystack-pydoc-tools", "ruff"]
|
|
46
47
|
[tool.hatch.envs.default.scripts]
|
|
47
|
-
docs = ["pydoc
|
|
48
|
+
docs = ["haystack-pydoc pydoc/config_docusaurus.yml"]
|
|
48
49
|
fmt = "ruff check --fix {args}; ruff format {args}"
|
|
49
50
|
fmt-check = "ruff check {args} && ruff format --check {args}"
|
|
50
51
|
|
|
@@ -62,7 +63,8 @@ dependencies = [
|
|
|
62
63
|
unit = 'pytest -m "not integration" {args:tests}'
|
|
63
64
|
integration = 'pytest -m "integration" {args:tests}'
|
|
64
65
|
all = 'pytest {args:tests}'
|
|
65
|
-
cov-retry = 'pytest --cov=haystack_integrations --reruns 3 --reruns-delay 30 -x {args:tests}'
|
|
66
|
+
unit-cov-retry = 'pytest --cov=haystack_integrations --reruns 3 --reruns-delay 30 -x -m "not integration" {args:tests}'
|
|
67
|
+
integration-cov-append-retry = 'pytest --cov=haystack_integrations --cov-append --reruns 3 --reruns-delay 30 -x -m "integration" {args:tests}'
|
|
66
68
|
types = """mypy -p haystack_integrations.components.connectors.weave \
|
|
67
69
|
-p haystack_integrations.tracing.weave {args}"""
|
|
68
70
|
|
|
@@ -78,9 +80,17 @@ line-length = 120
|
|
|
78
80
|
[tool.ruff.lint]
|
|
79
81
|
select = [
|
|
80
82
|
"A",
|
|
83
|
+
"ANN",
|
|
81
84
|
"ARG",
|
|
82
85
|
"B",
|
|
83
86
|
"C",
|
|
87
|
+
"D102", # Missing docstring in public method
|
|
88
|
+
"D103", # Missing docstring in public function
|
|
89
|
+
"D205", # 1 blank line required between summary line and description
|
|
90
|
+
"D209", # Closing triple quotes go to new line
|
|
91
|
+
"D213", # summary lines must be positioned on the second physical line of the docstring
|
|
92
|
+
"D417", # Missing argument descriptions in the docstring
|
|
93
|
+
"D419", # Docstring is empty
|
|
84
94
|
"DTZ",
|
|
85
95
|
"E",
|
|
86
96
|
"EM",
|
|
@@ -105,6 +115,7 @@ select = [
|
|
|
105
115
|
]
|
|
106
116
|
ignore = [
|
|
107
117
|
# Allow non-abstract empty methods in abstract base classes
|
|
118
|
+
"ANN401",
|
|
108
119
|
"B027",
|
|
109
120
|
# Allow boolean positional values in function calls, like `dict.get(... True)`
|
|
110
121
|
"FBT003",
|
|
@@ -128,11 +139,13 @@ ban-relative-imports = "parents"
|
|
|
128
139
|
|
|
129
140
|
[tool.ruff.lint.per-file-ignores]
|
|
130
141
|
# Tests can use magic values, assertions, and relative imports
|
|
131
|
-
"
|
|
142
|
+
"example/**/*" = ["D", "ANN"]
|
|
143
|
+
"tests/**/*" = ["D", "ANN", "PLR2004", "S101", "TID252"]
|
|
132
144
|
|
|
133
145
|
[tool.coverage.run]
|
|
134
146
|
source = ["haystack_integrations"]
|
|
135
147
|
branch = true
|
|
148
|
+
relative_files = true
|
|
136
149
|
parallel = false
|
|
137
150
|
|
|
138
151
|
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
#
|
|
3
3
|
# SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
|
|
5
|
+
from dataclasses import asdict, is_dataclass
|
|
5
6
|
from typing import Any
|
|
6
7
|
|
|
7
8
|
from haystack import component, default_from_dict, default_to_dict, logging, tracing
|
|
9
|
+
from pydantic import BaseModel
|
|
8
10
|
|
|
9
11
|
from haystack_integrations.tracing.weave import WeaveTracer
|
|
10
12
|
from weave.trace.settings import UserSettings
|
|
@@ -94,6 +96,7 @@ class WeaveConnector:
|
|
|
94
96
|
|
|
95
97
|
@component.output_types(pipeline_name=str)
|
|
96
98
|
def run(self) -> dict[str, str]:
|
|
99
|
+
"""Run the WeaveConnector, initializing the tracer if needed."""
|
|
97
100
|
if self.tracer is None:
|
|
98
101
|
self.warm_up()
|
|
99
102
|
# NOTE: this is a no-op component - it simply triggers the Tracer to sends traces to Weights & Biases
|
|
@@ -109,7 +112,10 @@ class WeaveConnector:
|
|
|
109
112
|
weave_init_kwargs = self.weave_init_kwargs.copy()
|
|
110
113
|
settings = weave_init_kwargs.get("settings", None)
|
|
111
114
|
if isinstance(settings, UserSettings):
|
|
112
|
-
|
|
115
|
+
if isinstance(settings, BaseModel):
|
|
116
|
+
weave_init_kwargs["settings"] = settings.model_dump(mode="json", exclude_defaults=True)
|
|
117
|
+
elif is_dataclass(settings):
|
|
118
|
+
weave_init_kwargs["settings"] = asdict(settings)
|
|
113
119
|
|
|
114
120
|
return default_to_dict(self, pipeline_name=self.pipeline_name, weave_init_kwargs=weave_init_kwargs)
|
|
115
121
|
|
{weave_haystack-3.1.0 → weave_haystack-3.2.0}/src/haystack_integrations/tracing/weave/tracer.py
RENAMED
|
@@ -42,6 +42,7 @@ class WeaveSpan(Span):
|
|
|
42
42
|
self._attributes[key] = value
|
|
43
43
|
|
|
44
44
|
def set_tags(self, tags: dict[str, Any]) -> None:
|
|
45
|
+
"""Set multiple tags at once by iterating over the provided dictionary."""
|
|
45
46
|
for k, v in tags.items():
|
|
46
47
|
self.set_tag(k, v)
|
|
47
48
|
|
|
@@ -56,9 +57,11 @@ class WeaveSpan(Span):
|
|
|
56
57
|
return {"weave.call_id": self._call.id, "weave.run_id": getattr(self._call, "run_id", "")}
|
|
57
58
|
|
|
58
59
|
def set_call(self, call: Call) -> None:
|
|
60
|
+
"""Set the underlying Weave Call object for this span."""
|
|
59
61
|
self._call = call
|
|
60
62
|
|
|
61
63
|
def get_attributes(self) -> dict[str, Any]:
|
|
64
|
+
"""Return the accumulated attributes dictionary for this span."""
|
|
62
65
|
return self._attributes
|
|
63
66
|
|
|
64
67
|
|
|
@@ -92,6 +95,7 @@ class WeaveTracer(Tracer):
|
|
|
92
95
|
|
|
93
96
|
@staticmethod
|
|
94
97
|
def create_call(attributes: dict, client: WeaveClient, parent_span: WeaveSpan | None, operation_name: str) -> Call:
|
|
98
|
+
"""Create and return a Weave Call from the given span attributes and client."""
|
|
95
99
|
comp_name = attributes.pop("haystack.component.name", "")
|
|
96
100
|
comp_type = attributes.pop("haystack.component.type", "")
|
|
97
101
|
comp_input = attributes.pop("haystack.component.input", {})
|
|
@@ -97,9 +97,7 @@ class TestWeaveConnector:
|
|
|
97
97
|
serialized: dict[str, Any] = connector.to_dict()
|
|
98
98
|
|
|
99
99
|
assert serialized["init_parameters"]["pipeline_name"] == "test_pipeline"
|
|
100
|
-
assert serialized["init_parameters"]["weave_init_kwargs"]
|
|
101
|
-
"settings": {"implicitly_patch_integrations": False}
|
|
102
|
-
}
|
|
100
|
+
assert serialized["init_parameters"]["weave_init_kwargs"]["settings"]["implicitly_patch_integrations"] is False
|
|
103
101
|
assert "type" in serialized
|
|
104
102
|
assert serialized["type"] == "haystack_integrations.components.connectors.weave.weave_connector.WeaveConnector"
|
|
105
103
|
|
|
@@ -108,7 +106,7 @@ class TestWeaveConnector:
|
|
|
108
106
|
assert isinstance(deserialized, WeaveConnector)
|
|
109
107
|
assert deserialized.pipeline_name == "test_pipeline"
|
|
110
108
|
assert deserialized.tracer is None # tracer is only initialized with warm_up
|
|
111
|
-
assert deserialized.weave_init_kwargs
|
|
109
|
+
assert deserialized.weave_init_kwargs["settings"]["implicitly_patch_integrations"] is False
|
|
112
110
|
|
|
113
111
|
def test_pipeline_tracing(self, mock_weave_client: Mock, sample_pipeline: Pipeline) -> None:
|
|
114
112
|
"""Test that pipeline operations are correctly traced"""
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
loaders:
|
|
2
|
-
- ignore_when_discovered:
|
|
3
|
-
- __init__
|
|
4
|
-
modules:
|
|
5
|
-
- haystack_integrations.components.connectors.weave.weave_connector
|
|
6
|
-
- haystack_integrations.tracing.weave.tracer
|
|
7
|
-
search_path:
|
|
8
|
-
- ../src
|
|
9
|
-
type: haystack_pydoc_tools.loaders.CustomPythonLoader
|
|
10
|
-
processors:
|
|
11
|
-
- do_not_filter_modules: false
|
|
12
|
-
documented_only: true
|
|
13
|
-
expression: null
|
|
14
|
-
skip_empty_modules: true
|
|
15
|
-
type: filter
|
|
16
|
-
- type: smart
|
|
17
|
-
- type: crossref
|
|
18
|
-
renderer:
|
|
19
|
-
description: Weights & Bias integration for Haystack
|
|
20
|
-
id: integrations-weave
|
|
21
|
-
markdown:
|
|
22
|
-
add_member_class_prefix: false
|
|
23
|
-
add_method_class_prefix: true
|
|
24
|
-
classdef_code_block: false
|
|
25
|
-
descriptive_class_title: false
|
|
26
|
-
descriptive_module_title: true
|
|
27
|
-
filename: weave.md
|
|
28
|
-
title: Weave
|
|
29
|
-
type: haystack_pydoc_tools.renderers.DocusaurusRenderer
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{weave_haystack-3.1.0 → weave_haystack-3.2.0}/src/haystack_integrations/tracing/weave/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|