9bfc2c4b5462871f0fe669b3aabc5f2772bc3a6f,python/ray/worker.py,,connect,#Any#Any#Any#Any#Any#Any#Any#,1089

Before Change


        // TODO(qwang): Rename this to `worker_id_str` or type to `WorkerID`
        worker.worker_id = _random_string()
        setproctitle.setproctitle("ray::IDLE")
    elif mode is LOCAL_MODE:
        if job_id is None:
            job_id = JobID.from_int(random.randint(1, 65535))
        worker.worker_id = ray.utils.compute_driver_id_from_job(
            job_id).binary()
    else:
        // This is the code path of driver mode.
        if job_id is None:
            // TODO(qwang): use `GcsClient::GenerateJobId()` here.

After Change


        worker.worker_id = ray.utils.compute_driver_id_from_job(
            job_id).binary()

    if mode is not SCRIPT_MODE and setproctitle:
        setproctitle.setproctitle("ray::IDLE")

    if not isinstance(job_id, JobID):
        raise TypeError("The type of given job id must be JobID.")

    // All workers start out as non-actors. A worker can be turned into an actor
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: ray-project/ray
Commit Name: 9bfc2c4b5462871f0fe669b3aabc5f2772bc3a6f
Time: 2020-04-01
Author: ian.rodney@gmail.com
File Name: python/ray/worker.py
Class Name:
Method Name: connect


Project Name: chainer/chainercv
Commit Name: f57def37d83e86ec79b9ba16eb2f1977827d0eed
Time: 2017-05-03
Author: Hakuyume@users.noreply.github.com
File Name: tests/visualizations_tests/test_vis_bbox.py
Class Name: TestVisBbox
Method Name: test_vis_bbox


Project Name: keras-team/keras
Commit Name: 403b4fc7a25da5d957b24f1c269103ef6e290bd6
Time: 2016-01-26
Author: udi@benreuven.com
File Name: keras/preprocessing/image.py
Class Name: ImageDataGenerator
Method Name: flow