mirror of
https://github.com/wassname/ray.git
synced 2026-09-09 11:32:43 +08:00
update api for start_ray_local (#174)
This commit is contained in:
committed by
Philipp Moritz
parent
902cac3089
commit
fb6c74ecab
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)]
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user