You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #1094 makes automatic unused-column pruning run while tracing is enabled. This closes the memory gap left by #833, where pruning was intentionally bypassed for traced runs, but it also means tracing now depends on preserving the correct identity columns.
The fix in 0f5234e adds util.traceable_id_columns() and protects:
household_id
person_id
proto_household_id
proto_person_id
across the affected simple- and interaction-simulation paths.
The tests added in #1094 only partially cover this behavior. They inspect the pruned column list with tracing mocked; the interaction_sample test also mocks interaction_trace_rows(). Consequently, they do not verify that real trace targets are selected after pruning, that proto-table tracing still works, or that all affected simulation paths preserve the required identifiers.
The integration test added by #1021 verifies consistent trace filename hashes across multiprocessing, but does not validate the rows or identifiers contained in trace output.
Strengthen the lightweight integration coverage, either by extending test/trace_id or adding a small equivalent test, to inspect trace contents rather than only filename hashes.
Acceptance criteria
Tests exercise real trace-row selection rather than substituting a mocked result.
Regular and proto household/person identifiers are covered.
Removing trace-ID protection from any affected simulation path causes a regression test to fail.
At least one test validates emitted trace data or captured trace_df input, not only the intermediate column list.
The tests use small synthetic fixtures and remain suitable for the normal core test suite.
Problem
PR #1094 makes automatic unused-column pruning run while tracing is enabled. This closes the memory gap left by #833, where pruning was intentionally bypassed for traced runs, but it also means tracing now depends on preserving the correct identity columns.
The fix in 0f5234e adds
util.traceable_id_columns()and protects:household_idperson_idproto_household_idproto_person_idacross the affected simple- and interaction-simulation paths.
The tests added in #1094 only partially cover this behavior. They inspect the pruned column list with tracing mocked; the
interaction_sampletest also mocksinteraction_trace_rows(). Consequently, they do not verify that real trace targets are selected after pruning, that proto-table tracing still works, or that all affected simulation paths preserve the required identifiers.The integration test added by #1021 verifies consistent trace filename hashes across multiprocessing, but does not validate the rows or identifiers contained in trace output.
This follows up on:
Proposed coverage
Add focused regression tests that exercise tracing without mocking the trace-row selection logic.
Add table-driven tests for
Tracing.interaction_trace_rows()covering:person_idandhousehold_idas an index or chooser columnproto_person_idandproto_household_id, including proto-table precedencesample_sizeset)sample_size=None)Extend the pruning tests for the paths changed by Deprecate SIMULATE_CHOOSER_COLUMNS and LOGSUM_CHOOSER_COLUMNS settings #1094:
interaction_sampleinteraction_simulateinteraction_sample_simulateVerify that:
Strengthen the lightweight integration coverage, either by extending
test/trace_idor adding a small equivalent test, to inspect trace contents rather than only filename hashes.Acceptance criteria
trace_dfinput, not only the intermediate column list.