c8105b3974fba93097bd28e5ae14a27e5f56c857,ilastik/applets/objectExtraction/objectExtractionSerializer.py,SerialObjectFeaturesSlot,deserialize,#SerialObjectFeaturesSlot#Any#,79

Before Change


        mainOperator = self.slot.getRealOperator()
        innerops = mainOperator.innerOperators
        opgroup = group[self.name]
        for inner in opgroup.keys():
            gr = opgroup[inner]
            op = innerops[int(inner)]
            cache = {}
            for t in gr.keys():
                cache[int(t)] = []
                for ch in sorted(gr[t].keys()):
                    feat = dict()
                    for key in gr[t][ch].keys():
                        feat[key] = gr[t][ch][key].value
                    cache[int(t)].append(feat)
            warnings.warn("FIXME: Not deserializing object features")
            //op._opRegFeats._cache = cache
        self.dirty = False


class ObjectExtractionSerializer(AppletSerializer):

After Change


        for i, (_, subgroup) in enumerate( sorted(opgroup.items() ) ):
            opRegFeats = mainOperator.getLane(i)._opRegFeats

            for roiString, roi_grp in subgroup.items():
                logger.debug("Loading region features from dataset: "{}"".format( roi_grp.name ))
                roi = eval(roiString)
                
                region_features = {}
                for key, val in roi_grp.items():
                    region_features[key] = val[...]
                
                slotRoi = SubRegion( opRegFeats.CacheInput, *roi )
                opRegFeats.setInSlot( opRegFeats.CacheInput, (), slotRoi, numpy.array( [[region_features]] ) )
        
        self.dirty = False


class ObjectExtractionSerializer(AppletSerializer):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 8

Instances


Project Name: ilastik/ilastik
Commit Name: c8105b3974fba93097bd28e5ae14a27e5f56c857
Time: 2013-03-14
Author: bergs@janelia.hhmi.org
File Name: ilastik/applets/objectExtraction/objectExtractionSerializer.py
Class Name: SerialObjectFeaturesSlot
Method Name: deserialize


Project Name: uber/pyro
Commit Name: cce694178ae66b3a84623d517ffdf0c1bb32ba27
Time: 2020-05-11
Author: fehiepsi@gmail.com
File Name: pyro/infer/mcmc/hmc.py
Class Name: HMC
Method Name: _sample_r


Project Name: facebookresearch/pytext
Commit Name: 75ec1a6d88320cda9672cc04e7ffadd2442af36d
Time: 2020-05-05
Author: zsc@fb.com
File Name: pytext/models/output_layers/multi_label_classification_layer.py
Class Name: MultiLabelClassificationLayer
Method Name: get_loss


Project Name: ilastik/ilastik
Commit Name: c8105b3974fba93097bd28e5ae14a27e5f56c857
Time: 2013-03-14
Author: bergs@janelia.hhmi.org
File Name: ilastik/applets/objectExtraction/objectExtractionSerializer.py
Class Name: SerialLabelImageSlot
Method Name: deserialize


Project Name: MolSSI/QCEngine
Commit Name: 4afab8f3ea478da6d684e86140673f74add735e9
Time: 2019-02-21
Author: lori.burns@gmail.com
File Name: qcengine/programs/intf_dftd3/runner.py
Class Name:
Method Name: dftd3_harvest