eval-protocol 0.2.46.dev0__py3-none-any.whl → 0.2.46.dev2__py3-none-any.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.
- eval_protocol/_version.py +3 -3
- eval_protocol/proxy/proxy_core/langfuse.py +11 -7
- {eval_protocol-0.2.46.dev0.dist-info → eval_protocol-0.2.46.dev2.dist-info}/METADATA +1 -1
- {eval_protocol-0.2.46.dev0.dist-info → eval_protocol-0.2.46.dev2.dist-info}/RECORD +8 -8
- {eval_protocol-0.2.46.dev0.dist-info → eval_protocol-0.2.46.dev2.dist-info}/WHEEL +0 -0
- {eval_protocol-0.2.46.dev0.dist-info → eval_protocol-0.2.46.dev2.dist-info}/entry_points.txt +0 -0
- {eval_protocol-0.2.46.dev0.dist-info → eval_protocol-0.2.46.dev2.dist-info}/licenses/LICENSE +0 -0
- {eval_protocol-0.2.46.dev0.dist-info → eval_protocol-0.2.46.dev2.dist-info}/top_level.txt +0 -0
eval_protocol/_version.py
CHANGED
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "2025-10-
|
|
11
|
+
"date": "2025-10-10T01:09:04-0700",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "0.2.46-
|
|
14
|
+
"full-revisionid": "859dce2af419fc26a8634c1254a75a52d9c246d4",
|
|
15
|
+
"version": "0.2.46-dev2"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
|
@@ -163,11 +163,6 @@ async def fetch_langfuse_traces(
|
|
|
163
163
|
This endpoint uses the stored Langfuse keys for the project and polls
|
|
164
164
|
traces based on the provided filters.
|
|
165
165
|
|
|
166
|
-
SECURITY:
|
|
167
|
-
- Tags are REQUIRED and must not be empty
|
|
168
|
-
- At least one tag MUST be in the format 'rollout_id:*'
|
|
169
|
-
- This prevents accidentally fetching all traces or traces from other clients
|
|
170
|
-
|
|
171
166
|
If project_id is not provided, uses the default project.
|
|
172
167
|
|
|
173
168
|
Returns a list of full trace objects (including observations) in JSON format.
|
|
@@ -236,6 +231,7 @@ async def fetch_langfuse_traces(
|
|
|
236
231
|
expected_ids: Set[str] = set()
|
|
237
232
|
if rollout_id:
|
|
238
233
|
expected_ids = get_insertion_ids(redis_client, rollout_id)
|
|
234
|
+
logger.info(f"Fetching traces for rollout_id '{rollout_id}', expecting {len(expected_ids)} insertion_ids")
|
|
239
235
|
if not expected_ids:
|
|
240
236
|
logger.warning(
|
|
241
237
|
f"No expected insertion_ids found in Redis for rollout '{rollout_id}'. Returning empty traces."
|
|
@@ -258,7 +254,9 @@ async def fetch_langfuse_traces(
|
|
|
258
254
|
# Build targeted tags for missing insertion_ids
|
|
259
255
|
missing_ids = expected_ids - insertion_ids
|
|
260
256
|
fetch_tags = [f"insertion_id:{id}" for id in missing_ids]
|
|
261
|
-
logger.info(
|
|
257
|
+
logger.info(
|
|
258
|
+
f"Retry {retry}: Targeting {len(fetch_tags)} missing insertion_ids for rollout '{rollout_id}' (last5): {[id[-5:] for id in sorted(missing_ids)[:10]]}{'...' if len(missing_ids) > 10 else ''}"
|
|
259
|
+
)
|
|
262
260
|
|
|
263
261
|
current_page = 1
|
|
264
262
|
collected = 0
|
|
@@ -313,6 +311,7 @@ async def fetch_langfuse_traces(
|
|
|
313
311
|
insertion_id = _extract_tag_value(trace_dict.get("tags", []), "insertion_id:")
|
|
314
312
|
if insertion_id:
|
|
315
313
|
insertion_ids.add(insertion_id)
|
|
314
|
+
logger.debug(f"Found insertion_id '{insertion_id}' for rollout '{rollout_id}'")
|
|
316
315
|
|
|
317
316
|
except Exception as e:
|
|
318
317
|
logger.warning("Failed to serialize trace %s: %s", trace_info.id, e)
|
|
@@ -331,8 +330,12 @@ async def fetch_langfuse_traces(
|
|
|
331
330
|
|
|
332
331
|
# If we have all expected completions or more, return traces. At least once is ok.
|
|
333
332
|
if expected_ids <= insertion_ids:
|
|
333
|
+
logger.info(
|
|
334
|
+
f"Traces complete for rollout '{rollout_id}': {len(insertion_ids)}/{len(expected_ids)} insertion_ids found, returning {len(all_traces)} traces"
|
|
335
|
+
)
|
|
334
336
|
if sample_size is not None and len(all_traces) > sample_size:
|
|
335
337
|
all_traces = random.sample(all_traces, sample_size)
|
|
338
|
+
logger.info(f"Sampled down to {sample_size} traces")
|
|
336
339
|
|
|
337
340
|
return LangfuseTracesResponse(
|
|
338
341
|
project_id=project_id,
|
|
@@ -343,8 +346,9 @@ async def fetch_langfuse_traces(
|
|
|
343
346
|
# If it doesn't match, wait and do loop again (exponential backoff)
|
|
344
347
|
if retry < max_retries - 1:
|
|
345
348
|
wait_time = 2**retry
|
|
349
|
+
still_missing = expected_ids - insertion_ids
|
|
346
350
|
logger.info(
|
|
347
|
-
f"Attempt {retry + 1}/{max_retries}. Found {len(insertion_ids)}/{len(expected_ids)}
|
|
351
|
+
f"Attempt {retry + 1}/{max_retries}. Found {len(insertion_ids)}/{len(expected_ids)} for rollout '{rollout_id}'. Still missing (last5): {[id[-5:] for id in sorted(still_missing)[:10]]}{'...' if len(still_missing) > 10 else ''}. Waiting {wait_time}s..."
|
|
348
352
|
)
|
|
349
353
|
await asyncio.sleep(wait_time)
|
|
350
354
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: eval-protocol
|
|
3
|
-
Version: 0.2.46.
|
|
3
|
+
Version: 0.2.46.dev2
|
|
4
4
|
Summary: The official Python SDK for Eval Protocol (EP.) EP is an open protocol that standardizes how developers author evals for large language model (LLM) applications.
|
|
5
5
|
Author-email: Fireworks AI <info@fireworks.ai>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -5,7 +5,7 @@ development/utils/generate_api_key.py,sha256=hHCMFkzW4yxqwcn2ct5diDm-PR9cMX9XP7I
|
|
|
5
5
|
development/utils/subprocess_manager.py,sha256=7n7rT9ji7h93i79SMrGS5RNesrnLFjdFON9_eQCmYNE,18937
|
|
6
6
|
eval_protocol/__init__.py,sha256=bPjRmbNv6MggQz8dq_KSmSKwGSwyLGvuPenS_H8lsoc,3987
|
|
7
7
|
eval_protocol/__main__.py,sha256=FIW5fo2X2rsPThurSlZEuqvE1u0XNwJW1uoej_OhAAs,161
|
|
8
|
-
eval_protocol/_version.py,sha256=
|
|
8
|
+
eval_protocol/_version.py,sha256=gzKeHivAEoFj1hOoUFImQJrTSWPqo5-Ca7KHlw5Au80,503
|
|
9
9
|
eval_protocol/auth.py,sha256=Yvpx-DkxcXYvezmcuNl9BFws2A9o9u8iLbIu4mBUUhE,8463
|
|
10
10
|
eval_protocol/cli.py,sha256=0J7RJKT_4aWYy02yB9Q6gm-RxvlRSt6dxwM1fW-pCpE,22989
|
|
11
11
|
eval_protocol/common_utils.py,sha256=eRzO_SQNfxBz-vIF9PdTVFAzuAb2zfuCnKSKY_xdKQY,2491
|
|
@@ -151,7 +151,7 @@ eval_protocol/proxy/__init__.py,sha256=HkIDs5jsSA1gf-Too0ekzKwXOfuRISASe0dIwiEVW
|
|
|
151
151
|
eval_protocol/proxy/proxy_core/__init__.py,sha256=O30kHfOExmPgf4jXuO2l5_nOYhC-jiSVAc6ndlfomH8,265
|
|
152
152
|
eval_protocol/proxy/proxy_core/app.py,sha256=5sWByGaru6MDktfzrnyqIOYAoc1CxgRqf6-dj4HFwvI,10898
|
|
153
153
|
eval_protocol/proxy/proxy_core/auth.py,sha256=ymuPE0pXegiWCm5L9LrCTmdMU3YQ_eD5YYXEwSgYUjk,463
|
|
154
|
-
eval_protocol/proxy/proxy_core/langfuse.py,sha256=
|
|
154
|
+
eval_protocol/proxy/proxy_core/langfuse.py,sha256=4TX84FBgs2v4FHmjxPkUD5K1J2M334BCTqkxJkAmcwI,15011
|
|
155
155
|
eval_protocol/proxy/proxy_core/litellm.py,sha256=LhYUvK9PywmBrBJLDMYeNjqTE0f-ST35AkdxXVyDg9Y,5949
|
|
156
156
|
eval_protocol/proxy/proxy_core/main.py,sha256=8f5jxhT-dGLRVdEVrWkvJjHirpV6O4oQiZxHVYAuHHU,266
|
|
157
157
|
eval_protocol/proxy/proxy_core/models.py,sha256=R0LU_daiZlcuTCYAt5q521fDRsNjMWeeLy0iYpZg-Go,2707
|
|
@@ -230,7 +230,7 @@ eval_protocol/utils/show_results_url.py,sha256=PHM6dWtCUiuV5WQgvHegnxY7ofkE4b9wO
|
|
|
230
230
|
eval_protocol/utils/static_policy.py,sha256=fiKnOS06EG5OB6p5An_yY_dLAvVboYnC4Sqx5z_v3-g,10716
|
|
231
231
|
eval_protocol/utils/subprocess_utils.py,sha256=2EcoVNLSlfdxwQn-2pscqjiGpBR4Ho8kfRnmzmew-1w,3504
|
|
232
232
|
eval_protocol/utils/vite_server.py,sha256=0Tfh1LfTqYpFZxkO2syrF5I0cBEJHFmYXd2N4CWkca8,5051
|
|
233
|
-
eval_protocol-0.2.46.
|
|
233
|
+
eval_protocol-0.2.46.dev2.dist-info/licenses/LICENSE,sha256=OzeIb507xW9AVhGMqqHpoL_EFRJUo8Sb7A3LN5NqFfQ,1075
|
|
234
234
|
vendor/tau2/__init__.py,sha256=EQMX_v8x-YBV24ia35_nLkf5MrC6aAuT_M5m7IJcl3k,541
|
|
235
235
|
vendor/tau2/cli.py,sha256=lhJocXCDxEfdv7gIxya5b0w5J5qebpgrg_ZTpjGp_ww,7515
|
|
236
236
|
vendor/tau2/config.py,sha256=LrkKRGSFH4Cvf9CNO-MttJMvIia0a2zP1uKVnUQi6B8,1278
|
|
@@ -330,8 +330,8 @@ vite-app/dist/assets/index-C81y9r9l.js,sha256=7fWlEMpE0hAZHAQ4gHEnv1yNu_STClSwsY
|
|
|
330
330
|
vite-app/dist/assets/index-C81y9r9l.js.map,sha256=MkiPbSe9_T6HHqVZOdpIde-LcujdcNWkc4uEEwgfyk8,3862571
|
|
331
331
|
vite-app/dist/assets/index-DpYZaoAr.css,sha256=v5t6cVU5X1gnABnBT6RBLRTBbrrFbJ92rYFqzaNoUkg,24878
|
|
332
332
|
vite-app/dist/assets/logo-light-BprIBJQW.png,sha256=rRXC24eqrQO3y--N493THrD48WQVAhSVMHM_iDKy250,21694
|
|
333
|
-
eval_protocol-0.2.46.
|
|
334
|
-
eval_protocol-0.2.46.
|
|
335
|
-
eval_protocol-0.2.46.
|
|
336
|
-
eval_protocol-0.2.46.
|
|
337
|
-
eval_protocol-0.2.46.
|
|
333
|
+
eval_protocol-0.2.46.dev2.dist-info/METADATA,sha256=r2beRO4vHNtn1TEakiGJHsFMjMnhW8vApBz0MrbGQCI,7498
|
|
334
|
+
eval_protocol-0.2.46.dev2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
335
|
+
eval_protocol-0.2.46.dev2.dist-info/entry_points.txt,sha256=CebRaxbWXly21zPN1fbyAw26kNUU2dv7zZyGkXxtFVw,183
|
|
336
|
+
eval_protocol-0.2.46.dev2.dist-info/top_level.txt,sha256=8jjn7dpvLPL4RX2JBeAfPPMOR6x6f7E4o4yFiKLEHuw,33
|
|
337
|
+
eval_protocol-0.2.46.dev2.dist-info/RECORD,,
|
|
File without changes
|
{eval_protocol-0.2.46.dev0.dist-info → eval_protocol-0.2.46.dev2.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{eval_protocol-0.2.46.dev0.dist-info → eval_protocol-0.2.46.dev2.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|