-
Couldn't load subscription status.
- Fork 22
LSP reduce no of candidates #729
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
Changes from 2 commits
856fe60
65a5b6a
64bdb06
ffb910b
520d87c
888272b
8f5423b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,3 +11,26 @@ | |
| MIN_TESTCASE_PASSED_THRESHOLD = 6 | ||
| REPEAT_OPTIMIZATION_PROBABILITY = 0.1 | ||
| DEFAULT_IMPORTANCE_THRESHOLD = 0.001 | ||
|
|
||
| # LSP-specific | ||
| N_CANDIDATES_LSP = 3 | ||
| N_TESTS_TO_GENERATE_LSP = 1 | ||
| TOTAL_LOOPING_TIME_LSP = 5.0 | ||
|
||
|
|
||
|
|
||
| def get_n_candidates() -> int: | ||
| from codeflash.lsp.helpers import is_LSP_enabled | ||
|
|
||
| return N_CANDIDATES_LSP if is_LSP_enabled() else N_CANDIDATES | ||
|
|
||
|
|
||
| def get_n_tests_to_generate() -> int: | ||
| from codeflash.lsp.helpers import is_LSP_enabled | ||
|
|
||
| return N_TESTS_TO_GENERATE_LSP if is_LSP_enabled() else N_TESTS_TO_GENERATE | ||
|
|
||
|
|
||
| def get_total_looping_time() -> float: | ||
| from codeflash.lsp.helpers import is_LSP_enabled | ||
|
|
||
| return TOTAL_LOOPING_TIME_LSP if is_LSP_enabled() else TOTAL_LOOPING_TIME | ||
Saga4 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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.
lets keep it 2
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.
lets move the line profiler candidate count to cli
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.
As discussed with @mohammedahmed18 N_candidates are hardcoded in aiservices currently. so need to make it parameterised with max value.