Skip to content

Output of Python Functions lost in Dragon Backend when using Process Template #70

Description

@BenCarter44

Currently, when running 02-workload-heterogeneous.py in the /examples directory via dragon, I am unable to get the output of Python ComputeTasks that include a process template.

I noticed that mp.set_start_method("dragon") was missing in the file. Adding that in fixed stdout capture of ComputeTasks with process templates. However, for running native Python functions, the return value is missing.

Output:

Task task.000004: DONE output: '0'  Stdout: 'Single Function'  Return '0'

Expected Output:

Task task.000004: DONE output: ("my.hostname",42)  Stdout: 'Single Function'  Return ("my.hostname",42)

For reference:

async def single_function():
    import socket
    import random
    
    print("Single run", flush=True)
    
    return socket.gethostname(), random.randint(0, 100)

...

ComputeTask(
            function=single_function,
            task_backend_specific_kwargs={"process_template": {}},
        )

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions