Skip to content

[FIX,WIP] Setting inputs.ignore_exception #2412

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

Merged
merged 2 commits into from
Jan 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions doc/users/saving_workflows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,27 +73,27 @@ This will create a file "outputtestsave.py" with the following content:
return out

testfunc.inputs.function_str = getsource(testfunc_1)
testfunc.inputs.ignore_exception = False
testfunc.ignore_exception = False
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.interface?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, and I think that the class attribute does not exist either.

testfunc.inputs.in1 = '-sub'
testsave.connect(inode, "a", testfunc, "in1")
# Node: testsave.bet2
bet2 = MapNode(BET(), iterfield=['infile'], name="bet2")
bet2.iterables = ('frac', [0.4, 0.5])
bet2.interface.ignore_exception = False
bet2.inputs.environ = {'FSLOUTPUTTYPE': 'NIFTI_GZ'}
bet2.inputs.ignore_exception = False
bet2.inputs.output_type = 'NIFTI_GZ'
bet2.terminal_output = 'stream'
# Node: testsave.bet
bet = Node(BET(), name="bet")
bet.iterables = ('frac', [0.3, 0.4])
bet.interface.ignore_exception = False
bet.inputs.environ = {'FSLOUTPUTTYPE': 'NIFTI_GZ'}
bet.inputs.ignore_exception = False
bet.inputs.output_type = 'NIFTI_GZ'
bet.terminal_output = 'stream'
# Node: testsave.maths
maths = Node(ImageMaths(), name="maths")
maths.interface.ignore_exception = False
maths.inputs.environ = {'FSLOUTPUTTYPE': 'NIFTI_GZ'}
maths.inputs.ignore_exception = False
maths.inputs.output_type = 'NIFTI_GZ'
maths.terminal_output = 'stream'
testsave.connect(bet2, ('mask_file', func), maths, "in_file2")
Expand Down
4 changes: 2 additions & 2 deletions nipype/workflows/smri/ants/ANTSBuildTemplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def ANTSTemplateBuildSingleIterationWF(iterationPhasePrefix=''):
output_names=['out']),
run_without_submitting=True,
name='MakeTransformsLists')
MakeTransformsLists.inputs.ignore_exception = True
MakeTransformsLists.interface.ignore_exception = True
TemplateBuildSingleIterationWF.connect(
BeginANTS, 'warp_transform', MakeTransformsLists, 'warpTransformList')
TemplateBuildSingleIterationWF.connect(BeginANTS, 'affine_transform',
Expand Down Expand Up @@ -263,7 +263,7 @@ def ANTSTemplateBuildSingleIterationWF(iterationPhasePrefix=''):
output_names=['TransformListWithGradientWarps']),
run_without_submitting=True,
name='MakeTransformListWithGradientWarps')
ApplyInvAverageAndFourTimesGradientStepWarpImage.inputs.ignore_exception = True
ApplyInvAverageAndFourTimesGradientStepWarpImage.interface.ignore_exception = True

TemplateBuildSingleIterationWF.connect(
AvgAffineTransform, 'affine_transform',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def antsRegistrationTemplateBuildSingleIterationWF(iterationPhasePrefix=''):
output_names=['TransformListWithGradientWarps']),
run_without_submitting=True,
name='99_MakeTransformListWithGradientWarps')
ApplyInvAverageAndFourTimesGradientStepWarpImage.inputs.ignore_exception = True
ApplyInvAverageAndFourTimesGradientStepWarpImage.interface.ignore_exception = True

TemplateBuildSingleIterationWF.connect(
AvgAffineTransform, 'affine_transform',
Expand Down