tensorflow / tensorflow/cloud

Performance issues in /src/python/tensorflow_cloud/core (by P3)

Open
#371 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
383
Forks
93
Avg merge
1d 3h
Merged PRs (30d)
1

Description

Hello! I've found a performance issue in /tests/testdata/keras_tuner_cifar_example.py: batch() should be called before map(), which could make your program more efficient. Here is the tensorflow document to support it.

Detailed description is listed below:

  • .batch(BATCH_SIZE)(here) should be called before train_dataset.map(scale)(here).
  • .batch(BATCH_SIZE)(here) should be called before .map(scale)(here).

Besides, you need to check the function called in map()(e.g., scale called in .map(scale)) whether to be affected or not to make the changed code work properly. For example, if scale needs data with shape (x, y, z) as its input before fix, it would require data with shape (batch_size, x, y, z).

Looking forward to your reply. Btw, I am very glad to create a PR to fix it if you are too busy.

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 in src/python/tensorflow_cloud/core/tests/testdata/keras_tuner_cifar_example.py at the train_dataset pipeline around the referenced lines. Inspect the scale function's expected input shape, then verify the batch and map ordering for both listed cases. Run the Keras tuner CIFAR example and confirm the changed pipeline works without shape errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, tensorflow
Domain
machine-learning, performance
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.