Get rid of CUDA_VISIBLE_DEVICES
It is not clear to me what the purpose of this is, but it has recently started causing failures.
This commit is contained in:
parent
1de1fa30ac
commit
8f18b2709e
|
@ -8,11 +8,6 @@ Loader, Dumper = OrderedYaml()
|
||||||
def parse(opt_path, is_train=True):
|
def parse(opt_path, is_train=True):
|
||||||
with open(opt_path, mode='r') as f:
|
with open(opt_path, mode='r') as f:
|
||||||
opt = yaml.load(f, Loader=Loader)
|
opt = yaml.load(f, Loader=Loader)
|
||||||
# export CUDA_VISIBLE_DEVICES
|
|
||||||
if 'gpu_ids' in opt.keys():
|
|
||||||
gpu_list = ','.join(str(x) for x in opt['gpu_ids'])
|
|
||||||
os.environ['CUDA_VISIBLE_DEVICES'] = gpu_list
|
|
||||||
print('export CUDA_VISIBLE_DEVICES=' + gpu_list)
|
|
||||||
|
|
||||||
opt['is_train'] = is_train
|
opt['is_train'] = is_train
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user