forked from bellwether/minerva
enhancing CLI usage of starting a cluster
This commit is contained in:
parent
fe06b6b808
commit
902302c9df
2 changed files with 4 additions and 3 deletions
|
|
@ -52,10 +52,10 @@ try:
|
|||
print(dp.count().compute())
|
||||
|
||||
with Timing("mean latitude"):
|
||||
print(dp.map_partitions(lambda p: p.groupby(p.index).latitude.mean()).compute())
|
||||
print(dp.groupby(dp.index).latitude.mean().compute())
|
||||
|
||||
with Timing("mean longitude"):
|
||||
print(dp.map_partitions(lambda p: p.groupby(p.index).longitude.mean()).compute())
|
||||
print(dp.groupby(dp.index).longitude.mean().compute())
|
||||
|
||||
finally:
|
||||
########## FIN #######################
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import sys
|
||||
import minerva
|
||||
from minerva.pier import Pier
|
||||
|
||||
|
|
@ -32,7 +33,7 @@ pier = m.pier(subnet_id = "subnet-05eb26d8649a093e1", # project-subnet-public
|
|||
key_pair = ("Ari-Brown-HAY", "~/.ssh/Ari-Brown-HAY.pem"),
|
||||
iam = "Minerva")
|
||||
|
||||
cluster = pier.cluster(scheduler, worker, num_workers=5)
|
||||
cluster = pier.cluster(scheduler, worker, num_workers=sys.argv[1])
|
||||
cluster.start()
|
||||
print(cluster.public_location)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue