Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sharrow debug in simulate.py not working #874

Open
i-am-sijia opened this issue Jun 5, 2024 · 1 comment
Open

Sharrow debug in simulate.py not working #874

i-am-sijia opened this issue Jun 5, 2024 · 1 comment
Labels
Bug Something isn't working/bug f

Comments

@i-am-sijia
Copy link
Contributor

i-am-sijia commented Jun 5, 2024

Describe the bug
This came up when I ran ABM3 100% sample with sharrow set to test. See issue ActivitySim/sandag-abm3-example#18. I found a work around to debug but it would be better if we can fix sharrow...

In sharrow test mode, when the utility returned by sharrow does not match the non-sharrow utility, sharrow attempts to retrieve data and print out possible problematic expressions to help debugging. See code here:

if len(misses[0]) > sh_util.size * 0.01:
print(
f"big problem: {len(misses[0])} missed close values "
f"out of {sh_util.size} ({100*len(misses[0]) / sh_util.size:.2f}%)"
)
print(f"{sh_util.shape=}")
print(misses)
_sh_flow_load = sh_flow.load(sh_tree)
print("possible problematic expressions:")
for expr_n, expr in enumerate(exprs):

However, currently the run will get stuck (no crash no response) in line 807 _sh_flow_load = sh_flow.load(sh_tree). Not sure if this is broken due to some recent changes.

Also, for many example models, the sharrow test mode has only been run with small samples, and issues like this seem to get discovered especially when we run large samples (100% HH). This means when agencies adopt sharrow, we should probably recommend running test mode with a large (enough) sample.

To Reproduce
Steps to reproduce the behavior:

Expected behavior
It would be nice to have line 807 working and return the problematic expressions.

@i-am-sijia
Copy link
Contributor Author

Update: I ran the small ABM3 test example with sharrow on, the model got stuck (no crash, no response, no termination) in the same location. I believe this is why our GitHub Actions test has been failing with error code 143: https://github.com/ActivitySim/activitysim/actions/runs/9209634995/job/25335037344

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working/bug f
Projects
None yet
Development

No branches or pull requests

1 participant