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

feat: Added web server for deployment #27

Merged
merged 25 commits into from
Dec 13, 2020
Merged

feat: Added web server for deployment #27

merged 25 commits into from
Dec 13, 2020

Conversation

frgfm
Copy link
Member

@frgfm frgfm commented Dec 13, 2020

As per #20, a dedicated service needed to set for wildfire risk estimation. Consequently, this PR introduces the following features:

  • refactored package hierarchy for cleaner imports
  • removed unused dependencies
  • added FastAPI dedicated app to have a web server that processes requests with pyro_risks
  • added Docker orchestration for local development with the web server
  • added a CI workflow to check that the web server can be run
  • added heroku deployment files (Procfile, Aptfile)

Here is how the server processes the request:
pyrorisk_server

Merging this PR successfully will close #20
Any feedback is welcome!

cc @Akilditu @nrslt

@frgfm frgfm added enhancement New feature or request topic: build Related to build, installation & CI module: datasets topic: app labels Dec 13, 2020
@frgfm frgfm added this to the 0.1.0 milestone Dec 13, 2020
@frgfm frgfm self-assigned this Dec 13, 2020
Copy link
Collaborator

@jsakv jsakv left a comment

Choose a reason for hiding this comment

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

Thanks for your PR @frgfm and thanks for adding the dummy cache directory !

@codecov
Copy link

codecov bot commented Dec 13, 2020

Codecov Report

Merging #27 (3791f1e) into master (69e0177) will decrease coverage by 0.92%.
The diff coverage is 76.92%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #27      +/-   ##
==========================================
- Coverage   95.96%   95.04%   -0.93%     
==========================================
  Files          15       15              
  Lines         694      686       -8     
==========================================
- Hits          666      652      -14     
- Misses         28       34       +6     
Flag Coverage Δ
unittests 95.04% <76.92%> (-0.93%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pyro_risks/datasets/queries_api.py 78.57% <62.50%> (-21.43%) ⬇️
pyro_risks/datasets/era_fwi_viirs.py 93.47% <100.00%> (+0.79%) ⬆️
pyro_risks/models/__init__.py 100.00% <100.00%> (ø)
pyro_risks/models/predict.py 93.54% <100.00%> (+0.21%) ⬆️
pyro_risks/models/score_v0.py 90.14% <100.00%> (+0.14%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 69e0177...3791f1e. Read the comment docs.

@frgfm
Copy link
Member Author

frgfm commented Dec 13, 2020

Thanks for your PR @frgfm and thanks for adding the dummy cache directory !

@dataJSA I think you approved the PR and somehow cancelled your own review by re-requesting it 😅

jsakv
jsakv previously approved these changes Dec 13, 2020
Copy link
Collaborator

@jsakv jsakv left a comment

Choose a reason for hiding this comment

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

Yes I got ahead of myself ! Now I think it's ok 😄

docker-compose.yml Show resolved Hide resolved
pyro_risks/datasets/queries_api.py Show resolved Hide resolved
docker-compose.yml Show resolved Hide resolved
@frgfm frgfm merged commit 8c840df into master Dec 13, 2020
@frgfm frgfm deleted the deployment branch December 13, 2020 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request module: datasets topic: app topic: build Related to build, installation & CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[web server] Exposing the model inference part of the lib
3 participants