trains/logger.py
def report_image_and_upload(self, title, series, iteration, path=None, matrix=None, max_image_history=None):
        """
        Report an image and upload its contents.

        Image is uploaded to a preconfigured bucket (see setup_upload()) with a key (filename)
        describing the task ID, title, series and iteration.

        :param title: Title (AKA metric)
        :type title: str
        :param series: Series (AKA variant)
        :type series: str
        :param iteration: Iteration number
        :type iteration: int
        :param path: A path to an image file. Required unless matrix is provided.
        :type path: str
        :param matrix: A 3D numpy.ndarray object containing image data (RGB). Required unless filename is provided.
        :type matrix: str
        :param max_image_history: maximum number of image to store per metric/variant combination \
        use negative value for unlimited. default is set in global configuration (default=5)
        :type max_image_history: int
        """

        # if task was not started, we have to start it
        self._start_task_if_needed()
        upload_uri = self._default_upload_destination or self._task._get_default_report_storage_uri()
        if not upload_uri:
            upload_uri = Path(get_cache_dir()) / 'debug_images'
            upload_uri.mkdir(parents=True, exist_ok=True)
            # Verify that we can upload to this destination
            upload_uri = str(upload_uri)
            storage = StorageHelper.get(upload_uri)
            upload_uri = storage.verify_upload(folder_uri=upload_uri)

        self._task.reporter.report_image_and_upload(
            title=title,
            series=series,
            path=path,
            matrix=matrix,
            iter=iteration,
            upload_uri=upload_uri,
            max_image_history=max_image_history,
        )

        Report an image and upload its contents.

        Image is uploaded to a preconfigured bucket (see setup_upload()) with a key (filename)
        describing the task ID, title, series and iteration.

        :param title: Title (AKA metric)
        :type title: str
        :param series: Series (AKA variant)
        :type series: str
        :param iteration: Iteration number
        :type iteration: int
        :param path: A path to an image file. Required unless matrix is provided.
        :type path: str
        :param matrix: A 3D numpy.ndarray object containing image data (RGB). Required unless filename is provided.
        :type matrix: str
        :param max_image_history: maximum number of image to store per metric/variant combination \
        use negative value for unlimited. default is set in global configuration (default=5)
        :type max_image_history: int
        
Report an image and upload its contents.
Image is uploaded to a preconfigured bucket ) with a key (filename)
describing the task ID, title, series and iteration.
Report an image and upload its contents . Image is uploaded to a preconfigured bucket ) with a key ( filename ) describing the task ID title series and iteration .
def report_image_and_upload(self, title, series, iteration, path=None, matrix=None, max_image_history=None):
        self._start_task_if_needed()
        upload_uri = self._default_upload_destination or self._task._get_default_report_storage_uri()
        if not upload_uri:
            upload_uri = Path(get_cache_dir()) / 'debug_images'
            upload_uri.mkdir(parents=True, exist_ok=True)
            upload_uri = str(upload_uri)
            storage = StorageHelper.get(upload_uri)
            upload_uri = storage.verify_upload(folder_uri=upload_uri)
        self._task.reporter.report_image_and_upload(
            title=title,
            series=series,
            path=path,
            matrix=matrix,
            iter=iteration,
            upload_uri=upload_uri,
            max_image_history=max_image_history,
        )
def report_image_and_upload ( self , title , series , iteration , path = None , matrix = None , max_image_history = None ) : self . _start_task_if_needed ( ) upload_uri = self . _default_upload_destination or self . _task . _get_default_report_storage_uri ( ) if not upload_uri : upload_uri = Path ( get_cache_dir ( ) ) / 'debug_images' upload_uri . mkdir ( parents = True , exist_ok = True ) upload_uri = str ( upload_uri ) storage = StorageHelper . get ( upload_uri ) upload_uri = storage . verify_upload ( folder_uri = upload_uri ) self . _task . reporter . report_image_and_upload ( title = title , series = series , path = path , matrix = matrix , iter = iteration , upload_uri = upload_uri , max_image_history = max_image_history , )
Report an image and upload its contents.
Report an image and upload its contents .
"""
        Report an image and upload its contents.

        Image is uploaded to a preconfigured bucket (see setup_upload()) with a key (filename)
        describing the task ID, title, series and iteration.

        :param title: Title (AKA metric)
        :type title: str
        :param series: Series (AKA variant)
        :type series: str
        :param iteration: Iteration number
        :type iteration: int
        :param path: A path to an image file. Required unless matrix is provided.
        :type path: str
        :param matrix: A 3D numpy.ndarray object containing image data (RGB). Required unless filename is provided.
        :type matrix: str
        :param max_image_history: maximum number of image to store per metric/variant combination \
        use negative value for unlimited. default is set in global configuration (default=5)
        :type max_image_history: int
        """ # if task was not started, we have to start it # Verify that we can upload to this destination
self
title
Title (AKA metric)
Title ( AKA metric )
series
Series (AKA variant)
Series ( AKA variant )
iteration
None
path
A path to an image file. Required unless matrix is provided.
A path to an image file . Required unless matrix is provided .
matrix
A 3D numpy.ndarray object containing image data (RGB). Required unless filename is provided.
A 3D numpy . ndarray object containing image data ( RGB ) . Required unless filename is provided .
max_image_history
maximum number of image to store per metric/variant combination \
use negative value for unlimited. default is set in global configuration (default=5)
maximum number of image to store per metric / variant combination \ use negative value for unlimited . default is set in global configuration ( default = 5 )