You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cloudpickle's ability to serialize instantiated classes and their member functions is a huge advantage over cloudpickle alternatives. Unfortunately, this feature seems limited heavily to the check for instantiated_class.__module__ == '__main__'.
One hacky solution is to set __module__ in the class definition:
class SomeFunClass(object):
__module__ = '__main__'
# Rest of the class definition
But this could cause problems with any code that relies on a proper value for __module__. Is there another solution I'm not seeing?