-
Couldn't load subscription status.
- Fork 85
fix: Apply pre-commit formatting to test file #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix: Apply pre-commit formatting to test file #31
Conversation
|
hey @siddhantparadox! thanks for pushing this, just ran a test and it looks like the progress bar isn't updated real time but it's only printed when step 2 is done, so users still experience the same 'black box' waiting period during the actual proposal generation Output: |
- Implement dynamic LM wrapper that inherits from the wrapped LM's class - Add real-time progress bar showing instruction generation status - Cap progress display at 100% to handle extra LM calls gracefully - Update telemetry system to show "+X extra" for calls beyond expected - Add comprehensive unit tests for the tracking functionality - Fix .gitignore to properly exclude my-project/ directory This addresses the "black box" experience during DSPy's MIPROv2 optimization by providing immediate visual feedback as each instruction is generated.
PR TitleAdd real-time progress tracking for DSPy instruction proposals PR DescriptionThis PR implements real-time progress tracking during DSPy's instruction proposal phase, addressing the issue where users had to wait 1-2 minutes without any feedback during optimization. Problem: Solution:
Why does it show 15 calls instead of 10?
This is why you might see 15 LM calls for 10 requested candidates, but only 4 final instructions in the output. DSPy is doing sophisticated optimization work beyond simple generation. Technical Details:
Testing:
Additional Changes:
This enhancement significantly improves the user experience by providing immediate feedback during the optimization process and helps users understand that the extra LM calls are a normal part of DSPy's sophisticated optimization strategy. Sample output |
What does this PR do?
Adds detailed tracking and real-time display of the instruction-proposal phase during prompt optimization.
InstructionProposalTrackerintelemetry.pyBasicOptimizationStrategytests/unit/test_instruction_tracker.py(12 cases)docs/advanced/logging.mdwith tracker usageCloses #20
Test Results
Unit & Integration Suite
All 76 tests pass across unit, integration, and functional suites.
Pre-commit Hooks
No formatting issues; repository conforms to style guidelines.
Manual CLI Verification
Progress appears exactly once per candidate; no duplicate 0 % line.
How to Re-run
Install dev deps
pip install -e ".[dev]" pre-commit installRun tests
Run pre-commit
Run a quick migration
You should see the real-time progress bar during the “Propose instructions” step and the test/pre-commit outputs shown above.