wut worker train scripts
parent
6f3b4daab4
commit
05715d19b5
|
@ -1,5 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
# coding: utf-8
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# wut-train-cluster-fn.py
|
||||
#
|
||||
|
||||
# In[ ]:
|
||||
|
||||
|
@ -67,10 +69,10 @@ print('tf {}'.format(tf.__version__))
|
|||
|
||||
os.environ["TF_CONFIG"] = json.dumps({
|
||||
"cluster": {
|
||||
"worker": [ "ml0-int:2222", "ml1-int:2222", "ml2-int:2222", "ml3-int:2222", "ml4-int:2222", "ml5-int:2222" ]
|
||||
"worker": ["ml1-int:2222", "ml2-int:2222", "ml3-int:2222", "ml4-int:2222", "ml5-int:2222" ]
|
||||
},
|
||||
"task": {"type": "worker", "index": 0 },
|
||||
"num_workers": 6
|
||||
"num_workers": 5
|
||||
})
|
||||
|
||||
|
||||
|
|
|
@ -17,8 +17,9 @@
|
|||
# so the index is hostname minus one (without alpha).
|
||||
|
||||
HOSTNUM=`hostname | sed -e 's/ml//g'`
|
||||
let HOSTNUM=$HOSTNUM-1
|
||||
|
||||
export TF_CONFIG='{"cluster": {"worker": [ "ml0-int:2222", "ml1-int:2222", "ml2-int:2222", "ml3-int:2222", "ml4-int:2222", "ml5-int:2222"]}, "task": {"index": '$HOSTNUM', "type": "worker"}}'
|
||||
export TF_CONFIG='{"cluster": {"worker": [ "ml1-int:2222", "ml2-int:2222", "ml3-int:2222", "ml4-int:2222", "ml5-int:2222"]}, "task": {"index": '$HOSTNUM', "type": "worker"}}'
|
||||
|
||||
echo $TF_CONFIG
|
||||
python3 wut-train-cluster-fn.py
|
||||
|
|
Loading…
Reference in New Issue