2c08bf4221eaaac1f0e7206206ff1d3282267266,ilastik/applets/pixelClassification/opPixelClassificationDataExport.py,OpPixelClassificationDataExport,_checkDataConstraint,#OpPixelClassificationDataExport#,17

Before Change


        dataBatch = self.RawData.meta

        // Must have same dimensionality (but not necessarily the same shape)
        if len(dataTrain.shape) != len(dataBatch.shape):
            raise DatasetConstraintError("Batch Prediction Input","Batch input must have the same dimension as training input.")
        
        // Must have same number of channels
        if dataTrain.getTaggedShape()["c"] != dataBatch.getTaggedShape()["c"]:
            raise DatasetConstraintError("Batch Prediction Input","Batch input must have the same number of channels as training input.")
        
        // Must have same set of axes (but not necessarily in the same order)
        if set(dataTrain.getAxisKeys()) != set(dataBatch.getAxisKeys()):
            raise DatasetConstraintError("Batch Prediction Input","Batch input axis must fit axis of training input.")

After Change


        batchMeta = self.RawData.meta

        // Must have same number of channels
        training_channels = trainingMeta.getTaggedShape()["c"]
        batch_channels = batchMeta.getTaggedShape()["c"]
        if training_channels != batch_channels :
            raise DatasetConstraintError("Batch Prediction Input",
                                         "Batch input must have the same number of channels as training input."\
                                         "(Batch has {} channels, but training input used {}"\
                                         "".format( batch_channels, training_channels ))

        // Other than time, Must have same set of axes (but not necessarily in the same order)
        training_axes = set(trainingMeta.getAxisKeys())
        batch_axes = set(batchMeta.getAxisKeys())
        training_axes.discard("t")
        batch_axes.discard("t")
        
        if training_axes != batch_axes:
            raise DatasetConstraintError("Batch Prediction Input",
                                         "Batch input file does not have the same spatial input axes as the training input:"\
                                         "has {}, expected {}".format( batch_axes, training_axes ))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 12

Instances


Project Name: ilastik/ilastik
Commit Name: 2c08bf4221eaaac1f0e7206206ff1d3282267266
Time: 2013-12-03
Author: bergs@janelia.hhmi.org
File Name: ilastik/applets/pixelClassification/opPixelClassificationDataExport.py
Class Name: OpPixelClassificationDataExport
Method Name: _checkDataConstraint


Project Name: ilastik/ilastik
Commit Name: 64099d49ad3f9a7b255044a581e204861b7e0db1
Time: 2015-04-23
Author: bergs@janelia.hhmi.org
File Name: ilastik/applets/layerViewer/opLayerViewer.py
Class Name: OpLayerViewer
Method Name: checkConstraints


Project Name: ilastik/ilastik
Commit Name: cd4ddf72426281fc556e980fd9635bfb5b063577
Time: 2015-03-04
Author: bergs@janelia.hhmi.org
File Name: ilastik/applets/layerViewer/opLayerViewer.py
Class Name: OpLayerViewer
Method Name: checkConstraints