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

TypeError in bs-0.19 #206

Closed
vtnate opened this issue Jan 25, 2021 · 4 comments
Closed

TypeError in bs-0.19 #206

vtnate opened this issue Jan 25, 2021 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@vtnate
Copy link
Contributor

vtnate commented Jan 25, 2021

Describe the bug
Postprocessing fails with:

Traceback (most recent call last):
File "/shared-projects/buildstock/envs/buildstock-0.19/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/shared-projects/buildstock/envs/buildstock-0.19/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/shared-projects/buildstock/envs/buildstock-0.19/lib/python3.7/site-packages/buildstockbatch/eagle.py", line 757, in
main()
File "/shared-projects/buildstock/envs/buildstock-0.19/lib/python3.7/site-packages/buildstockbatch/utils.py", line 61, in run_with_error_capture
return func(*args, **kwargs)
File "/shared-projects/buildstock/envs/buildstock-0.19/lib/python3.7/site-packages/buildstockbatch/eagle.py", line 747, in main
batch.process_results()
File "/shared-projects/buildstock/envs/buildstock-0.19/lib/python3.7/site-packages/buildstockbatch/base.py", line 779, in process_results
postprocessing.combine_results(fs, self.results_dir, self.cfg, do_timeseries=do_timeseries)
File "/shared-projects/buildstock/envs/buildstock-0.19/lib/python3.7/site-packages/buildstockbatch/postprocessing.py", line 332, in combine_results
mean_mem = np.mean(dask.compute(map(get_ts_mem_usage_d, random.sample(ts_filenames, sample_size)))[0])
File "<array_function internals>", line 6, in mean
File "/shared-projects/buildstock/envs/buildstock-0.19/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 3373, in mean
out=out, **kwargs)
File "/shared-projects/buildstock/envs/buildstock-0.19/lib/python3.7/site-packages/numpy/core/_methods.py", line 172, in _mean
ret = ret / rcount
TypeError: unsupported operand type(s) for /: 'map' and 'int'

The yml file that lead to this error can be found here.

To Reproduce
Steps to reproduce the behavior:

  1. Use the linked yml file with buildstock-0.19
  2. Do a normal run. I've been getting 50-60 buildings in buildstock.csv, so perhaps n_datapoints could be reduced a little. postprocessing.out is where the error shows up.

Platform (please complete the following information):

  • Simulation platform: Eagle
  • BuildStockBatch version, branch, or sha: buildstock-0.19
  • resstock or comstock repo version, branch, or sha: resstock develop
  • Local Desktop OS: Mac

Additional context
I'm testing in preparation for a larger run, with the same down-selection.

@vtnate vtnate added the bug Something isn't working label Jan 25, 2021
@rajeee
Copy link
Contributor

rajeee commented Jan 26, 2021

@vtnate Can you attach buildstockbatch_crash_details.log here?

@vtnate
Copy link
Contributor Author

vtnate commented Jan 26, 2021

@rajeee I've uploaded the crash details file on my branch.

I also see that this appears to be a duplicate of the issue @lixiliu raised: #199, which tells me the immediate solution is for me to change my upgrades. I'm good in the short term regarding this. @nmerket

@rajeee
Copy link
Contributor

rajeee commented Jan 26, 2021

@vtnate Thanks. Yeah, it's failing because there are no time series files for the current upgrade. Though the error could be made a bit more descriptive and we should definitely allow for some upgrades not having any timeseries result.

@vtnate
Copy link
Contributor Author

vtnate commented Jan 26, 2021

Thanks @rajeee, it would be great if upgrades that weren't applicable could still be added to the yml and just resulted in empty timeseries for that upgrade.

@vtnate vtnate closed this as completed Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants