Skip to content

Commit 1ffb585

Browse files
committed
Add limitations section to README and enhance demo_tinkerjet_math.py with retry logic
1 parent 41d2a8b commit 1ffb585

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

tutorial/demo_tinkerjet/README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,11 @@ for epoch in range(NUM_EPOCH):
5454
tuned_model_checkpoint = tinkerjet_remote.download_tuned_model()
5555
tinkerjet_remote.close()
5656

57-
```
57+
```
58+
59+
# Limitation
60+
61+
- Users are only limited to use OpenAI `baseurl` + `apikey` to build applications. Features such as `tuner.as_agentscope_model` is no longer available.
62+
63+
- AgentJet are not able to explicitly distinguish different agents in multi-agent scenario.
64+
But **do not worry**, AgentJet will still try its best to recognize shards of llm timelines and merge them behind the curtain, automatically.

tutorial/demo_tinkerjet/demo_tinkerjet_math.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from ajet.tuner_lib.weight_tuner.as_oai_baseurl_apikey import AgentJetAsOpenAI
88
from ajet import WorkflowOutput
99
from ajet.task_reader import RouterTaskReader
10-
10+
from ajet.utils.retry import retry_with_backoff
1111
TINKERJET_URL = "http://localhost:10086" # Change to your tinkerjet remote url
1212
NUM_EPOCH = 100
1313
GRPO_N = 4 # grpo group size
@@ -28,7 +28,10 @@ def main():
2828
)
2929

3030
# rollout
31+
@retry_with_backoff(max_retry=2)
3132
def rollout(task):
33+
# Q: Can I run episodes in parallel?
34+
# A: Yes, wrap `rollout` in a thread or process pool.
3235
try:
3336
api_baseurl_key = tinkerjet_remote.begin_episode()
3437
workflow_output = execute_agent(task, api_baseurl_key)

0 commit comments

Comments
 (0)