-
Notifications
You must be signed in to change notification settings - Fork 1.6k
test: Add tests cancelling BLS decoupled request in Python backend #8097
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
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
import asyncio |
Check notice
Code scanning / CodeQL
Unused import Note
This autofix suggestion was applied.
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
To fix the problem, we need to remove the unused import statement for the asyncio
module. This will eliminate the unnecessary dependency and make the code cleaner and easier to read. The change should be made in the file qa/L0_backend_python/decoupled/models/decoupled_bls_async_cancel/1/model.py
by deleting the line that imports asyncio
.
@@ -25,3 +25,2 @@ | ||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
import asyncio | ||
|
Nice work adding tests for both async and regular decoupled BLS request cancellation! Request cancellation is best effort in Triton, meaning the cancellation only "happens" if the backend implements it. Can we add two new tests, in addition to the two tests, for checking the behavior of BLS cancellation when the inner model does not honor request cancellation, which the inner model will return all the responses and final flag normally despite cancellation is requested? Edit: Can we also add a small test checking what will happen if the model is trying to cancel a completed/finialed BLS request? |
qa/L0_backend_python/decoupled/models/decoupled_bls_async_cancel/1/model.py
Outdated
Show resolved
Hide resolved
qa/L0_backend_python/decoupled/models/decoupled_bls_cancel/1/model.py
Outdated
Show resolved
Hide resolved
qa/L0_backend_python/decoupled/models/decoupled_bls_cancel/1/model.py
Outdated
Show resolved
Hide resolved
qa/L0_backend_python/decoupled/models/decoupled_bls_async_cancel/1/model.py
Outdated
Show resolved
Hide resolved
995b3e9
to
22c1cf0
Compare
Thanks! Tests added. |
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
import asyncio |
Check notice
Code scanning / CodeQL
Unused import Note
This autofix suggestion was applied.
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
To fix the problem, we need to remove the unused import statement for the asyncio
module. This will clean up the code and remove the unnecessary dependency, making the code easier to read and maintain.
- Locate the import statement for
asyncio
on line 26. - Remove the line
import asyncio
from the fileqa/L0_backend_python/decoupled/models/decoupled_bls_cancel_after_complete/1/model.py
.
@@ -25,4 +25,2 @@ | ||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
import asyncio | ||
|
||
import numpy as np |
3e775fe
to
9e8e320
Compare
Please avoid force pushing commits as it makes it harder for reviewers to track your changes. |
Sorry about that, I will not do it next time. All changes from the last review are in the second commit of this PR, you can check the commit history and click the second commit and find all the changes. I had a habit of squash changes into each one commit for each round of review, but next time I will not squash commits. Thanks! |
qa/L0_backend_python/decoupled/models/decoupled_bls_cancel_after_complete/1/model.py
Show resolved
Hide resolved
qa/L0_backend_python/decoupled/models/decoupled_bls_cancel_after_complete/1/model.py
Show resolved
Hide resolved
qa/L0_backend_python/decoupled/models/decoupled_bls_cancel/1/model.py
Outdated
Show resolved
Hide resolved
qa/L0_backend_python/decoupled/models/decoupled_bls_cancel/1/model.py
Outdated
Show resolved
Hide resolved
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.
Nice work! Make sure new tests pass the CI pipeline.
What does the PR do?
Add tests cancelling BLS decoupled request in Python backend.
Checklist
<commit_type>: <Title>
Commit Type:
Check the conventional commit type
box here and add the label to the github PR.
Related PRs:
triton-inference-server/python_backend#398
Where should the reviewer start?
Check the response_sender_until_cancelled python decoupled model added and then check the two added testing models.
The tests are based on the two added testing models sending BLS requests to the response_sender_until_cancelled python decoupled model.
Test plan:
Caveats:
NA
Background
NA
Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)
https://jirasw.nvidia.com/browse/DLIS-7831