pixie-qa 0.1.11__tar.gz → 0.1.12__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.
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/PKG-INFO +1 -1
- pixie_qa-0.1.12/changelogs/observe-sensitive-field-stripping.md +22 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/instrumentation/observation.py +8 -2
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pyproject.toml +1 -1
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/instrumentation/test_observation.py +46 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/.github/copilot-instructions.md +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/.github/workflows/publish.yml +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/.gitignore +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/LICENSE +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/README.md +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/changelogs/async-handler-processing.md +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/changelogs/autoevals-adapters.md +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/changelogs/cli-dataset-commands.md +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/changelogs/dataset-management.md +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/changelogs/deep-research-demo.md +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/changelogs/eval-harness.md +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/changelogs/expected-output-in-evals.md +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/changelogs/instrumentation-module-implementation.md +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/changelogs/loud-failure-mode.md +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/changelogs/manual-instrumentation-usability.md +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/changelogs/observation-store-implementation.md +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/changelogs/pixie-directory-and-skill-improvements.md +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/changelogs/pixie-test-e2e-suite.md +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/changelogs/root-package-exports-and-trace-id.md +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/changelogs/scorecard-branding-and-skill-version-check.md +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/changelogs/scorecard-eval-detail-dialog.md +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/changelogs/skill-v2-and-rootdir-discovery.md +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/changelogs/test-scorecard.md +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/changelogs/usability-utils.md +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/docs/package.md +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/__init__.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/cli/__init__.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/cli/dataset_command.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/cli/main.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/cli/test_command.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/config.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/dataset/__init__.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/dataset/models.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/dataset/store.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/evals/__init__.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/evals/criteria.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/evals/eval_utils.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/evals/evaluation.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/evals/runner.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/evals/scorecard.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/evals/scorers.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/evals/trace_capture.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/evals/trace_helpers.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/favicon.png +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/instrumentation/__init__.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/instrumentation/context.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/instrumentation/handler.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/instrumentation/handlers.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/instrumentation/instrumentors.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/instrumentation/processor.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/instrumentation/queue.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/instrumentation/spans.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/storage/__init__.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/storage/evaluable.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/storage/piccolo_conf.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/storage/piccolo_migrations/__init__.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/storage/serialization.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/storage/store.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/storage/tables.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/pixie/storage/tree.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/skills/eval-driven-dev/SKILL.md +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/skills/eval-driven-dev/references/pixie-api.md +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/skills/eval-driven-dev/resources/check_version.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/specs/agent-skill-1.md +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/specs/agent-skill.md +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/specs/autoevals-adapters.md +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/specs/dataset-management.md +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/specs/evals-harness.md +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/specs/expected-output-in-evals.md +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/specs/instrumentation.md +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/specs/manual-instrumentation-usability.md +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/specs/storage.md +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/specs/usability-utils.md +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/__init__.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/__init__.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/cli/__init__.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/cli/e2e_cases.json +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/cli/e2e_fixtures/conftest.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/cli/e2e_fixtures/datasets/customer-faq.json +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/cli/e2e_fixtures/mock_evaluators.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/cli/e2e_fixtures/test_customer_faq.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/cli/test_dataset_command.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/cli/test_e2e_pixie_test.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/cli/test_main.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/dataset/__init__.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/dataset/test_models.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/dataset/test_store.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/evals/__init__.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/evals/test_criteria.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/evals/test_eval_utils.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/evals/test_evaluation.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/evals/test_runner.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/evals/test_scorecard.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/evals/test_scorers.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/evals/test_trace_capture.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/evals/test_trace_helpers.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/instrumentation/__init__.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/instrumentation/conftest.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/instrumentation/test_context.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/instrumentation/test_handler.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/instrumentation/test_integration.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/instrumentation/test_processor.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/instrumentation/test_queue.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/instrumentation/test_spans.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/instrumentation/test_storage_handler.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/observation_store/__init__.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/observation_store/conftest.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/observation_store/test_evaluable.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/observation_store/test_serialization.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/observation_store/test_store.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/observation_store/test_tree.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/test_config.py +0 -0
- {pixie_qa-0.1.11 → pixie_qa-0.1.12}/tests/pixie/test_init.py +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# @observe: Strip `self` and `cls` from captured input
|
|
2
|
+
|
|
3
|
+
## What changed
|
|
4
|
+
|
|
5
|
+
The `@observe` decorator now automatically removes `self` and `cls` from the
|
|
6
|
+
captured function arguments before serialization. Previously, decorating a
|
|
7
|
+
method with `@observe` would serialize the entire instance (including API keys,
|
|
8
|
+
client objects, and other sensitive state) into `eval_input` via jsonpickle.
|
|
9
|
+
|
|
10
|
+
## Files affected
|
|
11
|
+
|
|
12
|
+
- `pixie/instrumentation/observation.py` — `sync_wrapper` and `async_wrapper`
|
|
13
|
+
now pop `self`/`cls` from `bound.arguments` before calling `_serialize()`.
|
|
14
|
+
- `tests/pixie/instrumentation/test_observation.py` — Two new tests:
|
|
15
|
+
`test_self_excluded_from_input` and `test_cls_excluded_from_input`.
|
|
16
|
+
|
|
17
|
+
## Migration notes
|
|
18
|
+
|
|
19
|
+
No API changes. This is a backward-compatible fix. Existing `@observe` usage on
|
|
20
|
+
functions (not methods) is unaffected. Methods that previously leaked `self` into
|
|
21
|
+
`eval_input` will now produce cleaner, smaller input data containing only the
|
|
22
|
+
semantic arguments.
|
|
@@ -58,7 +58,10 @@ def observe(
|
|
|
58
58
|
sig = inspect.signature(fn)
|
|
59
59
|
bound = sig.bind(*args, **kwargs)
|
|
60
60
|
bound.apply_defaults()
|
|
61
|
-
|
|
61
|
+
arguments = dict(bound.arguments)
|
|
62
|
+
arguments.pop("self", None)
|
|
63
|
+
arguments.pop("cls", None)
|
|
64
|
+
serialized_input = _serialize(arguments)
|
|
62
65
|
|
|
63
66
|
with start_observation(
|
|
64
67
|
input=serialized_input, name=span_name
|
|
@@ -76,7 +79,10 @@ def observe(
|
|
|
76
79
|
sig = inspect.signature(fn)
|
|
77
80
|
bound = sig.bind(*args, **kwargs)
|
|
78
81
|
bound.apply_defaults()
|
|
79
|
-
|
|
82
|
+
arguments = dict(bound.arguments)
|
|
83
|
+
arguments.pop("self", None)
|
|
84
|
+
arguments.pop("cls", None)
|
|
85
|
+
serialized_input = _serialize(arguments)
|
|
80
86
|
|
|
81
87
|
with start_observation(
|
|
82
88
|
input=serialized_input, name=span_name
|
|
@@ -148,3 +148,49 @@ class TestObserveDecorator:
|
|
|
148
148
|
# Both positional args should appear in the serialized input
|
|
149
149
|
assert "a" in obs.input
|
|
150
150
|
assert "b" in obs.input
|
|
151
|
+
|
|
152
|
+
def test_self_excluded_from_input(
|
|
153
|
+
self, recording_handler: RecordingHandler
|
|
154
|
+
) -> None:
|
|
155
|
+
"""@observe on a method strips 'self' from captured input."""
|
|
156
|
+
px.init()
|
|
157
|
+
px.add_handler(recording_handler)
|
|
158
|
+
|
|
159
|
+
class Agent:
|
|
160
|
+
secret_key = "sk-SHOULD-NOT-APPEAR"
|
|
161
|
+
|
|
162
|
+
@observe()
|
|
163
|
+
def respond(self, message: str) -> str:
|
|
164
|
+
return f"Got: {message}"
|
|
165
|
+
|
|
166
|
+
agent = Agent()
|
|
167
|
+
result = agent.respond("hello")
|
|
168
|
+
px.flush()
|
|
169
|
+
|
|
170
|
+
assert result == "Got: hello"
|
|
171
|
+
obs = recording_handler.observe_spans[0]
|
|
172
|
+
assert "hello" in obs.input
|
|
173
|
+
assert "self" not in obs.input
|
|
174
|
+
assert "sk-SHOULD-NOT-APPEAR" not in obs.input
|
|
175
|
+
|
|
176
|
+
def test_cls_excluded_from_input(self, recording_handler: RecordingHandler) -> None:
|
|
177
|
+
"""@observe on a classmethod strips 'cls' from captured input."""
|
|
178
|
+
px.init()
|
|
179
|
+
px.add_handler(recording_handler)
|
|
180
|
+
|
|
181
|
+
class Service:
|
|
182
|
+
api_key = "sk-SECRET"
|
|
183
|
+
|
|
184
|
+
@classmethod
|
|
185
|
+
@observe()
|
|
186
|
+
def handle(cls, query: str) -> str:
|
|
187
|
+
return f"Handled: {query}"
|
|
188
|
+
|
|
189
|
+
result = Service.handle("test")
|
|
190
|
+
px.flush()
|
|
191
|
+
|
|
192
|
+
assert result == "Handled: test"
|
|
193
|
+
obs = recording_handler.observe_spans[0]
|
|
194
|
+
assert "test" in obs.input
|
|
195
|
+
assert "cls" not in obs.input
|
|
196
|
+
assert "sk-SECRET" not in obs.input
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pixie_qa-0.1.11 → pixie_qa-0.1.12}/changelogs/scorecard-branding-and-skill-version-check.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|