From 6247e95dc31ca83b74857b620b3376f930ba9e0e Mon Sep 17 00:00:00 2001 From: ManyTheFish Date: Tue, 23 Apr 2024 17:42:20 +0200 Subject: [PATCH] Add benchmark for embeddings --- workloads/movies-subset-hf-embeddings.json | 68 ++++++++++++++++++++ workloads/settings-add-embeddings.json | 72 ++++++++++++++++++++++ 2 files changed, 140 insertions(+) create mode 100644 workloads/movies-subset-hf-embeddings.json create mode 100644 workloads/settings-add-embeddings.json diff --git a/workloads/movies-subset-hf-embeddings.json b/workloads/movies-subset-hf-embeddings.json new file mode 100644 index 000000000..d24bc752c --- /dev/null +++ b/workloads/movies-subset-hf-embeddings.json @@ -0,0 +1,68 @@ +{ + "name": "movies-subset-hf-embeddings", + "run_count": 5, + "extra_cli_args": [ + "--max-indexing-threads=4" + ], + "assets": { + "movies-100.json": { + "local_location": null, + "remote_location": "https://milli-benchmarks.fra1.digitaloceanspaces.com/bench/datasets/movies-100.json", + "sha256": "d215e395e4240f12f03b8f1f68901eac82d9e7ded5b462cbf4a6b8efde76c6c6" + } + }, + "commands": [ + { + "route": "experimental-features", + "method": "PATCH", + "body": { + "inline": { + "vectorStore": true + } + }, + "synchronous": "DontWait" + }, + { + "route": "indexes/movies/settings", + "method": "PATCH", + "body": { + "inline": { + "searchableAttributes": [ + "title", + "overview" + ], + "filterableAttributes": [ + "genres", + "release_date" + ], + "sortableAttributes": [ + "release_date" + ] + } + }, + "synchronous": "WaitForTask" + }, + { + "route": "indexes/movies/settings", + "method": "PATCH", + "body": { + "inline": { + "embedders": { + "default": { + "source": "huggingFace" + } + } + } + }, + "synchronous": "WaitForTask" + }, + { + "route": "indexes/movies/documents", + "method": "POST", + "body": { + "asset": "movies-100.json" + }, + "synchronous": "WaitForTask" + } + ] +} \ No newline at end of file diff --git a/workloads/settings-add-embeddings.json b/workloads/settings-add-embeddings.json new file mode 100644 index 000000000..f87286943 --- /dev/null +++ b/workloads/settings-add-embeddings.json @@ -0,0 +1,72 @@ +{ + "name": "settings-add-embeddings-hf", + "run_count": 5, + "extra_cli_args": [ + "--max-indexing-threads=4" + ], + "assets": { + "movies-100.json": { + "local_location": null, + "remote_location": "https://milli-benchmarks.fra1.digitaloceanspaces.com/bench/datasets/movies-100.json", + "sha256": "d215e395e4240f12f03b8f1f68901eac82d9e7ded5b462cbf4a6b8efde76c6c6" + } + }, + "commands": [ + { + "route": "experimental-features", + "method": "PATCH", + "body": { + "inline": { + "vectorStore": true + } + }, + "synchronous": "DontWait" + }, + { + "route": "indexes/movies/settings", + "method": "PATCH", + "body": { + "inline": { + "searchableAttributes": [ + "title", + "overview" + ], + "filterableAttributes": [ + "genres", + "release_date" + ], + "sortableAttributes": [ + "release_date" + ] + } + }, + "synchronous": "DontWait" + }, + { + "route": "indexes/movies/documents", + "method": "POST", + "body": { + "asset": "movies-100.json" + }, + "synchronous": "WaitForTask" + }, + { + "route": "indexes/movies/settings", + "method": "PATCH", + "body": { + "inline": { + "embedders": { + "default": { + "source": "huggingFace", + "model": null, + "revision": null, + "documentTemplate": null, + "distribution": null + } + } + } + }, + "synchronous": "WaitForTask" + } + ] +} \ No newline at end of file