Sdm0 commited on
Commit
db090e4
Β·
verified Β·
1 Parent(s): a85bf07

Deploy 3d5a6290

Browse files
Files changed (2) hide show
  1. app.py +4 -0
  2. main.py +4 -0
app.py CHANGED
@@ -160,12 +160,14 @@ def _build_and_stream(repo: str, pr_number: int) -> tuple:
160
  value=verdict.overall_score,
161
  comment=f"{repo}#{pr_number} β€” {verdict.recommendation}: {verdict.summary[:100]}",
162
  trace_id=run_trace_id,
 
163
  )
164
  log_langfuse_score(
165
  name="findings_count",
166
  value=len(findings),
167
  comment=f"{repo}#{pr_number}",
168
  trace_id=run_trace_id,
 
169
  )
170
 
171
  # ── Compute and log RAGAS retrieval scores ─────────────────
@@ -200,12 +202,14 @@ def _build_and_stream(repo: str, pr_number: int) -> tuple:
200
 
201
  # Log RAGAS scores with the explicitly captured trace_id
202
  # to avoid contextvar loss during the long computation.
 
203
  for metric_name, value in ragas_scores.items():
204
  log_langfuse_score(
205
  name=f"ragas_{metric_name}",
206
  value=value,
207
  comment=f"{repo}#{pr_number} β€” {metric_name}",
208
  trace_id=run_trace_id,
 
209
  )
210
 
211
  logger.info(
 
160
  value=verdict.overall_score,
161
  comment=f"{repo}#{pr_number} β€” {verdict.recommendation}: {verdict.summary[:100]}",
162
  trace_id=run_trace_id,
163
+ handler=handler,
164
  )
165
  log_langfuse_score(
166
  name="findings_count",
167
  value=len(findings),
168
  comment=f"{repo}#{pr_number}",
169
  trace_id=run_trace_id,
170
+ handler=handler,
171
  )
172
 
173
  # ── Compute and log RAGAS retrieval scores ─────────────────
 
202
 
203
  # Log RAGAS scores with the explicitly captured trace_id
204
  # to avoid contextvar loss during the long computation.
205
+ # handler=handler is also passed as fallback resolution.
206
  for metric_name, value in ragas_scores.items():
207
  log_langfuse_score(
208
  name=f"ragas_{metric_name}",
209
  value=value,
210
  comment=f"{repo}#{pr_number} β€” {metric_name}",
211
  trace_id=run_trace_id,
212
+ handler=handler,
213
  )
214
 
215
  logger.info(
main.py CHANGED
@@ -297,12 +297,14 @@ def _run_with_hitl(graph, repo: str, pr_number: int) -> None:
297
  value=v.overall_score,
298
  comment=f"{repo}#{pr_number} β€” {v.recommendation}: {v.summary[:100]}",
299
  trace_id=run_trace_id,
 
300
  )
301
  log_langfuse_score(
302
  name="findings_count",
303
  value=len(final_findings),
304
  comment=f"{repo}#{pr_number}",
305
  trace_id=run_trace_id,
 
306
  )
307
 
308
  # ── Compute and log RAGAS retrieval scores ─────────────────
@@ -336,12 +338,14 @@ def _run_with_hitl(graph, repo: str, pr_number: int) -> None:
336
 
337
  # Log RAGAS scores with the explicitly captured trace_id
338
  # to avoid contextvar loss during the long computation.
 
339
  for metric_name, value in ragas_scores.items():
340
  log_langfuse_score(
341
  name=f"ragas_{metric_name}",
342
  value=value,
343
  comment=f"{repo}#{pr_number} β€” {metric_name}",
344
  trace_id=run_trace_id,
 
345
  )
346
 
347
  logger.info(
 
297
  value=v.overall_score,
298
  comment=f"{repo}#{pr_number} β€” {v.recommendation}: {v.summary[:100]}",
299
  trace_id=run_trace_id,
300
+ handler=handler,
301
  )
302
  log_langfuse_score(
303
  name="findings_count",
304
  value=len(final_findings),
305
  comment=f"{repo}#{pr_number}",
306
  trace_id=run_trace_id,
307
+ handler=handler,
308
  )
309
 
310
  # ── Compute and log RAGAS retrieval scores ─────────────────
 
338
 
339
  # Log RAGAS scores with the explicitly captured trace_id
340
  # to avoid contextvar loss during the long computation.
341
+ # handler=handler is also passed as fallback resolution.
342
  for metric_name, value in ragas_scores.items():
343
  log_langfuse_score(
344
  name=f"ragas_{metric_name}",
345
  value=value,
346
  comment=f"{repo}#{pr_number} β€” {metric_name}",
347
  trace_id=run_trace_id,
348
+ handler=handler,
349
  )
350
 
351
  logger.info(