How to use the visualdl.server.log.logger function in visualdl

To help you get started, we’ve selected a few visualdl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github PaddlePaddle / VisualDL / demo / vdl_scratch.py View on Github external
def download_graph_image():
    '''
    This is a scratch demo, it do not generate a ONNX proto, but just download an image
    that generated before to show how the graph frontend works.

    For real cases, just refer to README.
    '''
    import urllib
    image_url = "https://github.com/PaddlePaddle/VisualDL/blob/develop/demo/mxnet/super_resolution_graph.png?raw=true"
    log.warning('download graph demo from {}'.format(image_url))
    graph_image = urllib.urlopen(image_url).read()
    with open(os.path.join(logdir, 'graph.jpg'), 'wb') as f:
        f.write(graph_image)
    log.warning('graph ready!')
github PaddlePaddle / VisualDL / visualdl / server / lib.py View on Github external
def _handler(key, func, *args, **kwargs):
        data = cache.get(key)
        if data is None:
            logger.warning('update cache %s' % key)
            data = func(*args, **kwargs)
            cache.set(key, data)
            return data
        return data
github PaddlePaddle / VisualDL / demo / vdl_scratch.py View on Github external
def download_graph_image():
    '''
    This is a scratch demo, it do not generate a ONNX proto, but just download an image
    that generated before to show how the graph frontend works.

    For real cases, just refer to README.
    '''
    import urllib
    image_url = "https://github.com/PaddlePaddle/VisualDL/blob/develop/demo/mxnet/super_resolution_graph.png?raw=true"
    log.warning('download graph demo from {}'.format(image_url))
    graph_image = urllib.urlopen(image_url).read()
    with open(os.path.join(logdir, 'graph.jpg'), 'wb') as f:
        f.write(graph_image)
    log.warning('graph ready!')