Ejemplo n.º 1
0
from plasma.conf_parser import parameters
from tensorflow.python.client import device_lib
import tensorflow as tf
import numpy as np
import os

print("Hello World")
print("\nNumpy version: ", np.__version__)
print("\nTensorflow version: ", tf.__version__)


def get_available_gpus():
    local_device_protos = device_lib.list_local_devices()
    return [x.name for x in local_device_protos if x.device_type == 'GPU']


print("\nList GPU devices availible: ")
get_available_gpus()
print(os.getcwd())

print("\nImport confiugurationfile: ")
conf = parameters("/home/wvdp/PPPLDeepLearning/slurm/MyConfigurations/conf_default.yaml")
print(conf)
Ejemplo n.º 2
0
from plasma.conf_parser import parameters
import os
import errno

if os.path.exists(os.path.join(os.path.abspath(os.path.dirname(__file__)), '../examples/conf.yaml')):
    conf = parameters(os.path.join(os.path.abspath(os.path.dirname(__file__)), '../examples/conf.yaml'))
elif os.path.exists('./conf.yaml'):
    conf = parameters('./conf.yaml')
elif os.path.exists('./examples/conf.yaml'):
    conf = parameters('./examples/conf.yaml')
elif os.path.exists('../examples/conf.yaml'):
    conf = parameters('../examples/conf.yaml')    
else:
    raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT), 'conf.yaml')
Ejemplo n.º 3
0
from plasma.conf_parser import parameters
import os
import errno

if os.path.exists(
        os.path.join(os.path.abspath(os.path.dirname(__file__)),
                     '../examples/conf.yaml')):
    conf = parameters(
        os.path.join(os.path.abspath(os.path.dirname(__file__)),
                     '../examples/conf.yaml'))
elif os.path.exists('./conf.yaml'):
    conf = parameters('./conf.yaml')
elif os.path.exists('./examples/conf.yaml'):
    conf = parameters('./examples/conf.yaml')
elif os.path.exists('../examples/conf.yaml'):
    conf = parameters('../examples/conf.yaml')
else:
    raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT),
                            'conf.yaml')
Ejemplo n.º 4
0
from plasma.conf_parser import parameters
import sys
conf_name = sys.argv[1]
conf = parameters("/home/wvdp/PPPLDeepLearning/slurm/MyConfigurations/" +
                  conf_name + ".yaml")
print(conf)
Ejemplo n.º 5
0
from plasma.conf_parser import parameters
import os
import errno
import sys

conf_file = "/tmp/conf.yaml"
if os.path.exists(conf_file):
    conf = parameters(conf_file)
else:
    raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT),
                            'conf.yaml')