Passing values for parameters/fields with any or anyof type in Python

When calling functions or creating objects w/ parameters/fields defined as “any” or “anyof”, you need to create the specific type before submitting. For metrics and arrays, you need to box your value with the appropriate Type. For example, when using the bindings field on EvalMetricsSpec you need to create a map type in your spec and pass the field value as:

"bindings": {"type" : "[map<string,string>]", "value" : [{"VARIABLE_NAME": "test1"}, {"VARIABLE_NAME": "test2"}]}

1 Like