Changes:增加了自动生成修改数据变csv的格式

This commit is contained in:
2022-05-17 16:50:49 +08:00
parent 48d5786b53
commit dbd5240a1a
7 changed files with 45 additions and 16 deletions

18
ray_example.py Normal file
View File

@@ -0,0 +1,18 @@
import ray
ray.init()
@ray.remote
class Counter(object):
def __init__(self):
self.n = 0
def increment(self):
self.n += 1
def read(self):
return self.n
counters = [Counter.remote() for i in range(4)]
[c.increment.remote() for c in counters]
futures = [c.read.remote() for c in counters]
print(ray.get(futures))