Skip to content

Commit a93100b

Browse files
authored
Merge branch 'dev' into mac-win-adapt
2 parents caefa04 + 409cab4 commit a93100b

File tree

3 files changed

+102
-7
lines changed

3 files changed

+102
-7
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ evaluation/data/langmemeval
1010
evaluation/*tmp/
1111
evaluation/results
1212
evaluation/.env
13-
evaluation/scripts/*.sh
1413
evaluation/configs/*
1514
.env
1615

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/bin/bash
2+
3+
# Common parameters for all scripts
4+
LIB="memos"
5+
VERSION="063001"
6+
WORKERS=10
7+
TOPK=20
8+
9+
echo "Running locomo_ingestion.py..."
10+
CUDA_VISIBLE_DEVICES=0 python scripts/locomo/locomo_ingestion.py --lib $LIB --version $VERSION --workers $WORKERS
11+
if [ $? -ne 0 ]; then
12+
echo "Error running locomo_ingestion.py"
13+
exit 1
14+
fi
15+
16+
echo "Running locomo_search.py..."
17+
CUDA_VISIBLE_DEVICES=0 python scripts/locomo/locomo_search.py --lib $LIB --version $VERSION --top_k $TOPK --workers $WORKERS
18+
if [ $? -ne 0 ]; then
19+
echo "Error running locomo_search.py"
20+
exit 1
21+
fi
22+
23+
echo "Running locomo_responses.py..."
24+
python scripts/locomo/locomo_responses.py --lib $LIB --version $VERSION
25+
if [ $? -ne 0 ]; then
26+
echo "Error running locomo_responses.py."
27+
exit 1
28+
fi
29+
30+
echo "Running locomo_eval.py..."
31+
python scripts/locomo/locomo_eval.py --lib $LIB --version $VERSION --workers $WORKERS --num_runs 3
32+
if [ $? -ne 0 ]; then
33+
echo "Error running locomo_eval.py"
34+
exit 1
35+
fi
36+
37+
echo "Running locomo_metric.py..."
38+
python scripts/locomo/locomo_metric.py --lib $LIB --version $VERSION
39+
if [ $? -ne 0 ]; then
40+
echo "Error running locomo_metric.py"
41+
exit 1
42+
fi
43+
44+
echo "All scripts completed successfully!"

examples/basic_modules/tree_textual_memory_reasoner.py

Lines changed: 58 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,18 @@
3737

3838
# Step 1: Prepare a mock ParsedTaskGoal
3939
parsed_goal = ParsedTaskGoal(
40-
topic_level=["Multi-UAV Long-Term Coverage"],
41-
concept_level=["Coverage Metrics", "Reward Function Design", "Energy Model"],
42-
fact_level=["CT and FT Definition", "Reward Components", "Energy Cost Components"],
40+
memories=[
41+
"Multi-UAV Long-Term Coverage",
42+
"Coverage Metrics",
43+
"Reward Function Design",
44+
"Energy Model",
45+
"CT and FT Definition",
46+
"Reward Components",
47+
"Energy Cost Components",
48+
],
49+
keys=["UAV", "coverage", "energy", "reward"],
50+
tags=[],
4351
goal_type="explanation",
44-
graph_suggestion="Use all relevant knowledge from previous paper review",
45-
retrieval_keywords=["UAV", "coverage", "energy", "reward"],
4652
)
4753

4854
query = "How can multiple UAVs coordinate to maximize coverage while saving energy?"
@@ -85,7 +91,53 @@
8591
sources=["paper://multi-uav-coverage/metrics"],
8692
embedding=[0.01] * 768,
8793
),
88-
)
94+
),
95+
TextualMemoryItem(
96+
id="c34f5e6b-2d34-4e6f-8c9b-abcdef123456",
97+
memory="The capital of France is Paris, which is known for the Eiffel Tower.",
98+
metadata=TreeNodeTextualMemoryMetadata(
99+
user_id=None,
100+
session_id=None,
101+
status="activated",
102+
type="fact",
103+
memory_time="2024-01-01",
104+
source="file",
105+
confidence=90.0,
106+
entities=["France", "Paris", "Eiffel Tower"],
107+
tags=["geography", "city", "landmark"],
108+
visibility="public",
109+
updated_at="2025-06-11T11:51:24.438001",
110+
memory_type="LongTermMemory",
111+
key="Geography Fact",
112+
value="Paris is the capital of France",
113+
hierarchy_level="concept",
114+
sources=["wikipedia://paris"],
115+
embedding=[0.03] * 768,
116+
),
117+
),
118+
TextualMemoryItem(
119+
id="d56a7b8c-3e45-4f7a-9dab-fedcba654321",
120+
memory="Total energy cost is calculated from both mechanical movement and communication transmission.",
121+
metadata=TreeNodeTextualMemoryMetadata(
122+
user_id=None,
123+
session_id=None,
124+
status="activated",
125+
type="fact",
126+
memory_time="2024-01-01",
127+
source="file",
128+
confidence=89.0,
129+
entities=["movement power", "transmission power"],
130+
tags=["energy", "movement", "transmission"],
131+
visibility="public",
132+
updated_at="2025-06-11T11:51:24.438001",
133+
memory_type="LongTermMemory",
134+
key="Energy Cost Components",
135+
value="Includes movement and communication energy",
136+
hierarchy_level="fact",
137+
sources=["paper://multi-uav-coverage/energy-detail"],
138+
embedding=[0.04] * 768,
139+
),
140+
),
89141
]
90142

91143
# Step 7: Init memory retriever

0 commit comments

Comments
 (0)