MCPcopy Index your code
hub / github.com/diffgram/diffgram / check_allowed_model_ids

Method check_allowed_model_ids

shared/annotation.py:1011–1025  ·  view source on GitHub ↗
(self, instance_list)

Source from the content-addressed store, hash-verified

1009 return result
1010
1011 def check_allowed_model_ids(self, instance_list):
1012 if not self.allowed_model_id_list:
1013 return True
1014 # Check for models
1015 for instance in instance_list:
1016 if instance.get('model_id') is None:
1017 continue
1018 if instance.get('model_id') not in self.allowed_model_id_list:
1019 self.log['error']['model_id'] = 'Invalid model_id {} allowed models are {}'.format(
1020 instance.get('model_id'),
1021 self.allowed_model_id_list
1022 )
1023 return False
1024
1025 return True
1026
1027 def check_allowed_model_run_ids(self, instance_list):
1028 if not self.allowed_model_run_id_list:

Callers 1

update_instance_listMethod · 0.95

Calls 1

getMethod · 0.45

Tested by

no test coverage detected