Skip to content

Commit 119d626

Browse files
committed
Fix hydra version issue for pretty-printing
1 parent 9cff20a commit 119d626

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

source-code/hydra/gen_rand.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/usr/bin/env python
22

33
import hydra
4+
5+
from omegaconf import OmegaConf
46
import logging
57
import numpy as np
68
import sys
@@ -10,7 +12,7 @@
1012
@hydra.main(version_base=None, config_path='conf/', config_name='config')
1113
def gen_rand(cfg):
1214
if cfg.verbose:
13-
print(cfg.pretty(), file=sys.stderr)
15+
print(OmegaConf.to_yaml(cfg), file=sys.stderr)
1416
if cfg.n <= 0:
1517
LOG.error(f'negative number to generate {cfg.n}')
1618
return 1

0 commit comments

Comments
 (0)