-
Notifications
You must be signed in to change notification settings - Fork 13
Batch Ailly calls from Lliam #175
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
f0e88d2
to
4031867
Compare
Rather than make one Ailly call, this batches them into groups of 150 policies and calls Ailly on each batch. Also change the default prefix from [DEFAULT] to DEFAULT. The former was causing build failures on the TCA side.
4031867
to
0e096a7
Compare
prompt_path.write_text(snippet.code, encoding="utf-8") | ||
filtered_examples.append((example_id, example)) | ||
|
||
batch_size = 150 |
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.
CONSTANT up top
f"Splitting {total_examples} examples into {num_batches} batches of {batch_size}" | ||
) | ||
|
||
for batch_num in range(num_batches): |
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.
https://docs.python.org/3/library/itertools.html#itertools.batched
for batch, batch_num in enumerate(batched(filtered_examples)):
batch_dir...
for example_id, example in batch:
prompt_path...
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.
Not added til 3.12, but I'll add the recipe from earlier versions.
- Enhance title_abbrev generation by appending source context (e.g. "from AWS Account Management") - Add test coverage for the updated title abbreviation logic - Add test resources for IAMPolicyGrammar configuration This reduces duplicate title abbreviations that occur when multiple policies have similar names.
e48a91b
to
05838f1
Compare
Rather than make one Ailly call, this batches them into groups of 150 policies and calls Ailly on each batch.
Also change the default prefix from [DEFAULT] to DEFAULT. The former was causing build failures on the TCA side.