MCPcopy Create free account
hub / github.com/apple/coremltools / _check_predict_data

Method _check_predict_data

coremltools/models/model.py:878–884  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

876
877 @staticmethod
878 def _check_predict_data(data):
879 if type(data) not in (list, dict):
880 raise TypeError(
881 f'"data" parameter must be either a dict or list of dict, but got {type(data)}.'
882 )
883 if type(data) == list and not all(map(lambda x: type(x) == dict, data)):
884 raise TypeError("\"data\" list must contain only dictionaries")
885
886
887 @staticmethod

Callers 2

predictMethod · 0.80
predictMethod · 0.80

Calls 2

TypeErrorClass · 0.85
typeFunction · 0.50

Tested by

no test coverage detected