diff --git a/macros/hooks/model_audit.sql b/macros/hooks/model_audit.sql index 74b4b36..d35fe2e 100644 --- a/macros/hooks/model_audit.sql +++ b/macros/hooks/model_audit.sql @@ -5,7 +5,7 @@ 'schema': 'string', 'created_at': type_timestamp(), 'training_info': 'array>>>', - 'feature_info': 'array>', + 'feature_info': 'array>', 'weights': 'array>>>', 'evaluate': 'array>', }) %} diff --git a/macros/materializations/model.sql b/macros/materializations/model.sql index 529692e..354a50d 100644 --- a/macros/materializations/model.sql +++ b/macros/materializations/model.sql @@ -19,18 +19,11 @@ {% endmacro %} {% macro model_options(ml_config, labels) %} - {%- if labels -%} - {%- set label_list = [] -%} - {%- for label, value in labels.items() -%} - {%- do label_list.append((label, value)) -%} - {%- endfor -%} - {%- do ml_config.update({'labels': label_list}) -%} - {%- endif -%} {% set options -%} options( {%- for opt_key, opt_val in ml_config.items() -%} - {%- if opt_val is sequence and not (opt_val | first) is number and (opt_val | first).startswith('hparam_') -%} + {%- if opt_val is sequence and (opt_val | first) is string and (opt_val | first).startswith('hparam_') -%} {{ opt_key }}={{ opt_val[0] }}({{ opt_val[1:] | join(', ') }}) {%- else -%} {{ opt_key }}={{ (opt_val | tojson) if opt_val is string else opt_val }}