davidyan74 commented on a change in pull request #11128: [BEAM-9524] Fix for
ib.show() executing indefinitely
URL: https://github.com/apache/beam/pull/11128#discussion_r395318403
##########
File path: sdks/python/apache_beam/runners/interactive/pipeline_instrument.py
##########
@@ -63,6 +63,24 @@ def __hash__(self):
self.producer_version))
+# TODO: turn this into a dataclass object when we finally get off of Python2.
+class CacheKey:
+ def __init__(self, var, version, producer_version, pipeline_id):
+ self.var = var
+ self.version = version
+ self.producer_version = producer_version
+ self.pipeline_id = pipeline_id
+
+ @staticmethod
+ def from_str(r):
+ split = r.split('|')
Review comment:
I think probably a better way is to do the following:
```
var, version, producer_version, pipeline_id = r.split('|')
return CacheKey(var, version, producer_version, pipeline_id)
```
----------------------------------------------------------------
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]
With regards,
Apache Git Services