Open DrJohnDale opened 1 year ago
cc @jjyao FYI
this is highly likely cloudpickle doesn't play well with the dataclass. You may need to define your own serializer https://docs.ray.io/en/master/ray-core/objects/serialization.html#customized-serialization
What happened + What you expected to happen
I run multi processing where I pass a dataclass with a child dataclass which are defined in a separate module to the main function. If I change any of the values in the child dataclass these are not passed to the processes. If the dataclasses are defined in the same module as the main function then it works correctly.
A work around is to have the parent class as a standard python class and then it also works correctly
Versions / Dependencies
Ray 2.3.1
Reproduction script
data_class.py
separate_files.py
running above gives incorrect output
single_file.py
works as expected and gives output
Issue Severity
Medium: It is a significant difficulty but I can work around it.