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

Method validate_label_file_id

shared/annotation.py:832–848  ·  view source on GitHub ↗

(self)

Source from the content-addressed store, hash-verified

830 assert self.allowed_label_file_id_list is not None
831
832 def validate_label_file_id(self):
833 """
834
835 """
836 if self.instance.label_file_id is None:
837 return True
838
839 if self.instance.label_file_id in self.allowed_label_file_id_list:
840 return True
841
842 if self.instance.type == "global":
843 self.instance.label_file_id = None # Ensure is None for Security
844 return True
845
846 self.log['error']['valid_label_file'] = "Label File ID" + \
847 str(self.instance.label_file_id) + f"does not belong to project {self.project.project_string_id}. Ensure you are using the correct label_file_id (and not the label ID). They are different!"
848 return False
849
850 def init_video_input(self):
851

Callers 1

instance_limitsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected