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

Debug decorator - fix delayed output for python functions #1674

Merged
merged 8 commits into from
Oct 22, 2024

Conversation

jan-janssen
Copy link
Member

@jan-janssen jan-janssen commented Oct 22, 2024

Add support for python functions with multiple outputs:

from pyiron_base import Project, pyiron_job

@pyiron_job(output_key_lst=["a", "b", "c"])
def function_with_dict(a, b=1, c=3):
    return {"a": a, "b": b, "c": c}


pr = Project("test")
job_1 = function_with_dict(a=6, b=4, c=3, pyiron_project=pr)
job_2 = function_with_dict(a=job_1.output.a, b=5, c=job_1.output.c, pyiron_project=pr)
job_2.pull()
>>> {'a': 6, 'b': 5, 'c': 3}

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@jan-janssen jan-janssen changed the title Debug decorator Debug decorator - fix delayed output for python functions Oct 22, 2024
@jan-janssen jan-janssen merged commit 0163935 into main Oct 22, 2024
26 checks passed
@jan-janssen jan-janssen deleted the debug_decorator branch October 22, 2024 10:12
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.

1 participant