[FEA] True asynchronous TF dataloading

Open
#394 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
keras, python, tensorflow

Research direction

Start by reading the KerasSequenceLoader implementation and tracing where TensorFlow ops and DLPack conversion occur during batch and column slicing. The work is done when data-loading ops execute in a separate TensorFlow context asynchronously without introducing the described per-batch conversion inefficiency.

Written by the indexing model from the issue text.

Description

Even though the KerasSequenceLoader tries to load data in a separate Python thread, it leverages TF ops in that "thread" and so TF's scheduler is ultimately responsible for scheduling and executing those ops along with the ops in the neural network. This mitigates the "asynchronous" nature of the data loader. Finding a way to manage a separate TF context to execute the data loading ops in will be critical.

While it might be possible to remove all TF ops from the data loader, which would mean doing all batch and column level slicing on the CuDF side and making sure that everything is converted as an (N, 1) array so that you don't need to do any tf.expand_dims, this means the dlpack conversion will be done on each of these batched-and-sliced arrays which ends up becoming even more inefficient.

Dominant language
Python
Stars
1.2k
Forks
149
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

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.

More from NVIDIA-Merlin/NVTabular

All issues in NVIDIA-Merlin/NVTabular

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.