-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathimage.pipe.sh
More file actions
31 lines (24 loc) · 970 Bytes
/
image.pipe.sh
File metadata and controls
31 lines (24 loc) · 970 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
30
31
#!/bin/bash
CONFIG="./config/fashion.yml"
TIMES_FILE="times.txt"
set -e
echo "" > $TIMES_FILE
function timeit() {
CMD="$1"
LABEL="$2"
START=$(date +%s)
eval "$CMD"
END=$(date +%s)
ELAPSED=$((END - START))
echo "$LABEL: $ELAPSED seconds" >> $TIMES_FILE
}
timeit "uv run manage.py clean-logs" "clean-logs"
timeit "uv run manage.py encoder train --config $CONFIG" "encoder train"
timeit "uv run manage.py get-embeddings --config $CONFIG" "get-embeddings"
timeit "uv run manage.py encoder test --config $CONFIG --n 100" "encoder test"
timeit "uv run manage.py classifier train --config $CONFIG" "classifier train"
timeit "uv run manage.py classifier test --config $CONFIG" "classifier test"
timeit "uv run manage.py get-bestparams --config $CONFIG" "get-bestparams"
CONFIG="${CONFIG/.yml/.best.yml}"
timeit "uv run manage.py plot --config $CONFIG" "plot"
timeit "uv run manage.py create-memories --config $CONFIG --n 100" "create-memories"