Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
e185d36
feat(reme): 添加配置选项以启用或禁用个人资料功能
nitwtog Mar 2, 2026
0835b05
refactor(benchmark): 重构LongMemEval基准测试中的ReMe实例管理
nitwtog Mar 2, 2026
526d301
reformat 2 files
nitwtog Mar 3, 2026
bb59a36
refactor(benchmark): 重构长记忆评估中的模型配置
nitwtog Mar 3, 2026
7b66423
fix(benchmark): 移除数据路径默认值并设为必填参数
nitwtog Mar 3, 2026
45f2684
Update __init__.py
nitwtog Mar 3, 2026
41aa719
Update __init__.py
nitwtog Mar 3, 2026
b9b54c5
fix(benchmark): 修复ReMe评估中的模型配置和空值处理问题
nitwtog Mar 3, 2026
48e314b
Merge remote-tracking branch 'origin/terminal' into terminal
nitwtog Mar 3, 2026
77a8847
Merge remote-tracking branch 'origin/main'
nitwtog Mar 3, 2026
38c18ef
Merge pull request #2 from nitwtog/terminal
nitwtog Mar 3, 2026
7ee4db9
Merge remote-tracking branch 'origin/main'
nitwtog Mar 3, 2026
698e8a5
style(benchmark): 格式化模型名称打印输出
nitwtog Mar 3, 2026
5898e9e
Merge remote-tracking branch 'origin/main'
nitwtog Mar 11, 2026
2f682b8
Merge remote-tracking branch 'origin/main'
nitwtog Mar 12, 2026
51eb53e
docs(readme): 更新文档添加实验结果表格
nitwtog Mar 13, 2026
eb2cdb3
docs(readme): 更新文档中的内存系统链接
nitwtog Mar 13, 2026
839c30d
docs(readme): update experimental results section in documentation
nitwtog Mar 18, 2026
8835a1b
Merge remote-tracking branch 'origin/main'
nitwtog Mar 18, 2026
6ec1f34
Merge remote-tracking branch 'origin/main'
nitwtog Mar 20, 2026
949b3bf
Merge remote-tracking branch 'origin/main'
nitwtog Mar 30, 2026
89a8683
docs(benchmark): add quick start guides for halumem and longmemeval e…
nitwtog Mar 31, 2026
6c2288d
docs(longmemeval): update quickstart guide documentation
nitwtog Mar 31, 2026
88bd01a
Merge branch 'agentscope-ai:main' into main
nitwtog Apr 9, 2026
5fbb39d
chore(logger): add test comment to logger configuration
nitwtog Apr 9, 2026
6ac8912
Merge remote-tracking branch 'origin/main'
nitwtog Apr 9, 2026
99f84d9
chore(logger): add test comment to logger configuration
nitwtog Apr 9, 2026
84fa398
feat(core): add file logging capability to application
nitwtog Apr 9, 2026
64adc11
docs(benchmark): update HaluMem quickstart guide with dataset downloa…
nitwtog Apr 13, 2026
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
19 changes: 16 additions & 3 deletions benchmark/halumem/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,30 @@ conda activate ./reme-env
pip install .
```

### 2. Clone the Repository
### 2. Download the Dataset
```bash
cd ./benchmark/halumem
git clone https://github.com/MemTensor/HaluMem.git
mkdir -p data
curl -L "https://huggingface.co/datasets/IAAR-Shanghai/HaluMem/resolve/main/HaluMem-Medium.jsonl?download=true" -o data/HaluMem-Medium.jsonl
curl -L "https://huggingface.co/datasets/IAAR-Shanghai/HaluMem/resolve/main/HaluMem-Long.jsonl?download=true" -o data/HaluMem-Long.jsonl
```

Dataset page:
https://huggingface.co/datasets/IAAR-Shanghai/HaluMem/tree/main

If the official source is slow or inaccessible in mainland China, you can use a mirror:
```bash
cd ./benchmark/halumem
mkdir -p data
curl -L "https://hf-mirror.com/datasets/IAAR-Shanghai/HaluMem/resolve/main/HaluMem-Medium.jsonl?download=true" -o data/HaluMem-Medium.jsonl
curl -L "https://hf-mirror.com/datasets/IAAR-Shanghai/HaluMem/resolve/main/HaluMem-Long.jsonl?download=true" -o data/HaluMem-Long.jsonl
```

### 3. Run Experiments
Launch the ReMe service to enable memory library functionality:
```bash
clear && python benchmark/halumem/eval_reme.py \
--data_path benchmark/halumem/HaluMem/data/HaluMem-Medium.jsonl \
--data_path benchmark/halumem/data/HaluMem-Medium.jsonl \
--reme_model_name gpt-4o-mini-2024-07-18 \
--eval_model_name gpt-4o-mini-2024-07-18 \
--batch_size 40 \
Expand Down
7 changes: 6 additions & 1 deletion reme/core/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def __init__(
config_path: str | None = None,
enable_logo: bool = True,
log_to_console: bool = True,
log_to_file: bool = True,
enable_load_env: bool = True,
parser: type[PydanticConfigParser] | None = None,
default_as_llm_config: dict | None = None,
Expand Down Expand Up @@ -73,6 +74,7 @@ def __init__(
config_path=config_path,
enable_logo=enable_logo,
log_to_console=log_to_console,
log_to_file=log_to_file,
default_as_llm_config=default_as_llm_config,
default_as_llm_formatter_config=default_as_llm_formatter_config,
default_llm_config=default_llm_config,
Expand Down Expand Up @@ -144,7 +146,10 @@ async def start(self):
logger.warning("Application has already started.")
return self

init_logger(log_to_console=self.service_config.log_to_console)
init_logger(
log_to_console=self.service_config.log_to_console,
log_to_file=self.service_config.log_to_file,
)
logger.info(f"Init ReMe with config: {self.service_config.model_dump_json()}")

working_path = Path(self.service_config.working_dir)
Expand Down
1 change: 1 addition & 0 deletions reme/core/schema/service_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ class ServiceConfig(BasicConfig):
)
ray_max_workers: int = Field(default=-1)
log_to_console: bool = Field(default=True)
log_to_file: bool = Field(default=True)
disabled_flows: list[str] = Field(default_factory=list)
enabled_flows: list[str] = Field(default_factory=list)

Expand Down
2 changes: 2 additions & 0 deletions reme/core/service_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def __init__(
config_path: str | None = None,
enable_logo: bool = True,
log_to_console: bool = True,
log_to_file: bool = True,
default_as_llm_config: dict | None = None,
default_as_llm_formatter_config: dict | None = None,
default_as_token_counter_config: dict | None = None,
Expand Down Expand Up @@ -79,6 +80,7 @@ def __init__(
{
"enable_logo": enable_logo,
"log_to_console": log_to_console,
"log_to_file": log_to_file,
"working_dir": working_dir,
},
)
Expand Down
53 changes: 30 additions & 23 deletions reme/core/utils/logger_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@
from datetime import datetime


def init_logger(log_dir: str = "logs", level: str = "INFO", log_to_console: bool = True) -> None:
def init_logger(
log_dir: str = "logs",
level: str = "INFO",
log_to_console: bool = True,
log_to_file: bool = True,
) -> None:
"""Initialize the logger with both file and console handlers.

Args:
log_dir: Directory path for log files
level: Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
log_to_console: Whether to print logs to console/screen
log_to_file: Whether to persist logs to files under log_dir
"""
from loguru import logger

Expand All @@ -28,25 +34,26 @@ def init_logger(log_dir: str = "logs", level: str = "INFO", log_to_console: bool
)

# Try to configure file-based logging (skip if permission denied)
try:
# Ensure the logging directory exists
os.makedirs(log_dir, exist_ok=True)

# Generate filename based on the current timestamp
# Use dashes instead of colons for Windows compatibility
current_ts = datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
log_filename = f"{current_ts}.log"
log_filepath = os.path.join(log_dir, log_filename)

# Configure file-based logging with rotation and compression
logger.add(
log_filepath,
level=level,
rotation="00:00",
retention="7 days",
compression="zip",
encoding="utf-8",
format="{time:YYYY-MM-DD HH:mm:ss} | {level} | {file}:{line} | {function} | {message}",
)
except Exception as e:
logger.error(f"Error configuring file logging: {e}")
if log_to_file:
try:
# Ensure the logging directory exists
os.makedirs(log_dir, exist_ok=True)

# Generate filename based on the current timestamp
# Use dashes instead of colons for Windows compatibility
current_ts = datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
log_filename = f"{current_ts}.log"
log_filepath = os.path.join(log_dir, log_filename)

# Configure file-based logging with rotation and compression
logger.add(
log_filepath,
level=level,
rotation="00:00",
retention="7 days",
compression="zip",
encoding="utf-8",
format="{time:YYYY-MM-DD HH:mm:ss} | {level} | {file}:{line} | {function} | {message}",
)
except Exception as e:
logger.error(f"Error configuring file logging: {e}")
2 changes: 2 additions & 0 deletions reme/reme.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def __init__(
config_path: str = "vector",
enable_logo: bool = True,
log_to_console: bool = True,
log_to_file: bool = True,
default_llm_config: dict | None = None,
default_embedding_model_config: dict | None = None,
default_vector_store_config: dict | None = None,
Expand Down Expand Up @@ -81,6 +82,7 @@ def __init__(
config_path=config_path,
enable_logo=enable_logo,
log_to_console=log_to_console,
log_to_file=log_to_file,
parser=ReMeConfigParser,
default_llm_config=default_llm_config,
default_embedding_model_config=default_embedding_model_config,
Expand Down