robertwb commented on a change in pull request #14390:
URL: https://github.com/apache/beam/pull/14390#discussion_r610961390
##########
File path: sdks/python/apache_beam/transforms/resources.py
##########
@@ -38,11 +39,26 @@ def _parse_int(value):
return str(value).encode('ascii')
+def _return_max(v1, v2):
Review comment:
This and the pair of "method" dicts makes me wonder if this'd be better
expressed as a mapping of urns to ResourceHint subclasses, each of which knows
how to parse, merge, and represent itself as a byte string.
##########
File path: sdks/python/apache_beam/pipeline.py
##########
@@ -494,6 +494,9 @@ def replace_all(self, replacements):
for override in replacements:
self._check_replacement(override)
+ def _propagate_resource_hints(self):
+ ResourceHintsPropagator.propagate_hints_to_subtransforms(self)
Review comment:
Nit: I'd go ahead and inline this.
##########
File path: sdks/python/apache_beam/pipeline.py
##########
@@ -502,6 +505,8 @@ def run(self, test_runner_api='AUTO'):
# Records whether this pipeline contains any cross-language transforms.
self.contains_external_transforms = (
ExternalTransformFinder.contains_external_transforms(self))
+ # Move in to_runner_api instead?
Review comment:
I think it's fine to have here. (Preferable would be to actually build
the things with the right hints in the first place rather than have a visitor
modify them, but that's probably quite a bit more invasive of a change to take
on now.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]