How to use the ergo.version.banner.strip function in ergo

To help you get started, we’ve selected a few ergo 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 evilsocket / ergo / ergo / actions / info.py View on Github external
"tf_version": tf.__version__,
            'sklean_version': sklearn.__version__,
            "devices":[]
        }
        devs = device_lib.list_local_devices()
        for dev in devs:
            info['devices'].append({
                'name': dev.name,
                'type': dev.device_type,
                'memory': dev.memory_limit,
                'description': dev.physical_device_desc
            })
        
        print(json.dumps(info)) 
    else:
        print(banner.strip("\n") % (__version__, keras.__version__, tf.__version__, sklearn.__version__))
        print("")
        print("Hardware:\n")

        devs = device_lib.list_local_devices()
        npad, tpad  = get_pads(devs)
        for dev in devs:
            print( "%s (%s) - %s" % (dev.name.ljust(npad,' '), dev.device_type.ljust(tpad,' '), mem_fmt(dev.memory_limit)))