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
Postprocess timeseries fails when upgrade is not applicable to buildings #199
Comments
@afontani This is the issue I've created regarding the 0 sample error. Feel free to add your thought to it. |
@lixiliu: Thanks. I was thinking about how to navigate this error in the future. Here are a couple of thoughts:
|
Passing baseline:
skip_sims: true will skip running the baseline and only do the upgrades. |
@lixiliu @rajeee This looks like it was fixed in #212. buildstockbatch/buildstockbatch/postprocessing.py Lines 327 to 329 in ed88ce7
Can I close this issue? |
I just ran a small test with a conflicting upgrade and got this output
Looks like it is working as intended. |
@nmerket Agreed. That should fix it. |
####################
Traceback (most recent call last):
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'
####################
My upgrade run is erring out on postprocessing the timeseries, because there are a couple upgrades that ended up being not applicable to my SFD only stock, for example, it's erring out on an upgrade on finished roofs because SFD do not have finished roofs. This causes:
Can we add to the script a way to skip the timeseries post-processing when an upgrade has sample_size=0?
Also, this can benefit from an upgrade applicability check/warning based on buildstock.csv in the sampling stage.
The text was updated successfully, but these errors were encountered: