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

ComStock! #65

Merged
merged 80 commits into from May 20, 2020
Merged

ComStock! #65

merged 80 commits into from May 20, 2020

Conversation

rHorsey
Copy link
Contributor

@rHorsey rHorsey commented Jun 24, 2019

PR to enable Commercial use of modern-day buildstockbatch.

@rHorsey rHorsey added the DO NOT MERGE PR is open but please don't merge! label Jun 24, 2019
@rHorsey rHorsey self-assigned this Jun 24, 2019
@rHorsey
Copy link
Contributor Author

rHorsey commented Jun 24, 2019

@nmerket FYI - I'm testing this in the next few days, so please don't worry too much about code review just yet.

Cheers,

@rHorsey rHorsey removed the DO NOT MERGE PR is open but please don't merge! label Aug 29, 2019
@nmerket nmerket self-requested a review September 12, 2019 20:39
@nmerket
Copy link
Member

nmerket commented Sep 12, 2019

Make sure the custom docker image on the local docker version.

@nmerket
Copy link
Member

nmerket commented May 12, 2020

When I try to run a precomputed sample like so:

baseline:
  sampling_algorithm: precomputed
  # n_datapoints: 12
  n_buildings_represented: 110000000
  precomputed_sample: ../../buildstock.csv

I get the following error:

Traceback (most recent call last):
  File "/Users/nmerket/opt/anaconda3/envs/buildstockbatch/bin/buildstock_docker", line 11, in <module>
    load_entry_point('buildstock-batch', 'console_scripts', 'buildstock_docker')()
  File "/Users/nmerket/projects/resstock/buildstockbatch/buildstockbatch/localdocker.py", line 321, in main
    batch.run_batch(n_jobs=args.j, measures_only=args.measures_only, sampling_only=args.samplingonly)
  File "/Users/nmerket/projects/resstock/buildstockbatch/buildstockbatch/localdocker.py", line 222, in run_batch
    dpouts = Parallel(n_jobs=n_jobs, verbose=10)(all_sims)
  File "/Users/nmerket/opt/anaconda3/envs/buildstockbatch/lib/python3.7/site-packages/joblib/parallel.py", line 1017, in __call__
    self.retrieve()
  File "/Users/nmerket/opt/anaconda3/envs/buildstockbatch/lib/python3.7/site-packages/joblib/parallel.py", line 909, in retrieve
    self._output.extend(job.get(timeout=self.timeout))
  File "/Users/nmerket/opt/anaconda3/envs/buildstockbatch/lib/python3.7/site-packages/joblib/_parallel_backends.py", line 562, in wrap_future_result
    return future.result(timeout=timeout)
  File "/Users/nmerket/opt/anaconda3/envs/buildstockbatch/lib/python3.7/concurrent/futures/_base.py", line 435, in result
    return self.__get_result()
  File "/Users/nmerket/opt/anaconda3/envs/buildstockbatch/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
KeyError: 'n_datapoints'

Do I need to include n_datapoints if I'm providing a precomputed sample? Shouldn't it just pull that from the sampled file?

@nmerket
Copy link
Member

nmerket commented May 12, 2020

But it runs if I look at the buildstock.csv and count lines and put that in for n_datapoints. Can we make n_datapoints optional if a precomputed sample is provided? I think that's how it was before.

@nmerket
Copy link
Member

nmerket commented May 12, 2020

Then when I provide n_datapoints but with the wrong number, I get this error:

RuntimeError: A buildstock_csv was provided, so n_datapoints for sampling should not be provided or should be equal to the number of rows in the buildstock.csv file. Remove or comment out baseline->n_datapoints from your project file or set it equal to 5.

Based on that we should definitely let n_datapoints be optional if a precomputed sample is provided.

nmerket
nmerket previously approved these changes May 19, 2020
Copy link
Member

@nmerket nmerket left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rHorsey I've completed testing of this on local, Eagle, and AWS. It's working as far as I can tell now. I fixed some things in the validation and simplified the pre-computed sampler. Let me know when the docs changes are done and we'll merge it.

BuildStock Batch automation moved this from Review in progress to Reviewer approved May 19, 2020
BuildStock Batch automation moved this from Reviewer approved to Review in progress May 20, 2020
@rHorsey rHorsey requested a review from nmerket May 20, 2020 14:39
BuildStock Batch automation moved this from Review in progress to Reviewer approved May 20, 2020
@nmerket nmerket merged commit 9588244 into master May 20, 2020
BuildStock Batch automation moved this from Reviewer approved to Done May 20, 2020
@nmerket nmerket deleted the rHorsey/enable-com branch May 20, 2020 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants