Skip to content

Commit 275feda

Browse files
committed
pass sh_tree back again for tracing
1 parent bdce983 commit 275feda

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

activitysim/core/interaction_simulate.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,13 @@ def replace_in_index_level(mi, level, *repls):
187187
index=df.index if extra_data is None else None,
188188
)
189189
chunk_sizer.log_df(trace_label, "sh_util", None) # hand off to caller
190+
if sharrow_enabled != "test":
191+
# if not testing sharrow, we are done with this object now.
192+
del sh_util
190193

191194
timelogger.mark("sharrow flow", True, logger, trace_label)
192195
else:
193-
sh_util, sh_flow = None, None
196+
sh_util, sh_flow, sh_tree = None, None, None
194197
timelogger.mark("sharrow flow", False)
195198

196199
if (
@@ -404,9 +407,9 @@ def to_series(x):
404407
if sh_flow is not None and trace_rows is not None and trace_rows.any():
405408
assert type(trace_rows) == np.ndarray
406409
sh_utility_fat = sh_flow.load_dataarray(
407-
# sh_flow.tree.replace_datasets(
408-
# df=df.iloc[trace_rows],
409-
# ),
410+
sh_tree.replace_datasets(
411+
df=df.iloc[trace_rows],
412+
),
410413
dtype=np.float32,
411414
)
412415
sh_utility_fat = sh_utility_fat[trace_rows, :]

0 commit comments

Comments
 (0)