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

Delayed execution in pyiron_base - for wrap_python_function() and wrap_executable() #1508

Merged
merged 37 commits into from
Jul 5, 2024

Conversation

jan-janssen
Copy link
Member

@jan-janssen jan-janssen commented Jul 2, 2024

Example:

from pyiron_base import Project

def add_x_and_y(x, y):
    z = x + y
    return z

def add_x_and_y_and_z(x, y, z):
    w = x + y + z
    return w


pr = Project("test")
z = pr.wrap_python_function(python_function=add_x_and_y, x=1, y=2, delayed=True)
w = pr.wrap_python_function(python_function=add_x_and_y_and_z, x=1, y=2, z=z, delayed=True)
w.result()

Waiting for:

@jan-janssen jan-janssen marked this pull request as draft July 2, 2024 16:05
@jan-janssen jan-janssen added the format_black reformat the code using the black standard label Jul 2, 2024
@jan-janssen jan-janssen changed the title Delayed execution in pyiron_base - for wrap_python_function() only Delayed execution in pyiron_base - for wrap_python_function() and wrap_executable() Jul 2, 2024
@jan-janssen jan-janssen requested a review from pmrv July 3, 2024 06:49
@jan-janssen jan-janssen marked this pull request as ready for review July 4, 2024 19:25
pyiron_base/project/delayed.py Outdated Show resolved Hide resolved
pyiron_base/project/delayed.py Outdated Show resolved Hide resolved
pyiron_base/project/delayed.py Outdated Show resolved Hide resolved
pyiron_base/project/delayed.py Outdated Show resolved Hide resolved
Co-authored-by: Sam Dareska <37879103+samwaseda@users.noreply.github.com>
jan-janssen and others added 5 commits July 4, 2024 21:39
Co-authored-by: Sam Dareska <37879103+samwaseda@users.noreply.github.com>
Co-authored-by: Sam Dareska <37879103+samwaseda@users.noreply.github.com>
Co-authored-by: Sam Dareska <37879103+samwaseda@users.noreply.github.com>
# Conflicts:
#	pyiron_base/jobs/job/runfunction.py
pyiron_base/project/delayed.py Outdated Show resolved Hide resolved
pyiron_base/project/delayed.py Outdated Show resolved Hide resolved
pyiron_base/project/delayed.py Outdated Show resolved Hide resolved
pyiron_base/project/delayed.py Outdated Show resolved Hide resolved
pyiron_base/project/delayed.py Show resolved Hide resolved
pyiron_base/project/delayed.py Outdated Show resolved Hide resolved
jan-janssen and others added 6 commits July 5, 2024 06:21
Co-authored-by: Sam Dareska <37879103+samwaseda@users.noreply.github.com>
Co-authored-by: Sam Dareska <37879103+samwaseda@users.noreply.github.com>
Co-authored-by: Sam Dareska <37879103+samwaseda@users.noreply.github.com>
@jan-janssen
Copy link
Member Author

@samwaseda I would like to include this in the next pyiron_base version. Is there anything missing from your side? Do you have a quick moment to review the latest changes?

Copy link
Member

@samwaseda samwaseda left a comment

Choose a reason for hiding this comment

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

There are still some small things I would love to change but they can belong to other PR's.

@jan-janssen jan-janssen merged commit 1efbd7f into main Jul 5, 2024
24 of 25 checks passed
@jan-janssen jan-janssen deleted the delayed branch July 5, 2024 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
format_black reformat the code using the black standard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants