Skip to content
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

Support Save and Restart #14

Merged
merged 6 commits into from
Dec 5, 2023
Merged

Support Save and Restart #14

merged 6 commits into from
Dec 5, 2023

Conversation

superstar54
Copy link
Member

@superstar54 superstar54 commented Dec 4, 2023

Save

Add WorkTree.save method, it will

  • will create a process node for the first
  • check the difference, and find the modified nodes, append the reset action to the message queue.

Restart

Add restart and new keyword arguments to the submit method.

  • submit(restart=True) will restart the worktree, and only re-run the modified nodes
  • submit(new=True) will reset the worktree, and submit a new calculation.

Here is an example:

from aiida_worktree import WorkTree
wt2 = WorkTree.load(pk)
wt2.name = "restart_workflow"
wt2.nodes["add2"].set({"y": Int(10).store()})
# use the `restart` flag to restart the workflow
wt2.submit(wait=True, restart=True)

@superstar54 superstar54 linked an issue Dec 5, 2023 that may be closed by this pull request
@superstar54 superstar54 merged commit dd04076 into main Dec 5, 2023
4 checks passed
@superstar54 superstar54 deleted the feature/restart branch December 8, 2023 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compare with AiiDA get_builder_restart
1 participant