fix: Filter non-serializable objects in pipeline metadata

- Skip CharacterMemory and callback functions during serialization
- Add .pids/ and .serena/ to gitignore
- Add workflow integration documentation

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
empty
2026-01-10 15:56:06 +08:00
parent be2639c596
commit c65b040fe3
3 changed files with 457 additions and 6 deletions

View File

@@ -495,11 +495,26 @@ class StandardPipeline(LinearVideoPipeline):
logger.warning("No task_id in storyboard, skipping persistence")
return
# Build metadata
input_with_title = ctx.params.copy()
input_with_title["text"] = ctx.input_text # Ensure text is included
if not input_with_title.get("title"):
input_with_title["title"] = storyboard.title
# Build metadata - filter out non-serializable objects
clean_input = {}
for key, value in ctx.params.items():
# Skip non-serializable objects like CharacterMemory
if key == "character_memory":
# Convert to serializable dict if present
if value is not None and hasattr(value, 'to_dict'):
clean_input["character_memory"] = value.to_dict()
elif key == "progress_callback":
# Skip callback functions
continue
elif callable(value):
# Skip any callable objects
continue
else:
clean_input[key] = value
clean_input["text"] = ctx.input_text # Ensure text is included
if not clean_input.get("title"):
clean_input["title"] = storyboard.title
metadata = {
"task_id": task_id,
@@ -507,7 +522,7 @@ class StandardPipeline(LinearVideoPipeline):
"completed_at": storyboard.completed_at.isoformat() if storyboard.completed_at else None,
"status": "completed",
"input": input_with_title,
"input": clean_input,
"result": {
"video_path": result.video_path,