(self, left_seg, right_seg)
return comparison.id
Creates a comparison DB object. Returns the db_id of the comparison
Creates a comparison DB object. Returns the db_id of the comparison
Creates a comparison DB object . Returns the db_id of the comparison
def _create_comparison_in_webapp(self, left_seg, right_seg):
        """Creates a comparison DB object. Returns the db_id of the comparison"""
        from human_feedback_api import Comparison

        comparison_uuid = str(uuid.uuid4())
        comparison = Comparison(
            experiment_name=self.experiment_name,
            media_url_1=self.convert_segment_to_media_url(comparison_uuid, 'left', left_seg),
            media_url_2=self.convert_segment_to_media_url(comparison_uuid, 'right', right_seg),
            response_kind='left_or_right',
            priority=1.
        )
        comparison.full_clean()
        comparison.save()
        return comparison.id
def _create_comparison_in_webapp ( self , left_seg , right_seg ) : from human_feedback_api import Comparison comparison_uuid = str ( uuid . uuid4 ( ) ) comparison = Comparison ( experiment_name = self . experiment_name , media_url_1 = self . convert_segment_to_media_url ( comparison_uuid , 'left' , left_seg ) , media_url_2 = self . convert_segment_to_media_url ( comparison_uuid , 'right' , right_seg ) , response_kind = 'left_or_right' , priority = 1. ) comparison . full_clean ( ) comparison . save ( ) return comparison . id