-
Notifications
You must be signed in to change notification settings - Fork 90
Add capture_error flag to process.check_error and process.create #140
Conversation
src/sagemaker_containers/_errors.py
Outdated
|
|
||
| error_msg = decode_error() if self.output else '' | ||
|
|
||
| message = '%s:\nCommand "%s"\n%s' % (type(self).__name__, self.cmd, error_msg) |
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.
this leaves extra newline in the message if error_msg is '' (self.output = None)
src/sagemaker_containers/_errors.py
Outdated
|
|
||
| def __str__(self): | ||
| message = '%s:\nCommand "%s"' % (type(self).__name__, self.cmd) | ||
| def decode_error(): |
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.
why nested? why same name as member function?
Codecov Report
@@ Coverage Diff @@
## master #140 +/- ##
==========================================
+ Coverage 95.47% 95.53% +0.06%
==========================================
Files 20 20
Lines 840 852 +12
Branches 73 76 +3
==========================================
+ Hits 802 814 +12
Misses 23 23
Partials 15 15
Continue to review full report at Codecov.
|
CHANGELOG.rst
Outdated
| ===== | ||
|
|
||
| * feature: add capture_error flag to process.check_error and process.create and to | ||
| all functions that runs process: modules.run, modules,run_module, and entry_point.run |
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.
should not be newline here
src/sagemaker_containers/_modules.py
Outdated
|
|
||
|
|
||
| def install(path): # type: (str) -> None | ||
| def install(path, capture_error=False): # type: (str) -> None |
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.
update type hint
jesterhazy
left a comment
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.
fix PR description, but otherwise LGTM
Description of changes:
release: 2.3.4
all functions that runs process: modules.run, modules,run_module, and entry_point.run
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.