mirror of
https://github.com/wassname/ray.git
synced 2026-07-06 05:16:30 +08:00
use numpy in long-running tests (#6448)
This commit is contained in:
@@ -6,6 +6,8 @@ from __future__ import print_function
|
||||
|
||||
import time
|
||||
|
||||
import numpy as np
|
||||
|
||||
import ray
|
||||
from ray.cluster_utils import Cluster
|
||||
|
||||
@@ -43,6 +45,7 @@ class Actor(object):
|
||||
|
||||
def method(self):
|
||||
self.value += 1
|
||||
return np.zeros(1024, dtype=np.uint8)
|
||||
|
||||
|
||||
actors = [
|
||||
|
||||
@@ -6,6 +6,8 @@ from __future__ import print_function
|
||||
|
||||
import time
|
||||
|
||||
import numpy as np
|
||||
|
||||
import ray
|
||||
from ray.cluster_utils import Cluster
|
||||
|
||||
@@ -38,7 +40,7 @@ ray.init(address=cluster.address)
|
||||
|
||||
@ray.remote
|
||||
def f(*xs):
|
||||
return 1
|
||||
return np.zeros(1024, dtype=np.uint8)
|
||||
|
||||
|
||||
iteration = 0
|
||||
|
||||
Reference in New Issue
Block a user