damccorm commented on code in PR #34310:
URL: https://github.com/apache/beam/pull/34310#discussion_r2001212474
##########
sdks/python/apache_beam/ml/anomaly/specifiable.py:
##########
@@ -195,14 +189,19 @@ def to_spec(self) -> Spec:
f"'{type(self).__name__}' not registered as Specifiable. "
f"Decorate ({type(self).__name__}) with @specifiable")
- args = {k: self._to_spec_helper(v) for k, v in self.init_kwargs.items()}
+ args = {k: _to_spec_helper(v) for k, v in self.init_kwargs.items()}
- return Spec(type=self.__class__.spec_type, config=args)
+ return Spec(type=self.spec_type(), config=args)
def run_original_init(self) -> None:
"""Invoke the original __init__ method with original keyword arguments"""
pass
+ @classmethod
+ def unspecifiable(cls) -> None:
+ """Resume the class structure prior to specifiable"""
Review Comment:
Ok - I guess this seems fine - it will also potentially help with equality
checks and avoid weird conflicts I suppose.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]