update api for start_ray_local (#174)

This commit is contained in:
Robert Nishihara
2016-06-27 11:57:22 -07:00
committed by Philipp Moritz
parent 902cac3089
commit fb6c74ecab
10 changed files with 76 additions and 71 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ epochs = 100
worker_dir = os.path.dirname(os.path.abspath(__file__))
worker_path = os.path.join(worker_dir, "worker.py")
services.start_singlenode_cluster(return_drivers=False, num_objstores=1, num_workers_per_objstore=num_workers, worker_path=worker_path)
services.start_ray_local(num_workers=num_workers, worker_path=worker_path)
best_params = None
best_accuracy = 0
+1 -1
View File
@@ -16,7 +16,7 @@ parser.add_argument("--drop-ipython", default=False, type=bool, help="Drop into
if __name__ == "__main__":
args = parser.parse_args()
worker_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "worker.py")
services.start_singlenode_cluster(return_drivers=False, num_workers_per_objstore=5, worker_path=worker_path)
services.start_ray_local(num_workers=5, worker_path=worker_path)
s3 = boto3.resource("s3")
imagenet_bucket = s3.Bucket(args.s3_bucket)
+1 -1
View File
@@ -20,7 +20,7 @@ batches = [mnist.train.next_batch(batch_size) for _ in range(num_batches)]
if __name__ == "__main__":
worker_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "worker.py")
services.start_singlenode_cluster(return_drivers=False, num_workers_per_objstore=16, worker_path=worker_path)
services.start_ray_local(num_workers=16, worker_path=worker_path)
x_batches = [ray.put(batches[i][0]) for i in range(num_batches)]
y_batches = [ray.put(batches[i][1]) for i in range(num_batches)]
+1 -1
View File
@@ -12,7 +12,7 @@ import functions
worker_dir = os.path.dirname(os.path.abspath(__file__))
worker_path = os.path.join(worker_dir, "worker.py")
services.start_singlenode_cluster(return_drivers=False, num_objstores=1, num_workers_per_objstore=10, worker_path=worker_path)
services.start_ray_local(num_workers=10, worker_path=worker_path)
# hyperparameters
H = 200 # number of hidden layer neurons