arthurai.core.inferences.nest_reference_data#
- arthurai.core.inferences.nest_reference_data(data, attributes)#
Reformat List of Dicts reference data to nest reference data as expected by the Arthur API. For example:
[ { "input_attr": 1.0, "ground_truth": 1, } ]
Will become:
[ { "reference_data": { "input_attr": 1.0, "ground_truth": 1, } } ]
- Parameters
data (
List
[Dict
[str
,Any
]]) – the reference data to reformat, either already nested or flatattributes (
List
[ArthurAttribute
]) – the model’s attributes
- Return type
List
[Dict
[str
,Any
]]- Returns
the nested data