-
Notifications
You must be signed in to change notification settings - Fork 190
Better legacy failure warning #1570
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
Per the main README announcement, DeepSparse is being deprecated by June 2, 2025. Closing the PR as work has been suspended; thank you for the inputs and support! |
In case someone fails to create the V2 pipeline, I think it's helpful to print the error.