I re-discovered Ray after starting to write a functional wrapper for multiprocessing’s pool which turns function arguments into shared memory references using python’s inspect module. One thing I would like to have is to efficiently submit functions to a pool in a way that does not modify or wrap around a function’s def
definition, but rather ad-hoc without affecting other uses of the same original function definition. So that the same function is used in someplaces with Ray, and in others without Ray, within my codebase.
As I understand Ray’s code for its remote
decorator, this decorator cannot be applied other than to a function def
. Is there nonetheless a way?