-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: FastAPI integration for In_Process Mode (2/2) #4808
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
Conversation
|
||
count = 1 | ||
time_limit = datetime.now() + timedelta(seconds=20) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: time_limit = datetime.now() + timedelta(seconds=5)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will fix, thank you
config = uvicorn.Config( | ||
_app, | ||
host="127.0.0.1", | ||
port=9007, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
q: can we let port be dynamic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are researching this, will be an action item.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approve please address minor changes and get additional approval from @makungaj1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the .whl file for?
…emaker-python-sdk into fastapi-inprocess ssss
@@ -1,2 +1,5 @@ | |||
accelerate>=0.24.1,<=0.27.0 | |||
sagemaker_schema_inference_artifacts>=0.0.5 | |||
uvicorn>=0.30.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these needed? Doesn't look like we import them anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They're imported in the app.py file
Issue #, if available:
Description of changes:
Introduced new app.py and local_run.sh files that allow for the server to run requests using FastAPI and uvicorn.
Testing done:
Integr tests run locally.
Merge Checklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.General
Tests
unique_name_from_base
to create resource names in integ tests (if appropriate)By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.