Skip to main content

Module utils

Module utils 

Source

Functions§

collect_and_align_results
Collect and align results with original records
compute_mean
Calculate the mean of for a slice of f32 values There’s no need for a generic implementation here, as we only need f32 for embeddings
compute_similarity
generate_embeddings_for_record
Helper for extracting embeddings for a single record. Used in the genai evaulation workflow.
parse_embedder
Helper function for extracting embedder and runtime from optional PyEmbedder
post_process_aligned_results
Post-process aligned results
spawn_evaluation_tasks_with_embeddings
Spawn tasks to run evaluation workflows with embedding calculations
spawn_evaluation_tasks_without_embeddings
Spawn tasks without embedding support This function will spawn a task that runs the workflows and extracts the results If there is an error during workflow execution, it will log the error and return None for that record