Skip to content

Commit 77dfa41

Browse files
committed
refactor
1 parent 9ba7377 commit 77dfa41

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

examples/search_r1/search_r1_agent.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44

55
import os
66
import re
7-
import shutil
8-
import tempfile
97
import time
10-
from typing import Any, Dict, List, Literal, Optional, Tuple, TypedDict, cast
8+
import pandas as pd
9+
from typing import Any, Dict, List, Optional, Tuple, TypedDict, cast
1110

1211

1312
import requests
@@ -98,14 +97,10 @@ def passages2string(retrieval_result: List[RetrievalItem]) -> str:
9897
def call_llm(
9998
llm_client: OpenAI,
10099
model_name: str,
101-
content: str = "",
102100
messages: List[dict] = [],
103101
temperature: float = 1.0,
104102
max_tokens: int = 500,
105103
) -> str:
106-
if not len(messages):
107-
messages=[{"role": "user", "content": content}]
108-
print(messages)
109104
response = llm_client.chat.completions.create(
110105
model=model_name,
111106
messages=messages,

examples/search_r1/train_search_r1_agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"experiment_name": "searchr1_minibatch256_runner32",
7777
"nnodes": 1,
7878
"test_freq": 10,
79-
"save_freq":10,
79+
"save_freq": 10,
8080
"total_epochs": 15,
8181
"total_training_steps": 300,
8282
"default_local_dir": "/mnt/teamdrive/search_r1/searchr1_checkpoints/searchr1_minibatch256_runner32/"

0 commit comments

Comments
 (0)