Compare commits

...
Author SHA1 Message Date
Andrew Ferlitsch 4ce9f97c73 tune: notebook selection 2023-05-30 16:25:44 +00:00
Andrew Ferlitsch e197ded8b9 feat: generate instruction prompts 2023-05-26 16:18:53 +00:00
2 changed files with 1157 additions and 3 deletions
@@ -133,12 +133,15 @@ def select_notebook(changed_notebook: str,
inferred_failure_rate = fail_count / (pass_count + fail_count)
# If failure rate is high, the chance of testing should be higher
should_test_due_to_failure = random.uniform(0, 1) < inferred_failure_rate
should_test_due_to_failure = random.uniform(0, 1) <= inferred_failure_rate
# Additionally, only test a percentage of these
should_test_due_to_random_subset = random.uniform(0, 1) < test_percent
should_test_due_to_random_subset = random.uniform(0, 1) <= test_percent
return should_test_due_to_failure and should_test_due_to_random_subset
if should_test_due_to_failure or should_test_due_to_random_subset:
print(f"Selected: {changed_notebook}")
else:
print(f"Not Selected: {changed_notebook}, pass {pass_count}, fail {fail_count}")
def _process_notebook(
File diff suppressed because it is too large Load Diff