in retail/recommendation-system/bqml-scann/tfx_pipeline/scann_indexer.py [0:0]
def run_fn(params):
embedding_files_path = params.train_files
output_dir = params.serving_model_dir
num_leaves = params.train_steps
schema_file_path = params.schema_file
logging.info("Indexer started...")
tokens, embeddings = load_embeddings(embedding_files_path, schema_file_path)
index = build_index(embeddings, num_leaves)
save_index(index, tokens, output_dir)
logging.info("Indexer finished.")