Skip to content

Commit

Permalink
nit: add logs
Browse files Browse the repository at this point in the history
Signed-off-by: Snehil Shah <[email protected]>
  • Loading branch information
Snehil-Shah committed Sep 5, 2024
1 parent bacafdd commit 1ba6de1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/worker/clustering_media/clustering_media_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def worker(ch, method, properties, body):
video_embeddings = []
video_classifications = {}

log.info("Processing files")
for file in file_list:
file_id = file["id"]
file_path = file["path"]
Expand Down Expand Up @@ -117,6 +118,7 @@ def worker(ch, method, properties, body):
else:
pass

log.info("Clustering embeddings")
clustering_results_audio = cluster_embeddings.run(input_data=audio_embeddings, n_clusters=audio_config.get("n_clusters"), modality='audio')
if "labels" in video_config:
clustering_results_video = video_classifications
Expand All @@ -126,12 +128,14 @@ def worker(ch, method, properties, body):
"audio": clustering_results_audio,
"video": clustering_results_video
}
# log.info("Calculating t-SNE co-ordinates")
# dim_reduction_results_json = []
# if audio_config.get("tsne"):
# dim_reduction_results_json.extend(dimension_reduction.perform_reduction(audio_embeddings))
# if video_config.get("tsne"):
# dim_reduction_results_json.extend(dimension_reduction.perform_reduction(video_embeddings))
report = make_report_indexed(clustering_results_json, "indexed")
log.info("Report generated")
feluda.queue.message(
feluda.config.queue.parameters.queues[1]["name"], report
)
Expand Down

0 comments on commit 1ba6de1

Please sign in to comment.