Added some safeguards when the necessary imports are not available#291
Added some safeguards when the necessary imports are not available#291mergify[bot] merged 8 commits intoinstructlab:mainfrom Harthi7:feature/add-try-catch-import-to-deepspeed
Conversation
|
Hey @RobotSail, I had a rebasing/signing-off problem in my previous branch (#267) so I made a new branch with the requested changes. Please let me know what you think |
|
Hello @Maxusmusti, This PR is ready for review please let me know what you think. |
|
@Harthi7 will take a look today, thanks! |
…cessary imports are not available Signed-off-by: Harthi7 <abdullah-harthi7@live.com> Signed-off-by: abdullah-ibm <abdullah@ibm.com>
…re/add-try-catch-import-to-deepspeed
|
Looks like you are hitting some linting/formatting issues, but otherwise looks good |
Signed-off-by: abdullah-ibm <abdullah@ibm.com>
Fixed, Please take a look and let me know what you think @Maxusmusti |
|
Re-triggering tests |
|
@Harthi7 looks like it is still failing linting and formatting, you can run the following to identify the linting issues and automatically reformat: |
…re/add-try-catch-import-to-deepspeed
|
@Harthi7 this is a great addition, would you please fix the linting + minor issues? |
…re/add-try-catch-import-to-deepspeed
|
I fixed the Pylint/Formatting issue, Please take a look again @Maxusmusti |
| from deepspeed.runtime.zero.utils import ZeRORuntimeException | ||
|
|
||
| # pylint: disable=no-name-in-module | ||
| try: |
There was a problem hiding this comment.
You separated these try-except blocks because DeepSpeedCPUAdam is only imported for CPU offloading training correct? It'd be appreciated to have this documented since you're repeating code.
There was a problem hiding this comment.
Yes, I believe that is correct as @RobotSail have stated in a previous comment #267 (comment), as for the documentation how should we move forward?
JamesKunstle
left a comment
There was a problem hiding this comment.
Just wanting clarification on the import try-except with a comment, otherwise it'll be good to go in.
Signed-off-by: abdullah-ibm <abdullah@ibm.com>
JamesKunstle
left a comment
There was a problem hiding this comment.
Nice, this is really helpful. I appreciate your contribution!
Context Issue:
#250 (comment)
Implemented error handling for the import of deepspeed to prevent runtime crashes
when the module is unavailable. This improves the robustness of the application.
Issue: #250