Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing from a plugin to a standalone CLI application #68

Open
wants to merge 38 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
3fb1add
Working on standalone implementation.
jzonthemtn Dec 17, 2024
17dcece
Working on standalone implementation.
jzonthemtn Dec 17, 2024
f1048fb
Working on standalone implementation.
jzonthemtn Dec 17, 2024
e937df1
Working on standalone implementation.
jzonthemtn Dec 17, 2024
871a9bf
Working on standalone implementation.
jzonthemtn Dec 17, 2024
bdcf6c5
Working on converting to a standalone app.
jzonthemtn Dec 30, 2024
504e3f9
Working on converting to a standalone app.
jzonthemtn Dec 30, 2024
75a7641
Working on converting to a standalone app.
jzonthemtn Dec 30, 2024
aa26e3b
Working on converting to a standalone app.
jzonthemtn Dec 30, 2024
6c4b241
Working on converting to a standalone app.
jzonthemtn Dec 31, 2024
9ee0b9b
Working on converting to a standalone app.
jzonthemtn Dec 31, 2024
83633bc
Working on converting to a standalone app.
jzonthemtn Dec 31, 2024
7a2d577
Working on converting to a standalone app.
jzonthemtn Dec 31, 2024
2899bcf
Working on converting to a standalone app.
jzonthemtn Jan 1, 2025
5b7888b
Working on converting to a standalone app.
jzonthemtn Jan 1, 2025
41aa00f
Working on converting to a standalone app.
jzonthemtn Jan 1, 2025
b5d34cf
Adding running of query set to CLI.
jzonthemtn Jan 1, 2025
a1ad39d
Wiring up CLI options.
jzonthemtn Jan 1, 2025
bd2ffb3
Replacing strings.
jzonthemtn Jan 1, 2025
eb8bb37
Moving the app into the root directory.
jzonthemtn Jan 2, 2025
b2ca178
Moving scripts.
jzonthemtn Jan 2, 2025
873449b
Updating github action.
jzonthemtn Jan 2, 2025
71678d3
Updating github action.
jzonthemtn Jan 2, 2025
d17d116
Updating github action.
jzonthemtn Jan 2, 2025
640b0ad
Updating paths.
jzonthemtn Jan 2, 2025
b0689d7
Wiring up more of the query set runner.
jzonthemtn Jan 16, 2025
66fa252
Changing to generic client for the user query running.
jzonthemtn Jan 17, 2025
b9ed325
Updating comment.
jzonthemtn Jan 17, 2025
3bc2065
Adding script to make a search pipeline.
jzonthemtn Jan 17, 2025
a05d3fb
Merge branch 'main' into standalone
jzonthemtn Jan 20, 2025
f76c5f9
Parameterizing the opensearch host.
jzonthemtn Jan 20, 2025
b58b3fe
Updating pipeline name.
jzonthemtn Jan 21, 2025
bfb6b7f
Fixing query size with >=.
jzonthemtn Jan 21, 2025
e154262
Adding userId to UbiEvent.
jzonthemtn Jan 21, 2025
5a2cb16
Persisting the query run results.
jzonthemtn Jan 21, 2025
fbb87c4
Removing unneeded class. Removing plugin implementation.
jzonthemtn Jan 21, 2025
b9396d4
Removing unneeded docker files.
jzonthemtn Jan 21, 2025
52c620c
Updates for hybrid query.
jzonthemtn Jan 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,16 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
jdk: [ 11, 17, 21 ]
jdk: [ 21 ]
experimental: [false]
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v4
with:
distribution: temurin
distribution: adopt
java-version: ${{ matrix.jdk }}
cache: gradle
- name: Assemble target plugin
uses: gradle/gradle-build-action@v3
with:
cache-disabled: true
arguments: -Dtests.security.manager=false assemble
- name: Build
run: mvn --batch-mode test
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,17 @@ gradle-app.setting
.project
.classpath

# Ignore Gradle project-specific cache directory
.gradle

# Ignore Gradle build output directory
build

# intellij files
.idea/
*.iml
*.ipr
*.iws
build-idea/
out/

3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM opensearchproject/opensearch:2.18.0

RUN /usr/share/opensearch/bin/opensearch-plugin install --batch https://github.com/opensearch-project/user-behavior-insights/releases/download/2.18.0.2/opensearch-ubi-2.18.0.2.zip
File renamed without changes.
63 changes: 5 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,64 +1,11 @@
# Search Evaluation Framework
# OpenSearch Evaluation Framework

