Skip to content

Add script to sample a single location#445

Open
nweires wants to merge 8 commits into
NatLabRockies:developfrom
rewiringamerica:sample_one_county
Open

Add script to sample a single location#445
nweires wants to merge 8 commits into
NatLabRockies:developfrom
rewiringamerica:sample_one_county

Conversation

@nweires

@nweires nweires commented Mar 27, 2024

Copy link
Copy Markdown
Collaborator

Pull Request Description

Add a script that runs the residential quota sampler for a single county+PUMA.

Using the downselect sampler to do the same thing works, but it gets very slow when you filter aggressively. For example, generating 100 buildings for a single rural county took more than an hour to run. With this script, it takes just a few minutes. A similar option for ComStock exists here.

Checklist

  • Code changes (must work)
  • Tests exercising your feature/bug fix (check coverage report on Checks -> BuildStockBatch Tests -> Artifacts)
  • Coverage has increased or at least not decreased. Update minimum_coverage in .github/workflows/coverage.yml as necessary.
  • All other unit and integration tests passing
  • Update validation for project config yaml file changes
  • Update existing documentation
  • Run a small batch run on Kestrel/Eagle to make sure it all works if you made changes that will affect Kestrel/Eagle
  • Add to the changelog_dev.rst file and propose migration text in the pull request

@github-actions

github-actions Bot commented Mar 27, 2024

Copy link
Copy Markdown

File Coverage
All files 87%
base.py 92%
exc.py 57%
hpc.py 78%
local.py 70%
postprocessing.py 85%
sample_one_county.py 77%
utils.py 92%
cloud/docker_base.py 88%
sampler/base.py 79%
sampler/downselect.py 33%
sampler/precomputed.py 93%
sampler/residential_quota.py 61%
test/shared_testing_stuff.py 85%
test/test_docker.py 33%
test/test_local.py 97%
test/test_validation.py 97%
workflow_generator/base.py 90%
workflow_generator/commercial.py 53%
workflow_generator/residential_hpxml.py 86%

Minimum allowed coverage is 33%

Generated by 🐒 cobertura-action against 6beba8c

@shorowit

shorowit commented Mar 28, 2024

Copy link
Copy Markdown
Contributor

@nweires I might be misunderstanding something, but isn't this what the Residential Quota Downselect Sampler is for?

@nweires

nweires commented Mar 28, 2024

Copy link
Copy Markdown
Collaborator Author

@nweires I might be misunderstanding something, but isn't this what the Residential Quota Downselect Sampler is for?

Ah, yes, I should add some context for why this is useful! You can do the same thing with the downselect sampler, but this is much faster, especially rural locations with very few building. I'll put some notes about that in the script and PR description.

@nweires nweires requested a review from nmerket March 28, 2024 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants