- Low: It annoys or frustrates me for a moment
Hi, I’m using ray actors to run my tasks in parallel. I have a task need to be repeatedly run multiple times. I want a more informative process name in htop
so I can monitor the task step without looking into the long stdout
output.
@ray.remote
class Trainer:
def __init__(self, player, iteration, config):
self.player = player
self.iteration = iteration
self.name = f'{player}_{iteration:03d}'
self.config = config
def result(self):
analysis = ray.tune.run('PPO', config)
return analysis
resultA, resultB = None, None
for i in range(1, 21):
# update config
configA, configB = ...
actorA = Trainer.remote('PlayerA', i, config)
actorB = Trainer.remote('PlayerB', i, config)
resultA, resultB = ray.get([actorA.result(), actorB.result()])
I got ray:Trainer.__init__()
and ray:Trainer.result()
in htop
. The actor process name is ray:<class name>.<method name>()
. I expect a process name with ray:PlayerA_003.result()
or something similar.
Is it possible to customize the actor process name?