-
Notifications
You must be signed in to change notification settings - Fork 22
[Enhancement] Stop looping when runtime is stable (CF-934) #967
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?
Conversation
…sistent-loop-break
…sistent-loop-break
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
| return 0.2 | ||
| if avg < 0.1: # < 100 ms | ||
| return 0.1 | ||
| return 0.03 # > 0.1 s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mohammedahmed18 how did you set these numbers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aseembits93
there are just experiment numbers, the whole idea is very small runtimes should have high tolerance value because the noise is relatively large
PR Type
Enhancement, Tests
Description
Add consistent-loop break based on durations
Track per-loop test durations via hook
Introduce dynamic tolerance by runtime scale
New config: CONSISTENT_LOOP_COUNT
Diagram Walkthrough
File Walkthrough
config_consts.py
Introduce loop consistency count constantcodeflash/code_utils/config_consts.py
CONSISTENT_LOOP_COUNTdefault to 3.pytest_plugin.py
Duration-based consistent loop termination logiccodeflash/verification/pytest_plugin.py
dynamic_tolerancebased on avg runtime.CONSISTENT_LOOP_COUNT.env_utils.py
Minor formatting cleanupcodeflash/code_utils/env_utils.py