Ejemplo n.º 1
0
 def init_writer(self, output_channel, reader_actor):
     conf = {
         Config.TASK_JOB_ID: ray.worker.global_worker.current_job_id,
         Config.CHANNEL_TYPE: Config.NATIVE_CHANNEL
     }
     self.writer = transfer.DataWriter([output_channel],
                                       [pickle.loads(reader_actor)], conf)
     self.output_channel_id = transfer.ChannelID(output_channel)
Ejemplo n.º 2
0
 def init_writer(self, output_channel, reader_actor):
     conf = {
         Config.TASK_JOB_ID:
         ray.runtime_context._get_runtime_context().current_driver_id,
         Config.CHANNEL_TYPE: Config.NATIVE_CHANNEL
     }
     self.writer = transfer.DataWriter([output_channel],
                                       [pickle.loads(reader_actor)], conf)
     self.output_channel_id = transfer.ChannelID(output_channel)
Ejemplo n.º 3
0
 def init_writer(self, output_channel, reader_actor):
     conf = {Config.CHANNEL_TYPE: Config.NATIVE_CHANNEL}
     reader_async_func = PythonFunctionDescriptor(
         __name__, self.on_reader_message.__name__, self.__class__.__name__)
     reader_sync_func = PythonFunctionDescriptor(
         __name__, self.on_reader_message_sync.__name__,
         self.__class__.__name__)
     transfer.ChannelCreationParametersBuilder.set_python_reader_function_descriptor(
         reader_async_func, reader_sync_func)
     self.writer = transfer.DataWriter([output_channel],
                                       [pickle.loads(reader_actor)], conf)
     self.output_channel_id = transfer.ChannelID(output_channel)