-
Notifications
You must be signed in to change notification settings - Fork 5
/
update_stability.sh
executable file
·54 lines (43 loc) · 1.43 KB
/
update_stability.sh
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
set -e
############################################
############# To test locally ##############
# export WEAVIATE_VERSION="1.26.1"
# export PERSISTENCE_LSM_ACCESS_STRATEGY="mmap"
# export PROMETHEUS_MONITORING_ENABLED="true"
# DISTANCE="cosine"
# INDEX_TYPE="hnsw"
# UPDATE_PERCENTAGE="0.08"
# CLEANUP_INTERVAL_SECONDS="30"
# UPDATE_ITERATIONS="10"
# REQUIRED_RECALL="0.992"
############################################
dataset=${DATASET:-"dbpedia-100k-openai-ada002-angular"}
export COMPOSE="apps/weaviate-no-restart-on-crash/docker-compose.yml"
echo "Starting Weaviate..."
docker compose -f $COMPOSE up -d
echo "Run benchmark script"
mkdir -p datasets
(
cd datasets;
if [ -f ${dataset}.hdf5 ]
then
echo "Datasets exists locally"
else
echo "Downloading dataset"
curl -LO https://storage.googleapis.com/ann-datasets/custom/${dataset}.hdf5
fi
)
docker run --network host -t -v "$PWD/results:/app/results" -v "$PWD/datasets:/app/datasets" \
-e "DATASET=$dataset" \
-e "DISTANCE=$DISTANCE" \
-e "INDEX_TYPE=$INDEX_TYPE" \
-e "UPDATE_PERCENTAGE=$UPDATE_PERCENTAGE" \
-e "CLEANUP_INTERVAL_SECONDS=$CLEANUP_INTERVAL_SECONDS" \
-e "UPDATE_ITERATIONS=$UPDATE_ITERATIONS" \
-e "REQUIRED_RECALL=$REQUIRED_RECALL" \
-e "WEAVIATE_URL=localhost" \
semitechnologies/weaviate-benchmarker:v2.0.0 /app/scripts/shell/update_stability.sh
echo "Stopping Weaviate..."
docker compose -f $COMPOSE down
echo "Passed!"