Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
EnsembleTable.replace_blocks, assuming the ensembleexecuteAPI is available. Preserve member schemas and omitted blocks while accepting shared tensor replacements or member-aligned ensemble replacements.Description of the change
This is an intentionally dependency-blocked extraction from #797:
maindoes not yet provideEnsembleData.execute. The reconstruction path also uses the generic value container introduced by #1367. No execution implementation, runtime fallback executor, type-checker suppression, or existing PR changes are included here.When all replacement ensembles use the table's member locations, the method delegates to
execute(TableTensor.replace_blocks, ...). For differing layouts, it sends only column metadata, omitted blocks, and replacement values toexecute(TableTensor, ...); old values of replaced blocks never participate in alignment. All actual alignment remains owned byexecute. Semantic tensor types and underlyingTableTensorvalidation are retained.Validation
The candidate method was injected in memory into the real execution backend from #797, without modifying that branch. All 41 selected tests passed: the two new contracts plus Standardize, recipe execution and existing execution regressions. Contract tests cover shared tensors, differently ordered/grouped inputs, simultaneous numerical/datetime replacement, different member schemas and row counts, and preservation of omitted categorical vocabularies.
CUDA measurements used eight members, 50,000 rows, and 32 numerical columns with
torch.utils.benchmark.Timer.blocked_autorange(min_run_time=0.2)and peak allocated-memory statistics. Compared with the existing #797 method:A plain wrapper around
execute(TableTensor.replace_blocks, ...)was also tested. It allocated 51,204,608 temporary CUDA bytes in the reordered case because it aligned source values that were immediately replaced. This is why the small location-based fast path and reconstruction path are both present. These are operation timings, not end-to-end estimator speedups.Not merge-ready on
main: the repository type check reports the two missingEnsembleData.executeaccesses. All other pre-commit checks pass. Onmain, the two new integration tests are explicitly skipped until that dependency exists; they are executed against the real #797 backend during manual validation. The dependency failure is not suppressed.