| 1 |
""" |
| 2 |
In the distributed computing setting, this file plays the role of a "local |
| 3 |
development" file, e.g. a file that is importable locally, but unimportable in |
| 4 |
remote workers. Constructs defined in this file and usually pickled by |
| 5 |
reference should instead flagged to cloudpickle for pickling by value: this is |
| 6 |
done using the register_pickle_by_value api exposed by cloudpickle. |
| 7 |
""" |
| 8 |
|
| 9 |
import typing |
| 10 |
|
| 11 |
|
| 12 |
def local_function(): |
| 13 |
return "hello from a function importable locally!" |
| 14 |
|
| 15 |
|
| 16 |
class LocalClass: |
| 17 |
def method(self): |
| 18 |
return "hello from a class importable locally" |
| 19 |
|
| 20 |
|
| 21 |
LocalT = typing.TypeVar("LocalT") |