Skip to content

Add validate_flag to incremental_outcome and propagate across loop iterations#1696

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_945656999
Open

Add validate_flag to incremental_outcome and propagate across loop iterations#1696
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_945656999

Conversation

@copybara-service

Copy link
Copy Markdown

Add validate_flag to incremental_outcome and propagate across loop iterations

Allows callers like optimizer._create_grids and analyzer.response_curves_grid that invoke incremental_outcome inside tight loops to perform validation once before the loop and pass validate_flag=False on loop iterations, avoiding redundant counterfactual validation overhead.

Tested:
We tested this optimization, but it might not cover all test cases or usage scenarios. As this change is for open source, please review and test for your specific requirements before adoption.

…erations

Allows callers like optimizer._create_grids and analyzer.response_curves_grid that invoke incremental_outcome inside tight loops to perform validation once before the loop and pass validate_flag=False on loop iterations, avoiding redundant counterfactual validation overhead.

Tested:
We tested this optimization, but it might not cover all test cases or usage scenarios. As this change is for open source, please review and test for your specific requirements before adoption.
PiperOrigin-RevId: 945656999
@google-cla

google-cla Bot commented Jul 10, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants