mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
[BREAKING] Python: Checkpoint refactor: encode/decode, checkpoint format, etc (#3744)
* WIP: Checkpoint refactor: encode/decode, checkpoint format, etc * WIP: Remove workflow ID in checkpoints * Refactor checkpointing * Add get_latest tests * Increase test coverage * Fix formatting * Fix unit tests * Fix samples * fix unit tests * fix pipeline * Copilot comments * Fix tests * Fix more tests * Address comments part 1 * Address comments part 2 * Comments
This commit is contained in:
committed by
GitHub
Unverified
parent
a2a672b687
commit
7db6c4ab4e
@@ -430,7 +430,7 @@ class AgentFrameworkExecutor:
|
||||
elif hil_responses:
|
||||
# Only auto-resume from latest checkpoint when we have HIL responses
|
||||
# Regular "Run" clicks should start fresh, not resume from checkpoints
|
||||
checkpoints = await checkpoint_storage.list_checkpoints() # No workflow_id filter needed!
|
||||
checkpoints = await checkpoint_storage.list_checkpoints(workflow_name=workflow.name)
|
||||
if checkpoints:
|
||||
latest = max(checkpoints, key=lambda cp: cp.timestamp)
|
||||
checkpoint_id = latest.checkpoint_id
|
||||
|
||||
@@ -1059,7 +1059,7 @@ class DevServer:
|
||||
# Extract checkpoint_id from item_id (format: "checkpoint_{checkpoint_id}")
|
||||
checkpoint_id = item_id[len("checkpoint_") :]
|
||||
storage = executor.checkpoint_manager.get_checkpoint_storage(conversation_id)
|
||||
deleted = await storage.delete_checkpoint(checkpoint_id)
|
||||
deleted = await storage.delete(checkpoint_id)
|
||||
|
||||
if not deleted:
|
||||
raise HTTPException(status_code=404, detail="Checkpoint not found")
|
||||
|
||||
Reference in New Issue
Block a user