Skip to content

Commit 5cfd425

Browse files
committed
Merge remote-tracking branch 'refs/remotes/origin/dev' into test_zdy_1001
# Conflicts: # src/memos/api/config.py
2 parents 3165a8d + e069928 commit 5cfd425

File tree

131 files changed

+27553
-2561
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+27553
-2561
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ evaluation/.env
1515
!evaluation/configs-example/*.json
1616
evaluation/configs/*
1717
**tree_textual_memory_locomo**
18+
**script.py**
1819
.env
1920
evaluation/scripts/personamem
2021

docker/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,4 +157,4 @@ volcengine-python-sdk==4.0.6
157157
watchfiles==1.1.0
158158
websockets==15.0.1
159159
xlrd==2.0.2
160-
xlsxwriter==3.2.5
160+
xlsxwriter==3.2.5

docs/openapi.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,7 @@
884884
"type": "string",
885885
"title": "Session Id",
886886
"description": "Session ID for the MOS. This is used to distinguish between different dialogue",
887-
"default": "0ce84b9c-0615-4b9d-83dd-fba50537d5d3"
887+
"default": "41bb5e18-252d-4948-918c-07d82aa47086"
888888
},
889889
"chat_model": {
890890
"$ref": "#/components/schemas/LLMConfigFactory",
@@ -939,6 +939,12 @@
939939
"description": "Enable parametric memory for the MemChat",
940940
"default": false
941941
},
942+
"enable_preference_memory": {
943+
"type": "boolean",
944+
"title": "Enable Preference Memory",
945+
"description": "Enable preference memory for the MemChat",
946+
"default": false
947+
},
942948
"enable_mem_scheduler": {
943949
"type": "boolean",
944950
"title": "Enable Mem Scheduler",

evaluation/.env-example

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,30 @@
1+
# memory process model
12
MODEL="gpt-4o-mini"
23
OPENAI_API_KEY="sk-***REDACTED***"
34
OPENAI_BASE_URL="http://***.***.***.***:3000/v1"
45

5-
MEM0_API_KEY="m0-***REDACTED***"
6-
7-
ZEP_API_KEY="z_***REDACTED***"
86

7+
# response model
98
CHAT_MODEL="gpt-4o-mini"
109
CHAT_MODEL_BASE_URL="http://***.***.***.***:3000/v1"
1110
CHAT_MODEL_API_KEY="sk-***REDACTED***"
1211

12+
# memos
13+
MEMOS_KEY="Token mpg-xxxxx"
14+
MEMOS_URL="http://127.0.0.1:8001"
15+
MEMOS_ONLINE_URL="https://memos.memtensor.cn/api/openmem/v1"
16+
17+
# other memory agents
18+
MEM0_API_KEY="m0-xxx"
19+
ZEP_API_KEY="z_xxx"
20+
MEMU_API_KEY="mu_xxx"
21+
SUPERMEMORY_API_KEY="sm_xxx"
22+
MEMOBASE_API_KEY="xxx"
23+
MEMOBASE_PROJECT_URL="http://***.***.***.***:8019"
24+
25+
# eval settings
26+
PRE_SPLIT_CHUNK=false
27+
1328
# Configuration Only For Scheduler
1429
# RabbitMQ Configuration
1530
MEMSCHEDULER_RABBITMQ_HOST_NAME=rabbitmq-cn-***.cn-***.amqp-32.net.mq.amqp.aliyuncs.com

evaluation/README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,14 @@ This repository provides tools and scripts for evaluating the LoCoMo dataset usi
2121

2222
2. Copy the `configs-example/` directory to a new directory named `configs/`, and modify the configuration files inside it as needed. This directory contains model and API-specific settings.
2323

24+
## Setup MemOS
25+
```bash
26+
#start server
27+
uvicorn memos.api.server_api:app --host 0.0.0.0 --port 8001 --workers 8
2428

29+
# modify .env file
30+
MEMOS_URL="http://127.0.0.1:8001"
31+
```
2532
## Evaluation Scripts
2633

2734
### LoCoMo Evaluation
@@ -34,3 +41,31 @@ This repository provides tools and scripts for evaluating the LoCoMo dataset usi
3441
```
3542

3643
✍️ For evaluating OpenAI's native memory feature with the LoCoMo dataset, please refer to the detailed guide: [OpenAI Memory on LoCoMo - Evaluation Guide](./scripts/locomo/openai_memory_locomo_eval_guide.md).
44+
45+
### LongMemEval Evaluation
46+
First prepare the dataset `longmemeval_s` from https://huggingface.co/datasets/xiaowu0162/longmemeval-cleaned
47+
, and save it as `data/longmemeval/longmemeval_s.json`
48+
49+
```bash
50+
# Edit the configuration in ./scripts/run_lme_eval.sh
51+
# Specify the model and memory backend you want to use (e.g., mem0, zep, etc.)
52+
./scripts/run_lme_eval.sh
53+
```
54+
55+
### PrefEval Evaluation
56+
To evaluate the **Prefeval** dataset using one of the supported memory frameworks — `memos`, `mem0`, or `zep` — run the following [script](./scripts/run_prefeval_eval.sh):
57+
58+
```bash
59+
# Edit the configuration in ./scripts/run_prefeval_eval.sh
60+
# Specify the model and memory backend you want to use (e.g., mem0, zep, etc.)
61+
./scripts/run_prefeval_eval.sh
62+
```
63+
64+
### PersonaMem Evaluation
65+
get `questions_32k.csv` and `shared_contexts_32k.jsonl` from https://huggingface.co/datasets/bowen-upenn/PersonaMem and save them at `data/personamem/`
66+
```bash
67+
# Edit the configuration in ./scripts/run_pm_eval.sh
68+
# Specify the model and memory backend you want to use (e.g., mem0, zep, etc.)
69+
# If you want to use MIRIX, edit the the configuration in ./scripts/personamem/config.yaml
70+
./scripts/run_pm_eval.sh
71+
```

evaluation/scripts/PrefEval/irrelevant_conv.py

Lines changed: 13870 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)