Skip to content

Are there any methods to serialize a function that call function from other Python module file #571

@kira42310

Description

@kira42310

Currently, I am developing a extension of the workflow system that going to send and submit the function to execute on clusters.

The register_pickle_by_value function is not going to work for me because I don't know which are user module files and which are on the Python path.

The problem is after serialize and send the serialize file to run on the remote server(It has NFS, but don't have the same absolute path and I need to run on the other directory) It cannot find the ext module.

Any suggestion?

Example
main.py

from ext import add

def compute( a, b ):
    return add( a, b )

ext.py

def add( a, b ):
    return a + b

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