Skip to content

Instantly share code, notes, and snippets.

View dharrawal's full-sized avatar

Dhar Rawal dharrawal

View GitHub Profile
@dharrawal
dharrawal / README.md
Created September 10, 2026 17:10
fastWorkflow observability capture/tracing overhead (fix-49m.2): fork 9904df5 vs change4 5b1e85e vs port 3.3

Observability capture/tracing overhead (bead fix-49m.2)

Evidence-only measurement of the observability substrate on feat/experiment-observability-3.3. Not a CI gate. The in-tree benchmarks/overhead/ harness was removed from the PR after this gist was filed so the branch does not ship a machine-local runner.

What was measured

  • Stubbed LM (no live LLM / no network). A tripwire counted real dspy.LM / litellm calls; tripwire trips = 0 on all three runs. Offline Hugging Face / Transformers flags were set so intent models loaded only from local artifacts.
  • Hello-world fixture: tests/hello_world_workflow, scripted add_two_numbers turns (XML-tagged params, regex parse in agent mode).
  • Observability on (FW_OBSERVABILITY=1), SQLite sink bound the same way as fastworkflow run.
  • 1 warm-up turn (2 commands) + 10 measured turns × 48 commands/turn (52 stub model calls/turn: planner, ReAct steps, finish, extract, turn summary).
@dharrawal
dharrawal / dspy_logger.py
Last active November 14, 2024 16:57
A simple framework for logging calls to DSPy programs in a minimally obtrusive way
"""
DSPy Logging Utilities
Author: Dhar Rawal
Works with DSPy to log forward calls and their results, using a custom handler function.
Works with typed predictors too!
"""
import functools
import json
from typing import Any, Callable, Dict, Optional, Tuple