lenskit / lenskit/lkpy

High-performance recommender output storage

Open
#495 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

deferred evaluation
Dominant language
Python
Stars
314
Forks
77
Avg merge
4d 6m
Merged PRs (30d)
10

Description

Right now, in experiments I have been running, there is a significant bottleneck in retrieving and saving results in parallel batch inference. This is significantly hindering throughput, as each worker is only able to run at 30-40% of a CPU on my large data-crunching rig.

It is possible that item lists will speed this up, but if not, I would like to look at a more efficient way to collect batch-inference results for saving and/or measurement.

One potential solution is to save each worker's results in a separate Parquet file.

Another promising direction is Arrow Flight, an IPC protocol built on top of Arrow. ItemList can be trivially converted to an Arrow Table, which then can be serialized into a flight. We could implement a Flight server, in either Python or Rust, that processes item lists and incorporates them into the results.

Some open questions:

  • Does Python support concurrent flights Flight server? Or does one client running do_put block other clients?
  • Do we need Rust, or will Python be sufficiently performant?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing batch-inference result collection and the ItemList conversion mentioned in the issue. Compare separate per-worker Parquet output with an Arrow Flight approach, including whether concurrent do_put clients block; done requires a chosen implementation direction and evidence of improved throughput.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, rust
Domain
data-engineering, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.