How to better tune peak memory usage
@iindyk is already working on this.
Since Jan 24, 2022.
Assessment
This issue has not been assessed yet.
Description
I have some datasets and transformations that I want to run that unfortunately won't fit on n1-highmem-16 instances (which is what FlexRS requires). The features are fairly standard scalar features with tft.quantiles analyzer and string features with tft.vocabulary analyzer (but there are a lot of each type of feature). Generally the analyze step will run fine up until the final combine which will typically run on a very small number of machines and cause them to repeatedly OOM.
Of course I can do something like use a larger machine type or even a custom machine type, but these don't work with FlexRS and would be more expensive. I'm generally curious about whether either of the following two options would be viable solutions:
- Shard the analyze step by features. So split up the set of features into separate groups and run multiple different analyze steps sequentially, which should hopefully reduce peak memory usage. The challenge would be how to merge the outputs of the analyze steps together at the end.
- Add beam resource hints specifically to the problematic combine tasks so that they do not get scheduled to run on the same machine.
Are either of these two options viable or is there a solution that I have not considered yet?
- Dominant language
- Python
- Stars
- 989
- Forks
- 225
- PR merge metrics
- No merged PRs in 30d
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.
More from tensorflow/transform
-
stat:contributions welcome type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
tensorflow/transform#347 ·
-
bug stat:awaiting response
Difficulty 3/5 1-2 days Newbie friendliness 35/100
tensorflow/transform#339 · 2 comments ·
-
stat:contributions welcome type:bug
tensorflow/transform#273 · 1 assignee ·
-
stat:contributions welcome type:support
tensorflow/transform#272 · 4 comments · 1 assignee ·
-
stat:contributions welcome type:bug
tensorflow/transform#265 · 3 comments · 2 assignees ·
All issues in tensorflow/transform
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100