-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
49 lines (38 loc) · 1.61 KB
/
config.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
"""
This file defines global configuration of the project.
Casual usage of the package should not need to change this.
"""
import kcgof.glo as glo
import os
import torch
# All keys with prefix ex_ are only relevant for batch experiments i.e.,
# relevant to experiment scripts under kcgof/ex/
_default_config = {
# default torch data type
'torch_dtype': torch.double,
# default torch device
'torch_device': torch.device('cpu'),
# Full path to the directory to store temporary files when running
# experiments.
'ex_scratch_path': '/home/wittawat/tmp/kcgof',
# True or False. If False, just use for loop.
'ex_use_slurm_cluster': False,
# Slurm partitions.
# When using SlurmComputationEngine for running the experiments, the partitions (groups of computing nodes)
# can be specified here. Set to None to not set to any value (i.e., use the default partition).
# The value is a string. For more than one partition, set to, for instance, "wrkstn,compute".
'ex_slurm_partitions': None,
# Full path to the directory to store experimental results.
'ex_results_path': '/home/wittawat/results/kcgof',
# Full path to the root directory of the shared folder. This folder contains
# all resource files (e.g., data, trained models) that are released by the
# authors.
'shared_resource_path': '/is/ei/wittawat/Gdrive/kcgof_share/',
}
def set_default_config(config):
global _default_config
_default_config = config
def get_default_config():
# Keys with prefix ex_ are used only when scripts under kcgof/ex/ are
# executed.
return _default_config