mirror of
https://github.com/wassname/ray.git
synced 2026-07-18 12:40:56 +08:00
Migrate Python C extension to Cython (#3541)
This commit is contained in:
+3
-4
@@ -15,7 +15,6 @@ import time
|
||||
import uuid
|
||||
|
||||
import ray.gcs_utils
|
||||
import ray.raylet
|
||||
import ray.ray_constants as ray_constants
|
||||
|
||||
|
||||
@@ -67,7 +66,7 @@ def push_error_to_driver(worker,
|
||||
will be serialized with json and stored in Redis.
|
||||
"""
|
||||
if driver_id is None:
|
||||
driver_id = ray.ObjectID.nil_id()
|
||||
driver_id = ray.DriverID.nil()
|
||||
data = {} if data is None else data
|
||||
worker.raylet_client.push_error(driver_id, error_type, message,
|
||||
time.time())
|
||||
@@ -96,7 +95,7 @@ def push_error_to_driver_through_redis(redis_client,
|
||||
will be serialized with json and stored in Redis.
|
||||
"""
|
||||
if driver_id is None:
|
||||
driver_id = ray.ObjectID.nil_id()
|
||||
driver_id = ray.DriverID.nil()
|
||||
data = {} if data is None else data
|
||||
# Do everything in Python and through the Python Redis client instead
|
||||
# of through the raylet.
|
||||
@@ -105,7 +104,7 @@ def push_error_to_driver_through_redis(redis_client,
|
||||
redis_client.execute_command("RAY.TABLE_APPEND",
|
||||
ray.gcs_utils.TablePrefix.ERROR_INFO,
|
||||
ray.gcs_utils.TablePubsub.ERROR_INFO,
|
||||
driver_id.id(), error_data)
|
||||
driver_id.binary(), error_data)
|
||||
|
||||
|
||||
def is_cython(obj):
|
||||
|
||||
Reference in New Issue
Block a user