Skip to content

Imported object's method cannot be run properly when submited to dask client #4233

@jiangtianli91

Description

@jiangtianli91

What happened:

When I import an class and submit its method to client, it does not run properly. It runs fine if the class is defined in the same script.

I also checked cloudpickle. Cloudpickle can successfully pickle the object.

>>> print(xor_net.print_name())
[<src.network.Group object at 0x7fbd28da0610>, <src.network.Group object at 0x7fbd28da05e0>, <src.network.Group object at 0x7fbd28da0580>]
>>> print(client.submit(xor_net.print_name).result())
[]

Minimal Complete Verifiable Example:

In this repo

Anything else we need to know?:

Environment:

  • Dask version: dask 2.30.0
  • Python version: python 3.8.5
  • Operating System: Mac os
  • Install method (conda, pip, source): conda

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