This repository contains the search quality evaluation framework as described in the [RFC](https://github.com/opensearch-project/OpenSearch/issues/15354).
This is an application to perform search evaluation.

Note: Some of the data files in this repository are tracked by `git lfs`.
## Building

## Repository Contents

* `data` - The data directory contains scripts for creating random UBI queries and events for purposes of development and testing.
* `opensearch-search-quality-evaluation-plugin` - An OpenSearch plugin that extends the OpenSearch Scheduler plugin that provides the ability to generate scheduled (and on-demand) implicit judgments from UBI data.
* `opensearch-search-quality-implicit-judgments` - A standalone Java application to generate implicit judgments from indexed UBI data.

## OpenSearch Search Quality Evaluation Plugin

This is an OpenSearch plugin that extends the OpenSearch Scheduler plugin that provides the ability to generate scheduled (and on-demand) implicit judgments from UBI data.

To use the plugin:

```
./gradlew build
cd opensearch-search-quality-evaluation-plugin
docker compose build
docker compose up
```

To create a schedule to generate implicit judgments:
Build the project from the top-level directory to build all projects.

```
curl -s -X POST "http://localhost:9200/_plugins/search_quality_eval/schedule?id=1&click_model=coec&job_name=test&interval=60" | jq
```

See the created job:

```
curl -s http://localhost:9200/search_quality_eval_scheduled_jobs/_search | jq
```

To run an on-demand job without scheduling:

mvn clean install
```
curl -X POST "http://localhost:9200/_plugins/search_quality_eval/judgments?click_model=coec&max_rank=20" | jq
```

To see the job runs:

```
curl -X POST "http://localhost:9200/search_quality_eval_completed_jobs/_search" | jq
```

See the first 10 judgments:

```
curl -s http://localhost:9200/judgments/_search | jq
```

## OpenSearch Search Quality Implicit Judgments

This is a standalone Java application to generate implicit judgments from indexed UBI data. It runs outside OpenSearch and queries the UBI indexes to get the data for calculating the implicit judgments.

To run it, run the `org.opensearch.eval.App` class. This will connect to OpenSearch running on `localhost:9200`. It expects the `ubi_events` and `ubi_queries` indexes to exist and be populated.

## License

This code is licensed under the Apache 2.0 License. See [LICENSE.txt](LICENSE.txt).
4 changes: 0 additions & 4 deletions build.gradle

This file was deleted.

7 changes: 0 additions & 7 deletions create-index.sh

This file was deleted.

2 changes: 1 addition & 1 deletion data/esci/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ echo "Initializing UBI..."
curl -s -X POST "http://localhost:9200/_plugins/ubi/initialize"

echo "Indexing queries and events..."
curl -s -T "http://localhost:9200/_bulk?pretty" -H "Content-Type: application/x-ndjson" --data-binary @ubi_queries_events.ndjson
curl -X POST 'http://localhost:9200/index-name/_bulk?pretty' --data-binary @ubi_queries_events.ndjson -H "Content-Type: application/x-ndjson"
wrigleyDan marked this conversation as resolved.
Show resolved Hide resolved
47 changes: 47 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
services:

opensearch_sef:
build: .
container_name: opensearch_sef
environment:
discovery.type: single-node
node.name: opensearch
plugins.security.disabled: "true"
logger.level: debug
OPENSEARCH_INITIAL_ADMIN_PASSWORD: SuperSecretPassword_123
http.max_content_length: 500mb
OPENSEARCH_JAVA_OPTS: "-Xms16g -Xmx16g"
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
ports:
- "9200:9200"
- "9600:9600"
networks:
- opensearch-net
volumes:
- opensearch-data1:/usr/share/opensearch/data

opensearch_sef_dashboards:
image: opensearchproject/opensearch-dashboards:2.18.0
container_name: opensearch_sef_dashboards
ports:
- "5601:5601"
environment:
OPENSEARCH_HOSTS: '["http://opensearch_sef:9200"]'
DISABLE_SECURITY_DASHBOARDS_PLUGIN: "true"
depends_on:
- opensearch_sef
networks:
- opensearch-net

volumes:
opensearch-data1:

networks:
opensearch-net:
driver: bridge
45 changes: 0 additions & 45 deletions events-mapping.json

This file was deleted.

12 changes: 0 additions & 12 deletions gradle/libs.versions.toml

This file was deleted.

Binary file removed gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 0 additions & 7 deletions gradle/wrapper/gradle-wrapper.properties

This file was deleted.

Loading
Loading