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

Add script to sample a single location #445

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

nweires
Copy link
Collaborator

@nweires nweires commented Mar 27, 2024

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

Copy link

github-actions bot commented Mar 27, 2024

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
Copy link
Contributor

shorowit commented Mar 28, 2024

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

@nweires
Copy link
Collaborator Author

nweires commented Mar 28, 2024

@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