mirror of
https://github.com/wassname/ray.git
synced 2026-08-12 12:20:11 +08:00
initial linalg commit
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
import argparse
|
||||
|
||||
import orchpy
|
||||
import orchpy.services as services
|
||||
import orchpy.worker as worker
|
||||
|
||||
import arrays.single as single
|
||||
# import arrays.dist as dist
|
||||
|
||||
from grpc.beta import implementations
|
||||
import orchestra_pb2
|
||||
import types_pb2
|
||||
@@ -14,6 +18,17 @@ parser.add_argument("--scheduler-address", default="127.0.0.1:10001", type=str,
|
||||
parser.add_argument("--objstore-address", default="127.0.0.1:20001", type=str, help="the objstore's address")
|
||||
parser.add_argument("--worker-address", default="127.0.0.1:40001", type=str, help="the worker's address")
|
||||
|
||||
@orchpy.distributed([str], [str])
|
||||
def print_string(string):
|
||||
print "called print_string with", string
|
||||
f = open("asdfasdf.txt", "w")
|
||||
f.write("successfully called print_string with argument {}.".format(string))
|
||||
return string
|
||||
|
||||
@orchpy.distributed([int, int], [int, int])
|
||||
def handle_int(a, b):
|
||||
return a + 1, b + 1
|
||||
|
||||
def connect_to_scheduler(host, port):
|
||||
channel = implementations.insecure_channel(host, port)
|
||||
return orchestra_pb2.beta_create_Scheduler_stub(channel)
|
||||
|
||||
Reference in New Issue
Block a user