Skip to content

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

cpyle0819
Copy link
Contributor

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.

@cpyle0819 cpyle0819 requested a review from DavidSouther June 20, 2025 13:57
@cpyle0819 cpyle0819 self-assigned this Jun 20, 2025
@cpyle0819 cpyle0819 force-pushed the corepyle/lliam-enhancements branch from f0e88d2 to 4031867 Compare June 20, 2025 14:10
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.
@cpyle0819 cpyle0819 force-pushed the corepyle/lliam-enhancements branch from 4031867 to 0e096a7 Compare June 20, 2025 14:12
@cpyle0819 cpyle0819 added the Enhancement A general update to the code base. label Jun 20, 2025
prompt_path.write_text(snippet.code, encoding="utf-8")
filtered_examples.append((example_id, example))

batch_size = 150
Copy link
Contributor

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):
Copy link
Contributor

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...

Copy link
Contributor Author

@cpyle0819 cpyle0819 Jun 26, 2025

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.
@cpyle0819 cpyle0819 force-pushed the corepyle/lliam-enhancements branch from e48a91b to 05838f1 Compare June 26, 2025 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement A general update to the code base.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants