8000 FIX: Copy interface before running to prevent task mutation on run by effigies · Pull Request #12 · nipype/pydra-nipype1 · GitHub
[go: up one dir, main page]

Skip to content
8000

FIX: Copy interface before running to prevent task mutation on run #12

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Merge branch 'main' into fix/no_mutate_on_run
  • Loading branch information
effigies authored Mar 23, 2024
commit 7fd9e72e00b3ad42d730aec8bcf5f714eaa479ee
7 changes: 3 additions & 4 deletions pydra/tasks/nipype1/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,9 @@ def __init__(
)
self.output_spec = traitedspec_to_specinfo(interface._outputs())

def _run_task(self):
inputs = attr.asdict(
self.inputs, filter=lambda a, v: v is not attr.NOTHING, retain_collection_types=True
)

def _run_task(self, environment=None):
inputs = attrs.asdict(self.inputs, filter=lambda a, v: v is not attrs.NOTHING)
node = nipype.Node(deepcopy(self._interface), base_dir=self.output_dir, name=self.name)
node.inputs.trait_set(**inputs)
res = node.run()
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.
0