mirror of
https://github.com/wassname/ray.git
synced 2026-07-03 19:14:37 +08:00
Fix streaming ci failure (#12830)
This commit is contained in:
@@ -385,7 +385,7 @@ cdef c_vector[CObjectID] bytes_list_to_qid_vec(list py_queue_ids) except *:
|
||||
c_string q_id_data
|
||||
for q_id in py_queue_ids:
|
||||
q_id_data = q_id
|
||||
assert q_id_data.size() == CObjectID.Size()
|
||||
assert q_id_data.size() == CObjectID.Size(), f"{q_id_data.size()}, {CObjectID.Size()}"
|
||||
obj_id = CObjectID.FromBinary(q_id_data)
|
||||
queue_id_vec.push_back(obj_id)
|
||||
return queue_id_vec
|
||||
|
||||
@@ -14,7 +14,7 @@ from ray._raylet import JavaFunctionDescriptor
|
||||
from ray._raylet import PythonFunctionDescriptor
|
||||
from ray._raylet import Language
|
||||
|
||||
CHANNEL_ID_LEN = 20
|
||||
CHANNEL_ID_LEN = ray.ObjectID.nil().size()
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -58,8 +58,8 @@ class ChannelID:
|
||||
|
||||
@staticmethod
|
||||
def gen_id(from_index, to_index, ts):
|
||||
"""Generate channel id, which is 20 character"""
|
||||
channel_id = bytearray(20)
|
||||
"""Generate channel id, which is `CHANNEL_ID_LEN` character"""
|
||||
channel_id = bytearray(CHANNEL_ID_LEN)
|
||||
for i in range(11, 7, -1):
|
||||
channel_id[i] = ts & 0xff
|
||||
ts >>= 8
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import json
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
import ray
|
||||
from ray.streaming import StreamingContext
|
||||
@@ -31,12 +29,8 @@ def test_hybrid_stream():
|
||||
"../../../bazel-bin/streaming/java/all_streaming_tests_deploy.jar")
|
||||
jar_path = os.path.abspath(jar_path)
|
||||
print("jar_path", jar_path)
|
||||
java_worker_options = json.dumps(["-classpath", jar_path])
|
||||
print("java_worker_options", java_worker_options)
|
||||
assert not ray.is_initialized()
|
||||
ray.init(
|
||||
job_config=ray.job_config.JobConfig(code_search_path=sys.path),
|
||||
_java_worker_options=java_worker_options)
|
||||
ray.init(job_config=ray.job_config.JobConfig(code_search_path=[jar_path]))
|
||||
|
||||
sink_file = "/tmp/ray_streaming_test_hybrid_stream.txt"
|
||||
if os.path.exists(sink_file):
|
||||
|
||||
Reference in New Issue
Block a user