-
Notifications
You must be signed in to change notification settings - Fork 9
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
Graceful handling of exception thrown by genai-perf if metrics url is unreachable #47
Conversation
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.
Fantastic work! I left some comments.
genai-perf/genai_perf/telemetry_data/telemetry_data_collector.py
Outdated
Show resolved
Hide resolved
genai-perf/genai_perf/telemetry_data/telemetry_data_collector.py
Outdated
Show resolved
Hide resolved
genai-perf/genai_perf/telemetry_data/telemetry_data_collector.py
Outdated
Show resolved
Hide resolved
genai-perf/genai_perf/wrapper.py
Outdated
telemetry_data_collector.start() | ||
else: | ||
logger.warning( | ||
f"The metrics url ({telemetry_data_collector.metrics_url}) is unreachable, cannot collect telemetry data" |
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.
A little too long. Also a run-on sentence. We might want to make it shorter.
Something like:
The metrics url ({telemetry_data_collector.metrics_url}) is unreachable.
GenAI-Perf cannot collect telemetry data.
genai-perf/genai_perf/telemetry_data/telemetry_data_collector.py
Outdated
Show resolved
Hide resolved
genai-perf/genai_perf/wrapper.py
Outdated
telemetry_data_collector.start() | ||
else: | ||
logger.warning( | ||
f"The metrics URL ({telemetry_data_collector.metrics_url}) is unreachable." |
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: Could you add a space at the end of this? Otherwise, there won't be one.
E.g.
f"The metrics URL ({telemetry_data_collector.metrics_url}) is unreachable. "
"GenAI-Perf cannot collect telemetry data."
This makes it so that instead of "...unreachable.GenAI-Perf...", the message reads "...unreachable. GenAI-Perf..."
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.
Added the space.
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.
Did you push it? I don't see it on my end.
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.
yes, I did. Let me know if you still cannot see the change. There was some problem initially when I tried to update my branch and this change was overwritten I think.
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.
One nit, then everything looks good from my end.
Have you run it and received the error message? Does the error message look good? If so, it'd be nice to add a screenshot to this PR but is not mandatory.
Attached the screenshot of how the error message looks on the console. |
933f68d
to
3f32aa8
Compare
… unreachable (#47) * Fix exception thrown by genai-perf if metrics url is unreachable * Fix comments * Fix comments * Fix comments * Add space in error message
… unreachable (#47) * Fix exception thrown by genai-perf if metrics url is unreachable * Fix comments * Fix comments * Fix comments * Add space in error message
… unreachable (#47) * Fix exception thrown by genai-perf if metrics url is unreachable * Fix comments * Fix comments * Fix comments * Add space in error message
* Add CLI argument for server-metrics-url * Remove print statement * Fix pre-commit error * Graceful handling of exception thrown by genai-perf if metrics url is unreachable (#47) * Fix exception thrown by genai-perf if metrics url is unreachable * Fix comments * Fix comments * Fix comments * Add space in error message * Add CLI argument for server-metrics-url * Fix pre-commit error and remove duplicates * Remove unnecessary print * Fix comments * Fix pytest error * Fix comments * Refactor test function names * Fix comments * Fix comment in test_profile_handler * Cleanup test_profile_handler.py test * Move MockArgs outside TestProfileHandler * Move test triton metrics url to a variable
This is a small PR to gracefully handle the exception thrown by GenAI-Perf and it is logged as a warning that the url is not reachable.