Deprecate SIMULATE_CHOOSER_COLUMNS and LOGSUM_CHOOSER_COLUMNS settings - #1094
Conversation
|
Retain a safe explicit chooser-column subset for trace/estimation paths, or change pruning to preserve only trace-required fields rather than bypassing pruning completely. |
|
@copilot, address review comments on this PR |
Fixed in 71f88ba by taking the second option: The full, unpruned |
jpn--
left a comment
There was a problem hiding this comment.
• activitysim/abm/models/util/tour_destination.py:697 — The change merges all persons_merged columns into tours instead of retaining the previous narrow chooser-column selection. During household tracing, interaction_sample disables automatic chooser-column pruning, then cross-joins these wide choosers with alternatives. Because persons_merged can include household, land-use, accessibility, and disaggregate-accessibility fields, destination sampling can regress to a large chooser×alternative memory footprint and potentially OOM realistic traced runs.
Retain a safe explicit chooser-column subset for trace/estimation paths, or change pruning to preserve only trace-required fields rather than bypassing pruning completely.
| This setting is now obsolete and does nothing. Its functionality has been | ||
| replaced by :func:`activitysim.core.util.drop_unused_columns`. | ||
|
|
||
| .. deprecated:: 1.4 |
There was a problem hiding this comment.
The current release is v1.5, so this will be officially deprecated as of the next release (1.6)
| This setting is now obsolete and does nothing. Its functionality has been | ||
| replaced by :func:`activitysim.core.util.drop_unused_columns`. | ||
|
|
||
| .. deprecated:: 1.4 |
There was a problem hiding this comment.
The current release is v1.5, so this will be officially deprecated as of the next release (1.6)
jpn--
left a comment
There was a problem hiding this comment.
This looks good to me. The SANDAG test is failing due to the bug in at-work tour logsums.
| choosers[ORIG_TAZ] = network_los.map_maz_to_taz(choosers[orig_maz]) | ||
| # This is the TAZ for the configured tour origin. A wider chooser table | ||
| # may already contain a same-named home TAZ, which is incorrect for models | ||
| # such as at-work subtour destination choice. |
There was a problem hiding this comment.
This looks like the AI (here, OpenAI's Sol) found and fixed a mostly unrelated bug.
|
@dhensle, @janzill I don't think a comprehensive review from both of you here is totally necessary, but I know each of you has been in some of these files recently (and this is a re-do of David's original PR from some time ago) so I want to give you an opportunity to comment / review before I finalize and merge this. |
janzill
left a comment
There was a problem hiding this comment.
this all looks good, no suggestions but one comment: Sol did well finding that at-work origin bug.
dhensle
left a comment
There was a problem hiding this comment.
This looks good to me too. Glad to see copilot kept the traceable id columns which I think has previously been an issue that was also fixed as part of this PR. This is not tested as part of this, but we should really add some better tracing test coverage. I think that is better done in a separate PR.
SIMULATE_CHOOSER_COLUMNSandLOGSUM_CHOOSER_COLUMNSwere memory hacks that manually pruned chooser tables before merging with alternatives.util.drop_unused_columns(on by default viacompute_settings.drop_unused_columns) now does this automatically from the spec, so the manual lists are redundant — and a well-known gotcha, since omitting a column used by a spec silently breaks the model.Settings
Any | Nonewith amode="before"field validator that emits aDeprecationWarningand discards the value. Existing configs continue to load rather than trippingextra="forbid".TourLocationComponentSettings,TourModeComponentSettings,TourSchedulingSettings, andSchoolEscortSettings.Component code
# FIXME - MEMORY HACKcolumn subsetting (and the associated# Drop this when PR #1017 is mergedhousehold_idworkarounds) fromlocation_choice,util/tour_destination,util/tour_od,util/tour_scheduling, andschool_escorting.logsums.filter_chooser_columnsandexpressions.filter_chooser_columns.Configs / docs / tests
activitysim/core/test/test_deprecated_chooser_columns.pycovering the warning per settings class and the no-warning-when-omitted case; updated the two existing tests that supplied the setting.Users should remove these keys from their configs; no other action is required.