-
Notifications
You must be signed in to change notification settings - Fork 144
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
avoid client generation if already exist #324
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #324 +/- ##
===================================
Coverage 95% 96%
===================================
Files 21 21
Lines 1344 1343 -1
===================================
+ Hits 1283 1285 +2
+ Misses 61 58 -3 |
|
||
# Replace the default port number with the user-specified port number | ||
client_code = client_code.replace("{{PORT}}", str(port)) | ||
if os.path.exists(dest_path): |
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.
But is it a correct behaviour?
If I changed the port I expect that the file should be regenerated with a new, correct one.
Or maybe I am missing something?
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.
if you already have a client.py
that you updated based on your server (let's say image classification). You won't want LitServe to replace the file. The generate client is supposed to be static template that people can quickly edit.
Before submitting
What does this PR do?
avoid client generation if already exist. Caught by @bhimrazy #307 (comment)
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in GitHub issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