-
Notifications
You must be signed in to change notification settings - Fork 173
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
Better legacy failure warning #1570
base: main
Are you sure you want to change the base?
Conversation
src/deepsparse/pipeline.py
Outdated
_LOGGER.warning(f"Could not create v2 '{task}' pipeline, with error: {e}") | ||
_LOGGER.warning(f"Attempting to create the legacy pipeline") |
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.
could we combine these to one string so only one message is logged?
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.
Yeah I just figured the error might be long. But I'll put it at the end, something like:
_LOGGER.warning(f"Could not create v2 '{task}' pipeline, attempting to create the legacy pipeline. V2 pipeline error: {e}")
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.
You can just do:
_LOGGER.warning(f"Could not create v2 '{task}' pipeline, with error: {e}. "
"Attempting to create the legacy pipeline")
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.
I think Luka meant the error will be long so the sentence might look weird in the console
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.
Yeah just in case
src/deepsparse/pipeline.py
Outdated
_LOGGER.warning(f"Could not create v2 '{task}' pipeline, with error: {e}") | ||
_LOGGER.warning(f"Attempting to create the legacy pipeline") |
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.
You can just do:
_LOGGER.warning(f"Could not create v2 '{task}' pipeline, with error: {e}. "
"Attempting to create the legacy pipeline")
You can't have the word |
Oh, I see. What words are allowed? Can I say |
@ProExpertProg you're currently failing this test:
Which checks for |
Single-line and removed `error` keyword
974fb3d
In case someone fails to create the V2 pipeline, I think it's helpful to print the error.