Performance issues in /src/python/tensorflow_cloud/core (by P3)
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 beforetrain_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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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