def validate_annotation_content(experiment_config, spec_key, builtin_name):
    '''
    Valid whether useAnnotation and searchSpacePath is coexist
    spec_key: 'advisor' or 'tuner'
    builtin_name: 'builtinAdvisorName' or 'builtinTunerName'
    '''
    if experiment_config.get('useAnnotation'):
        if experiment_config.get('searchSpacePath'):
            print_error('If you set useAnnotation=true, please leave searchSpacePath empty')
            exit(1)
    else:
        # validate searchSpaceFile
        if experiment_config[spec_key].get(builtin_name) == 'NetworkMorphism':
            return
        if experiment_config[spec_key].get(builtin_name):
            if experiment_config.get('searchSpacePath') is None:
                print_error('Please set searchSpacePath!')
                exit(1)
            validate_search_space_content(experiment_config)
def validate_annotation_content ( experiment_config , spec_key , builtin_name ) : if experiment_config . get ( 'useAnnotation' ) : if experiment_config . get ( 'searchSpacePath' ) : print_error ( 'If you set useAnnotation=true, please leave searchSpacePath empty' ) exit ( 1 ) else : if experiment_config [ spec_key ] . get ( builtin_name ) == 'NetworkMorphism' : return if experiment_config [ spec_key ] . get ( builtin_name ) : if experiment_config . get ( 'searchSpacePath' ) is None : print_error ( 'Please set searchSpacePath!' ) exit ( 1 ) validate_search_space_content ( experiment_config )
Valid whether useAnnotation and searchSpacePath is coexist
    spec_key: 'advisor' or 'tuner'
    builtin_name: 'builtinAdvisorName' or 'builtinTunerName'