-
Notifications
You must be signed in to change notification settings - Fork 875
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
Speed up unit tests by removing sleep in start/stop torchserve #2383
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
0311c8d
Remove wait time when stopping and starting torchserve in tests
mreso 8471aeb
Remove 10 second wait time for start/stop torchserve
mreso 5f2adc3
Prepare log folder + remove spaces in command + obsolete kwarg
mreso 568fb1f
Allow --stop to be combined with --forward argument to wait for model…
mreso 24651ea
Merge branch 'master' into better_engineering/remove_sleep
mreso File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is the assumption that each new run of torchserve will overwite its logs?
It seems safe since tests are passing but just a bit worried we'll run into hard to debug testing issues later down the line
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.
The tests still run sequentially and nothing is overwritten. This class only prints the logs even after TS initialization is completed. This replicates the same behavior as we had before where we ran TS in a background process and waited for 10 seconds. Now we parse the stdout pipe for the initialization completed signal and then just let this class print the rest of the log. This way folks can still see and debug issues as before.
EDIT: Wrong class, this class actually writes a log but the principle is the same. Previously we just piped the output into a file, now we first parse it and then write it into the file. All other behavior stays the same. From a dev perspective nothing changes besides that your unit test is not waiting 30+ seconds for nothing.
EDIT2: Okay, three time's a charm...the log file gets appended every times, so same behavior as ">>" vs ">". We could probably get the same result with a tee -a if you prefer that.