Skip to content
Snippets Groups Projects
setup.py 1.18 KiB
Newer Older
rink's avatar
rink committed
# To support both python 2 and python 3
from __future__ import division, print_function, unicode_literals

import os
rink's avatar
rink committed

from pathlib import Path

# To plot pretty figures
import matplotlib.pyplot as plt
plt.rcParams['axes.labelsize'] = 14
plt.rcParams['xtick.labelsize'] = 12
plt.rcParams['ytick.labelsize'] = 12

from datetime import datetime

now = datetime.utcnow().strftime("%Y%m%d%H%M%S")

home_dir = str(Path.home())
root_logdir = home_dir+'/tf_logs'
logdir = "{}/run-{}/".format(root_logdir, now)

root_savedir = home_dir+'/tf_model'
modeldir = "{}/run-{}/".format(root_savedir, now)
tomrink's avatar
tomrink committed
ewa_varsdir = "{}/run_ewa_vars-{}/".format(root_savedir, now)
rink's avatar
rink committed

root_cachedir = home_dir+'/cache'
cachepath = "{}/run-{}".format(root_cachedir, now)
cachepath = cachepath+'.pkl'

try:
    user_paths = os.environ['PYTHONPATH'].split(os.pathsep)
    python_path = user_paths[0] + os.sep
    ancillary_path = python_path + 'ancillary' + os.sep
tomrink's avatar
tomrink committed
    model_path_day = python_path + 'tf_model_day' + os.sep
    model_path_night = python_path + 'tf_model_night' + os.sep
except KeyError:
    print('** PYTHONPATH must be defined! *')
    python_path = None

rink's avatar
rink committed
gpu_devices = {0: '/device:GPU:0', 1: '/device:GPU:1', 2: '/device:GPU:2'}