wut worker train scripts

master
ml server 2020-01-28 17:36:24 -07:00
parent 6f3b4daab4
commit 05715d19b5
2 changed files with 8 additions and 5 deletions

View File

@ -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
})

View File

@ -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