File size: 337 Bytes
21c4e64
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
def merge_hparams(args, config):
    params = ["OptimizationParams", "ModelHiddenParams", "ModelParams", "PipelineParams"]
    for param in params:
        if param in config.keys():
            for key, value in config[param].items():
                if hasattr(args, key):
                    setattr(args, key, value)

    return args