Get a global function on workers. Parameters ---------- name : str The name of the global function. Returns ------- func : DRef The global packed function
(self, name: str)
| 176 | return _ffi_api.SessionGetNumWorkers(self) # type: ignore # pylint: disable=no-member |
| 177 | |
| 178 | def get_global_func(self, name: str) -> DRef: |
| 179 | """Get a global function on workers. |
| 180 | |
| 181 | Parameters |
| 182 | ---------- |
| 183 | name : str |
| 184 | The name of the global function. |
| 185 | |
| 186 | Returns |
| 187 | ------- |
| 188 | func : DRef |
| 189 | The global packed function |
| 190 | """ |
| 191 | return DPackedFunc(_ffi_api.SessionGetGlobalFunc(self, name), self) # type: ignore # pylint: disable=no-member |
| 192 | |
| 193 | def import_python_module(self, module_name: str) -> None: |
| 194 | """Import a python module in each worker |