initial linalg commit

This commit is contained in:
Robert Nishihara
2016-03-12 15:25:45 -08:00
parent dc660e945f
commit 4afa373a3a
12 changed files with 294 additions and 16 deletions
+15
View File
@@ -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)