dvc/render/image_converter.py
def convert(
        self, data: bytes, revision, filename
    ) -> Tuple[List[Dict], Dict]:
        """
        Convert the DVC Plots content to DVC Render datapoints.
        Return both generated datapoints and updated properties.
        """
        path = self.plot_properties.get("out")
        if path:
            if not os.path.isdir(path):
                os.makedirs(path, exist_ok=True)
            src = self._write_image(path, revision, filename, data)
        else:
            src = self._encode_image(data)
        datapoint = {
            REVISION_FIELD: revision,
            FILENAME_FIELD: filename,
            SRC_FIELD: src,
        }
        return [datapoint], self.plot_properties

        Convert the DVC Plots content to DVC Render datapoints.
        Return both generated datapoints and updated properties.
        
Convert the DVC Plots content to DVC Render datapoints.
Return both generated datapoints and updated properties.
Convert the DVC Plots content to DVC Render datapoints . Return both generated datapoints and updated properties .
def convert(
        self, data: bytes, revision, filename
    ) -> Tuple[List[Dict], Dict]:
        path = self.plot_properties.get("out")
        if path:
            if not os.path.isdir(path):
                os.makedirs(path, exist_ok=True)
            src = self._write_image(path, revision, filename, data)
        else:
            src = self._encode_image(data)
        datapoint = {
            REVISION_FIELD: revision,
            FILENAME_FIELD: filename,
            SRC_FIELD: src,
        }
        return [datapoint], self.plot_properties
def convert ( self , data : bytes , revision , filename ) -> Tuple [ List [ Dict ] , Dict ] : path = self . plot_properties . get ( "out" ) if path : if not os . path . isdir ( path ) : os . makedirs ( path , exist_ok = True ) src = self . _write_image ( path , revision , filename , data ) else : src = self . _encode_image ( data ) datapoint = { REVISION_FIELD : revision , FILENAME_FIELD : filename , SRC_FIELD : src , } return [ datapoint ] , self . plot_properties
Convert the DVC Plots content to DVC Render datapoints.
Convert the DVC Plots content to DVC Render datapoints .
"""
        Convert the DVC Plots content to DVC Render datapoints.
        Return both generated datapoints and updated properties.
        """
self
data
bytes
revision
filename