-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathkamiak_tflogs.sh
More file actions
executable file
·29 lines (25 loc) · 1012 Bytes
/
kamiak_tflogs.sh
File metadata and controls
executable file
·29 lines (25 loc) · 1012 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
#
# Download the TF logs every once in a while to keep TensorBoard updated
# Then run: tensorboard --logdir logs/
#
. kamiak_config.sh
# Note both have trailing slashes
from="$remotessh:$remotedir"
to="$localdir"
# Optionally pass in which suffix to sync. Useful if there's a lot of log
# folders you don't want to download.
[[ ! -e $1 ]] && suffix="-$1" || suffix=""
# Also, for further matching, allow custom folder matches. The folders are in
# the format <dataset>-<uid>-<method>-<debugnum>.
[[ ! -e $2 ]] && folder="$2" || folder=""
# TensorFlow logs
while true; do
# --inplace so we don't get "file created after file even though it's
# lexicographically earlier" in TensorBoard, which basically makes it
# never update without restarting TensorBoard
rsync -Pahuv --inplace \
--include="$logFolder$suffix*/" --include="$logFolder$suffix*/$folder*" --include="$logFolder$suffix*/$folder*/*" \
--exclude="*" --exclude="*/" "$from" "$to"
sleep 30
done