Skip to content

BUG: Dictionaries with output references as keys do not resolve #838

@Andrew-S-Rosen

Description

@Andrew-S-Rosen

In the following code, we expect the output references to be resolved, but they are not. An OutputReference appears in the response. Everything works as expected when the value has an OutputReference but not when the key does.

import jobflow as jf


@jf.job
def test(d: dict):
    d["test"] = "text"
    return d

job1 = test({"a": "b"})
job2 = test({job1.output["test"]: "c"})
responses = jf.run_locally(jf.Flow([job1, job2]), ensure_success=True)
print(responses[job2.uuid][1].output)
{OutputReference(938990aa-3c5e-4d7a-97ae-430dfac74b4d, ['test']): 'c', 'test': 'text'}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions