tensorflow / tensorflow/datasets

Multi-threaded compression?

Open
#5,341 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help
Dominant language
Python
Stars
4.6k
Forks
1.6k
Avg merge
3h 54m
Merged PRs (30d)
1

Description

What I need help with / What I was wondering
I need to build a large dataset of imagery that has > 3 channels (multi-spectral satellite imagery), so I'm relying on the tfds.features.Tensor feature connector. As writing data uncompressed is highly inefficient, I'm using tfds.features.Encoding.ZLIB for compression.

However, this compression step actually becomes the bottleneck in my dataset building process as it is single-threaded, causing my dataset build to take longer than a month.

What I've tried so far
Read up on the docs, also checked the tf.io namespace for any possible workarounds.

It would be nice if...

  • Is there any way of speeding up the encoding/compression of the examples by using multiple cores?
  • Are there plans to support a faster compression method than ZLIB for generic Tensor features?

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.

Research direction

Start by reading the tfds.features.Tensor and tfds.features.Encoding.ZLIB documentation, then trace how Tensor examples are encoded and check the tf.io namespace for compression options. The issue is done only when a supported approach for multi-core compression or a faster generic Tensor compression method is defined and validated for large dataset builds.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, tensorflow
Domain
data, 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.