forked from Nyquixt/AZ-Go
-
Notifications
You must be signed in to change notification settings - Fork 1
/
definitions.py
25 lines (20 loc) · 1.2 KB
/
definitions.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import os
import platform
"""
Definitions for common paths to configuration files.
"""
# General paths
ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) # path to project root
CONFIG_PATH = os.path.join(ROOT_DIR, 'configs/config.yaml') # path to config.yaml
SENS_CONFIG_PATH = os.path.join(ROOT_DIR, 'configs/sensitive.yaml') # path to sensitive_config.yaml
EXAMPLES_PATH = os.path.join(ROOT_DIR, 'logs/train_examples') # path to checkpoint example files
# Paths only used for distributed training
DIS_MODEL_PATH = os.path.join(ROOT_DIR, 'logs/checkpoints/') # path to store downloaded model to
DIS_EXAMPLE_PATH = os.path.join(ROOT_DIR,
'distributed/examples/') # path to location of examples generated by linux workers
# Directory notation is different on Windows, change accordingly
if platform.system() == "Windows":
CONFIG_PATH = os.path.join(ROOT_DIR, 'configs\config.yaml') # path to config.yaml
SENS_CONFIG_PATH = os.path.join(ROOT_DIR, 'configs\sensitive.yaml') # path to sensitive_config.yaml
DIS_MODEL_PATH = os.path.join(ROOT_DIR, 'logs/checkpoints/') # path to store downloaded model to
DIS_EXAMPLE_PATH = os.path.join(ROOT_DIR, 'distributed\examples\\')