mirror of
https://github.com/wassname/ray.git
synced 2026-06-28 04:23:03 +08:00
Increase TaskID size by 2 bytes, taken from JobID (#6425)
* Increase TaskID size by 2 bytes, taken from JobID * comments * check max job id * fix doc * fix local mode
This commit is contained in:
@@ -288,6 +288,7 @@ cdef class JobID(BaseID):
|
||||
|
||||
@classmethod
|
||||
def from_int(cls, value):
|
||||
assert value < 65536, "Maximum JobID integer is 65535."
|
||||
return cls(CJobID.FromInt(value).Binary())
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -1111,9 +1111,8 @@ def connect(node,
|
||||
if setproctitle:
|
||||
setproctitle.setproctitle("ray::IDLE")
|
||||
elif mode is LOCAL_MODE:
|
||||
# Code path of local mode
|
||||
if job_id is None:
|
||||
job_id = JobID.from_int(random.randint(1, 100000))
|
||||
job_id = JobID.from_int(random.randint(1, 65535))
|
||||
worker.worker_id = ray.utils.compute_driver_id_from_job(
|
||||
job_id).binary()
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user