Skip to content

Commit

Permalink
relax exception type
Browse files Browse the repository at this point in the history
  • Loading branch information
roywei committed Aug 10, 2022
1 parent 122e429 commit d9c4492
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sagemaker_training/smdataparallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@

# list of exceptions SMDDP wants training toolkit to catch and log
exception_classes = [x for x in dir(exceptions) if isclass(getattr(exceptions, x))]
except ImportError:
# relaxed exception type in case of custom exceptions thrown during import
except Exception:
logger.info("No exception classes found in smdistributed.dataparallel")
exception_classes = [errors.ExecuteUserScriptError]

Expand Down

0 comments on commit d9c4492

Please sign in to comment.