dbfe2afe79ac497075e50a3e569a1d63a346fb4d,pyemma/_base/serialization/serialization.py,SerializableMixIn,_validate_interpolation_map,#SerializableMixIn#,142

Before Change



        // check for valid operations: add, rm, mv
        valid_ops = ("set", "rm", "mv")
        if not all(action[0] in valid_ops for actions in inter_map.itervalues() for action in actions):
            raise DeveloperError("Your _serialize_interpolation_map contains invalid operations. "
                                 "Valid ops are: {}".format(valid_ops))

After Change



        // check for valid operations: add, rm, mv, map
        valid_ops = ("set", "rm", "mv", "map")
        for k, v in inter_map.items():
            if not is_int(k):
                raise DeveloperError("all keys of _serialize_interpolation_map "
                                     "have to be of type int (class version numbers)")
            if not isinstance(v, (list, tuple)):
                raise DeveloperError("actions per version have to be list or tuple")

            for action in v:
                if action[0] not in valid_ops:
                    raise DeveloperError("Your _serialize_interpolation_map contains invalid operations. "
                                         "Valid ops are: {valid_ops}. You provided {provided}"
                                         .format(valid_ops=valid_ops, provided=action[0]))

        self._serialize_interpolation_map = inter_map

    def __interpolate(self, state):
        // Lookup attributes in interpolation map according to version number of the class.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: markovmodel/PyEMMA
Commit Name: dbfe2afe79ac497075e50a3e569a1d63a346fb4d
Time: 2017-04-06
Author: m.scherer@fu-berlin.de
File Name: pyemma/_base/serialization/serialization.py
Class Name: SerializableMixIn
Method Name: _validate_interpolation_map


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: ceaad6e3750b463015890a36e13ec6e11f6ee005
Time: 2015-09-30
Author: nlavine@google.com
File Name: perfkitbenchmarker/benchmarks/fio_benchmark.py
Class Name:
Method Name: GetOrGenerateJobFileString


Project Name: tensorflow/transform
Commit Name: 97507c4871dff5fb5e4bd33d2f5cf3f8bd3aceba
Time: 2020-09-01
Author: varshaan@google.com
File Name: tensorflow_transform/output_wrapper.py
Class Name: TFTransformOutput
Method Name: transform_raw_features