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

Allow setting some Learner-related params via environment variables (or other Everett config options) #1978

Merged
merged 5 commits into from Nov 6, 2023

Conversation

AdeelH
Copy link
Collaborator

@AdeelH AdeelH commented Nov 6, 2023

Overview

This PR

  • adds support for the following env variables:
    • RASTERVISION_PREDICT_BATCH_SIZE - the batch size to use during prediction.
    • RASTERVISION_PREDICT_NUM_WORKERS - num_workers to pass to the PyTorch DataLoader during prediction.
  • refactors code so that these env variables (as well as the previously added RASTERVISION_USE_ONNX) are accessed through RVConfig.

Checklist

  • Added needs-backport label if PR is bug fix that applies to previous minor release
  • Ran scripts/format_code and committed any changes
  • Documentation updated if needed
  • PR has a name that won't get you publicly shamed for vagueness

Notes

N/A

Testing Instructions

N/A

Copy link

codecov bot commented Nov 6, 2023

Codecov Report

Merging #1978 (8f9fa23) into master (e56f93d) will decrease coverage by 0.01%.
The diff coverage is 86.36%.

@@            Coverage Diff             @@
##           master    #1978      +/-   ##
==========================================
- Coverage   86.20%   86.20%   -0.01%     
==========================================
  Files         193      193              
  Lines        9434     9451      +17     
==========================================
+ Hits         8133     8147      +14     
- Misses       1301     1304       +3     
Files Coverage Δ
...ch_learner/rastervision/pytorch_learner/learner.py 82.66% <100.00%> (+0.12%) ⬆️
...vision_pipeline/rastervision/pipeline/rv_config.py 83.63% <81.25%> (-0.90%) ⬇️

@AdeelH AdeelH marked this pull request as ready for review November 6, 2023 18:21
@AdeelH AdeelH merged commit 90d8480 into azavea:master Nov 6, 2023
2 checks passed
@AdeelH AdeelH deleted the rvconfig-pred-opts branch November 6, 2023 18:23
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.

None yet

1 participant