Skip to content

Commit

Permalink
memory postprocessing obj removed
Browse files Browse the repository at this point in the history
  • Loading branch information
josancamon19 committed Sep 30, 2024
1 parent 3b721d4 commit 1b9f2c8
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions backend/models/memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,6 @@ class Memory(BaseModel):

external_data: Optional[Dict] = None

postprocessing: Optional[MemoryPostProcessing] = None

discarded: bool = False
deleted: bool = False
visibility: MemoryVisibility = MemoryVisibility.private
Expand Down
8 changes: 4 additions & 4 deletions backend/utils/memories/postprocess_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ def postprocess_memory(memory_id: str, file_path: str, uid: str, emotional_feedb
# TODO: FAL fails too much and is fucking expensive. Remove it.
fail_reason = 'FAL empty segments' if not fal_segments else f'FAL transcript too short ({new_count} vs {count})'
memories_db.set_postprocessing_status(uid, memory.id, PostProcessingStatus.failed, fail_reason=fail_reason)
memory.postprocessing = MemoryPostProcessing(
status=PostProcessingStatus.failed, model=PostProcessingModel.fal_whisperx)
# memory.postprocessing = MemoryPostProcessing(
# status=PostProcessingStatus.failed, model=PostProcessingModel.fal_whisperx)
# TODO: consider doing process_memory, if any segment still matched to user or people
return 200, memory

Expand All @@ -107,8 +107,8 @@ def postprocess_memory(memory_id: str, file_path: str, uid: str, emotional_feedb
return 500, str(e)

memories_db.set_postprocessing_status(uid, memory.id, PostProcessingStatus.completed)
result.postprocessing = MemoryPostProcessing(
status=PostProcessingStatus.completed, model=PostProcessingModel.fal_whisperx)
# result.postprocessing = MemoryPostProcessing(
# status=PostProcessingStatus.completed, model=PostProcessingModel.fal_whisperx)

return 200, result

Expand Down

0 comments on commit 1b9f2c8

Please sign in to comment.