8af731463df46f6c73c933bdc45ed9a4ecd4e422,nni/retiarii/operation.py,Operation,to_init_code,#Operation#Any#,32

Before Change


        self.parameters: Dict[str, Any] = parameters

    def to_init_code(self, field: str) -> str:
        params = ", ".join(f"{key}={repr(value)}" for key, value in self.parameters.items())
        return f"self.{field} = {self._to_class_name()}({params})"

    def to_forward_code(self, field: str, output: str, *inputs: str) -> str:
        return f"{output} = self.{field}({", ".join(inputs)})"

After Change


        self.parameters: Dict[str, Any] = parameters

    def to_init_code(self, field: str) -> str:
        raise NotImplementedError()

    def to_forward_code(self, field: str, output: str, inputs: List[str]) -> str:
        raise NotImplementedError()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: Microsoft/nni
Commit Name: 8af731463df46f6c73c933bdc45ed9a4ecd4e422
Time: 2020-11-17
Author: Quanlu.Zhang@microsoft.com
File Name: nni/retiarii/operation.py
Class Name: Operation
Method Name: to_init_code


Project Name: OpenNMT/OpenNMT-tf
Commit Name: abe59a5d0d014e2e9a7e44156836f1df940881f7
Time: 2019-06-26
Author: guillaume.klein@systrangroup.com
File Name: opennmt/runner.py
Class Name: Runner
Method Name: export


Project Name: ilastik/ilastik
Commit Name: c5c5491d1b8a80db265a2f9cb75f75bd32549fd1
Time: 2018-06-15
Author: fynn.beuttenmueller@iwr.uni-heidelberg.de
File Name: ilastik/applets/featureSelection/opFeatureSelection.py
Class Name: OpFeatureSelectionNoCache
Method Name: setupOutputs