select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21935927 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=21935870 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='metal' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21935927) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21935870) result : ((1349210437,), (1349210447,), (1349210472,), (1349210475,), (1349210478,), (1349210519,), (1349210520,), (1349210521,), (1349210522,), (1349210563,), (1349210567,), (1349210570,), (1349210571,), (1349210593,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21935928 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=21935870 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='environnement' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21935928) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21935870) result : ((1349210437,), (1349210447,), (1349210472,), (1349210475,), (1349210478,), (1349210519,), (1349210520,), (1349210521,), (1349210522,), (1349210563,), (1349210567,), (1349210570,), (1349210571,), (1349210593,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21935929 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=21935870 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='Teint_Dans_La_Masse' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21935929) result : ((1349210595,), (1349210596,), (1349210597,), (1349210598,), (1349210599,), (1349210600,), (1349210621,), (1349210622,), (1349210623,), (1349210624,), (1349210625,), (1349210626,), (1349210627,), (1349210629,), (1349210630,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21935870) result : ((1349210437,), (1349210447,), (1349210472,), (1349210475,), (1349210478,), (1349210519,), (1349210520,), (1349210521,), (1349210522,), (1349210563,), (1349210567,), (1349210570,), (1349210571,), (1349210593,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21935930 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=21935870 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='flou' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21935930) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21935870) result : ((1349210437,), (1349210447,), (1349210472,), (1349210475,), (1349210478,), (1349210519,), (1349210520,), (1349210521,), (1349210522,), (1349210563,), (1349210567,), (1349210570,), (1349210571,), (1349210593,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21935931 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=21935870 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='plastique' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21935931) result : ((1349210603,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21935870) result : ((1349210437,), (1349210447,), (1349210472,), (1349210475,), (1349210478,), (1349210519,), (1349210520,), (1349210521,), (1349210522,), (1349210563,), (1349210567,), (1349210570,), (1349210571,), (1349210593,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21935932 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=21935870 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='Carton_brun' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21935932) result : ((1349210636,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21935870) result : ((1349210437,), (1349210447,), (1349210472,), (1349210475,), (1349210478,), (1349210519,), (1349210520,), (1349210521,), (1349210522,), (1349210563,), (1349210567,), (1349210570,), (1349210571,), (1349210593,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21935870 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('cartonnette','flou','metal','plastique','autre_refus','mal_croppe','Carton_brun','kraft','Teint_Dans_La_Masse','environnement','Carton_gris','papier')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21935870 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('cartonnette','flou','metal','plastique','autre_refus','mal_croppe','Carton_brun','kraft','Teint_Dans_La_Masse','environnement','Carton_gris','papier')) AND mptpi.`min_score`=0.5 To do returned map {'cartonnette': {'main_port_id': 21935870, 'sub_port_id': 21935933, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14439704, 'last_updated_at': datetime.datetime(2025, 4, 1, 6, 33, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 6, 33, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 6, 33, 1)}, 'autre_refus': {'main_port_id': 21935870, 'sub_port_id': 21935934, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14439705, 'last_updated_at': datetime.datetime(2025, 4, 1, 6, 33, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 6, 33, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 6, 33, 1)}, 'kraft': {'main_port_id': 21935870, 'sub_port_id': 21935935, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14439706, 'last_updated_at': datetime.datetime(2025, 4, 1, 6, 33, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 6, 33, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 6, 33, 1)}, 'mal_croppe': {'main_port_id': 21935870, 'sub_port_id': 21935936, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14439707, 'last_updated_at': datetime.datetime(2025, 4, 1, 6, 33, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 6, 33, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 6, 33, 1)}, 'Carton_gris': {'main_port_id': 21935870, 'sub_port_id': 21935937, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14439708, 'last_updated_at': datetime.datetime(2025, 4, 1, 6, 33, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 6, 33, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 6, 33, 1)}, 'papier': {'main_port_id': 21935870, 'sub_port_id': 21935938, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14439709, 'last_updated_at': datetime.datetime(2025, 4, 1, 6, 33, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 6, 33, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 6, 33, 1)}, 'metal': {'main_port_id': 21935870, 'sub_port_id': 21935939, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14439710, 'last_updated_at': datetime.datetime(2025, 4, 1, 6, 33, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 6, 33, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 6, 33, 1)}, 'environnement': {'main_port_id': 21935870, 'sub_port_id': 21935940, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14439711, 'last_updated_at': datetime.datetime(2025, 4, 1, 6, 33, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 6, 33, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 6, 33, 1)}, 'Teint_Dans_La_Masse': {'main_port_id': 21935870, 'sub_port_id': 21935941, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14439712, 'last_updated_at': datetime.datetime(2025, 4, 1, 6, 33, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 6, 33, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 6, 33, 1)}, 'flou': {'main_port_id': 21935870, 'sub_port_id': 21935942, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14439713, 'last_updated_at': datetime.datetime(2025, 4, 1, 6, 33, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 6, 33, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 6, 33, 1)}, 'plastique': {'main_port_id': 21935870, 'sub_port_id': 21935943, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14439714, 'last_updated_at': datetime.datetime(2025, 4, 1, 6, 33, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 6, 33, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 6, 33, 1)}, 'Carton_brun': {'main_port_id': 21935870, 'sub_port_id': 21935944, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14439715, 'last_updated_at': datetime.datetime(2025, 4, 1, 6, 33, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 6, 33, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 6, 33, 1)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21935933,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21935921 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21935934,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21935922 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21935935,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21935923 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21935936,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21935924 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21935937,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21935925 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21935938,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21935926 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21935939,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21935927 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21935940,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21935928 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21935941,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21935929 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21935942,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21935930 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21935943,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21935931 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21935944,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21935932 lien utilise dans velours : https://www.fotonower.com/velours/21935933,21935934,21935935,21935936,21935937,21935938,21935939,21935940,21935941,21935942,21935943,21935944?tags=cartonnette,autre_refus,kraft,mal_croppe,Carton_gris,papier,metal,environnement,Teint_Dans_La_Masse,flou,plastique,Carton_brun After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21935870]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1349210593, 1349210571, 1349210570, 1349210567, 1349210563] map_info['map_portfolio_photo'] : {21935870: [1349210593, 1349210571, 1349210570, 1349210567, 1349210563, 1349210522, 1349210521, 1349210520, 1349210519, 1349210478, 1349210475, 1349210472, 1349210447, 1349210437]} final : False mtd_id 4302 list_pids : [1349210593, 1349210571, 1349210570, 1349210567, 1349210563] Looping around the photos to save general results len do output : 1 /21935870. before output type Here is an output not treated by saveGeneral : Managing all output in save final without adding information in the mtr_datou_result ('4302', None, None, None, None, None, None, None, '2711743') ('4302', '21935870', '1349210593', None, None, None, None, None, '2711743') ('4302', None, None, None, None, None, None, None, '2711743') ('4302', '21935870', '1349210571', None, None, None, None, None, '2711743') ('4302', None, None, None, None, None, None, None, '2711743') ('4302', '21935870', '1349210570', None, None, None, None, None, '2711743') ('4302', None, None, None, None, None, None, None, '2711743') ('4302', '21935870', '1349210567', None, None, None, None, None, '2711743') ('4302', None, None, None, None, None, None, None, '2711743') ('4302', '21935870', '1349210563', None, None, None, None, None, '2711743') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 6 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '21935870', "{'cartonnette': 21935921, 'autre_refus': 21935922, 'kraft': 21935923, 'mal_croppe': 21935924, 'Carton_gris': 21935925, 'papier': 21935926, 'metal': 21935927, 'environnement': 21935928, 'Teint_Dans_La_Masse': 21935929, 'flou': 21935930, 'plastique': 21935931, 'Carton_brun': 21935932}", None, None, None, None, '2711743'), ('4302', '21935870', '1349210593', None, None, None, None, None, '2711743'), ('4302', '21935870', '1349210571', None, None, None, None, None, '2711743'), ('4302', '21935870', '1349210570', None, None, None, None, None, '2711743'), ('4302', '21935870', '1349210567', None, None, None, None, None, '2711743'), ('4302', '21935870', '1349210563', None, None, None, None, None, '2711743')] time used for this insertion : 0.015231847763061523 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.5099422931671143 time spend to save output : 0.015504837036132812 total time spend for step 1 : 2.525447130203247 step2:final Tue Apr 1 06:35:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21935870) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} Beginning of datou step final ! query to retrieve results for portfolio 21935870 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1349210478,1349210475,1349210472,1349210447,1349210437,1349210522,1349210521,1349210520,1349210519,1349210571,1349210570,1349210567,1349210563,1349210593); insert ignore into MTRUser.portfolio_carac_ratio (portfolio_id, hashtag_type, hashtag_id, value) values (%s,%s,%s,%s) on DUPLICATE KEY UPDATE value=VALUES(value) After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21935870]) Inside saveOutput : final : False verbose : True original output for save of step final : {1349210593: ('0.05298192131335973',), 1349210571: ('0.05298192131335973',), 1349210570: ('0.05298192131335973',), 1349210567: ('0.05298192131335973',), 1349210563: ('0.05298192131335973',)} new output for save of step final : {1349210593: ('0.05298192131335973',), 1349210571: ('0.05298192131335973',), 1349210570: ('0.05298192131335973',), 1349210567: ('0.05298192131335973',), 1349210563: ('0.05298192131335973',)} [1349210593, 1349210571, 1349210570, 1349210567, 1349210563] map_info['map_portfolio_photo'] : {21935870: [1349210593, 1349210571, 1349210570, 1349210567, 1349210563, 1349210522, 1349210521, 1349210520, 1349210519, 1349210478, 1349210475, 1349210472, 1349210447, 1349210437]} final : False mtd_id 4302 list_pids : [1349210593, 1349210571, 1349210570, 1349210567, 1349210563] Looping around the photos to save general results len do output : 5 /1349210593.Didn't retrieve data . /1349210571.Didn't retrieve data . /1349210570.Didn't retrieve data . /1349210567.Didn't retrieve data . /1349210563.Didn't retrieve data . before output type Used above Used above Managing all output in save final without adding information in the mtr_datou_result ('4302', None, None, None, None, None, None, None, '2711743') ('4302', '21935870', '1349210593', None, None, None, None, None, '2711743') ('4302', None, None, None, None, None, None, None, '2711743') ('4302', '21935870', '1349210571', None, None, None, None, None, '2711743') ('4302', None, None, None, None, None, None, None, '2711743') ('4302', '21935870', '1349210570', None, None, None, None, None, '2711743') ('4302', None, None, None, None, None, None, None, '2711743') ('4302', '21935870', '1349210567', None, None, None, None, None, '2711743') ('4302', None, None, None, None, None, None, None, '2711743') ('4302', '21935870', '1349210563', None, None, None, None, None, '2711743') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 15 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '21935870', '1349210593', '0.05298192131335973', None, None, None, None, '2711743'), ('4302', '21935870', '1349210571', '0.05298192131335973', None, None, None, None, '2711743'), ('4302', '21935870', '1349210570', '0.05298192131335973', None, None, None, None, '2711743'), ('4302', '21935870', '1349210567', '0.05298192131335973', None, None, None, None, '2711743'), ('4302', '21935870', '1349210563', '0.05298192131335973', None, None, None, None, '2711743')] time used for this insertion : 0.014776468276977539 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.0643320083618164 time spend to save output : 0.015073537826538086 total time spend for step 2 : 0.07940554618835449 step3:velours_tree Tue Apr 1 06:35:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {21935870: [{'cartonnette': 21935921, 'autre_refus': 21935922, 'kraft': 21935923, 'mal_croppe': 21935924, 'Carton_gris': 21935925, 'papier': 21935926, 'metal': 21935927, 'environnement': 21935928, 'Teint_Dans_La_Masse': 21935929, 'flou': 21935930, 'plastique': 21935931, 'Carton_brun': 21935932}]} input_args_next_step : {21935870: ()} output_args : {21935870: [{'cartonnette': 21935921, 'autre_refus': 21935922, 'kraft': 21935923, 'mal_croppe': 21935924, 'Carton_gris': 21935925, 'papier': 21935926, 'metal': 21935927, 'environnement': 21935928, 'Teint_Dans_La_Masse': 21935929, 'flou': 21935930, 'plastique': 21935931, 'Carton_brun': 21935932}]} args : 21935870 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'cartonnette': 21935921, 'autre_refus': 21935922, 'kraft': 21935923, 'mal_croppe': 21935924, 'Carton_gris': 21935925, 'papier': 21935926, 'metal': 21935927, 'environnement': 21935928, 'Teint_Dans_La_Masse': 21935929, 'flou': 21935930, 'plastique': 21935931, 'Carton_brun': 21935932},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21935870) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} can't find the photo_desc_type After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21935870]) Inside saveOutput : final : False verbose : True ouput is None No outpout to save, returning out of save general time spend for datou_step_exec : 0.5425004959106445 time spend to save output : 5.626678466796875e-05 total time spend for step 3 : 0.5425567626953125 step4:send_mail_cod Tue Apr 1 06:35:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1349210593: ('0.05298192131335973',), 1349210571: ('0.05298192131335973',), 1349210570: ('0.05298192131335973',), 1349210567: ('0.05298192131335973',), 1349210563: ('0.05298192131335973',)} input_args_next_step : {1349210593: ()} output_args : {1349210593: ('0.05298192131335973',), 1349210571: ('0.05298192131335973',), 1349210570: ('0.05298192131335973',), 1349210567: ('0.05298192131335973',), 1349210563: ('0.05298192131335973',)} args : 1349210593 depend.output_id : 0 input_args_next_step : {1349210593: ('0.05298192131335973',), 1349210571: ()} output_args : {1349210593: ('0.05298192131335973',), 1349210571: ('0.05298192131335973',), 1349210570: ('0.05298192131335973',), 1349210567: ('0.05298192131335973',), 1349210563: ('0.05298192131335973',)} args : 1349210571 depend.output_id : 0 input_args_next_step : {1349210593: ('0.05298192131335973',), 1349210571: ('0.05298192131335973',), 1349210570: ()} output_args : {1349210593: ('0.05298192131335973',), 1349210571: ('0.05298192131335973',), 1349210570: ('0.05298192131335973',), 1349210567: ('0.05298192131335973',), 1349210563: ('0.05298192131335973',)} args : 1349210570 depend.output_id : 0 input_args_next_step : {1349210593: ('0.05298192131335973',), 1349210571: ('0.05298192131335973',), 1349210570: ('0.05298192131335973',), 1349210567: ()} output_args : {1349210593: ('0.05298192131335973',), 1349210571: ('0.05298192131335973',), 1349210570: ('0.05298192131335973',), 1349210567: ('0.05298192131335973',), 1349210563: ('0.05298192131335973',)} args : 1349210567 depend.output_id : 0 input_args_next_step : {1349210593: ('0.05298192131335973',), 1349210571: ('0.05298192131335973',), 1349210570: ('0.05298192131335973',), 1349210567: ('0.05298192131335973',), 1349210563: ()} output_args : {1349210593: ('0.05298192131335973',), 1349210571: ('0.05298192131335973',), 1349210570: ('0.05298192131335973',), 1349210567: ('0.05298192131335973',), 1349210563: ('0.05298192131335973',)} args : 1349210563 depend.output_id : 0 Inconsistent number of input and output, step which parrallelize and manage error in input by avoiding sending an output for this data can't be used in tree dependencies of input and output complete output_args for input 3 : {21935870: [{'cartonnette': 21935921, 'autre_refus': 21935922, 'kraft': 21935923, 'mal_croppe': 21935924, 'Carton_gris': 21935925, 'papier': 21935926, 'metal': 21935927, 'environnement': 21935928, 'Teint_Dans_La_Masse': 21935929, 'flou': 21935930, 'plastique': 21935931, 'Carton_brun': 21935932}]} input_args_next_step : {1349210593: ('0.05298192131335973',), 1349210571: ('0.05298192131335973',), 1349210570: ('0.05298192131335973',), 1349210567: ('0.05298192131335973',), 1349210563: ('0.05298192131335973',), 21935870: ()} output_args : {21935870: [{'cartonnette': 21935921, 'autre_refus': 21935922, 'kraft': 21935923, 'mal_croppe': 21935924, 'Carton_gris': 21935925, 'papier': 21935926, 'metal': 21935927, 'environnement': 21935928, 'Teint_Dans_La_Masse': 21935929, 'flou': 21935930, 'plastique': 21935931, 'Carton_brun': 21935932}]} args : 21935870 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :6, first value : ('0.05298192131335973',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21935870) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos ph WHERE photo_id IN (1349210593,1349210571,1349210570,1349210567,1349210563) Found this number of photos: 5 ##### Call download_photos : nb_thread : 5 begin to download photo : 1349210563 begin to download photo : 1349210570 begin to download photo : 1349210593 download finish for photo 1349210563 begin to download photo : 1349210567 download finish for photo 1349210570 begin to download photo : 1349210571 download finish for photo 1349210593 download finish for photo 1349210571 download finish for photo 1349210567 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos length of list_filenames : 5 ; length of list_pids : 5 ; length of list_args : 5 results_Auto_P21935870_01-04-2025_06_35_01.pdf 21935921 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=21935921 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349210602: '1743482007_1926851_1349210519_81ab827b29129a9670de3bc3a78d1e8e_rle_crop_3742332464_0.png'} change filename to text .imagette219359211743482101/ imagette219359211743482101/1743482007_1926851_1349210519_81ab827b29129a9670de3bc3a78d1e8e_rle_crop_3742332464_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/5960c6f13772c1b717c4ea4d2d4d40dd_28093380.png imagette219359211743482101 21935922 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=21935922 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349210601: '1743482007_1926851_1349210520_8c4240f4d4c87afc0f71d5a693cf36bf_rle_crop_3742332449_0.png', 1349210632: '1743482030_4176266_1349210522_239552ac961593a90a0ca097dd50e848_rle_crop_3742332651_0.png', 1349210633: '1743482030_4176266_1349210478_05cc6629356914122202eb3e52ef3d62_rle_crop_3742332668_0.png', 1349210634: '1743482030_4176266_1349210475_9cc8650dd9cbb32b922881d5d05015fc_rle_crop_3742332706_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/36a592b03b8657359fb657007c9f690a_6701126.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/d8a89115f181c14da4d1110685617492_55242674.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/66718d8843bf64c297cc613da8b25556_2246285.png change filename to text .imagette219359221743482101/ imagette219359221743482101/1743482007_1926851_1349210520_8c4240f4d4c87afc0f71d5a693cf36bf_rle_crop_3742332449_0.png.png imagette219359221743482101/1743482030_4176266_1349210522_239552ac961593a90a0ca097dd50e848_rle_crop_3742332651_0.png.png imagette219359221743482101/1743482030_4176266_1349210475_9cc8650dd9cbb32b922881d5d05015fc_rle_crop_3742332706_0.png.png imagette219359221743482101/1743482030_4176266_1349210478_05cc6629356914122202eb3e52ef3d62_rle_crop_3742332668_0.png.png imagette219359231743482101/ imagette219359241743482101/ imagette219359271743482101/ imagette219359301743482101/ wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/e09672175030d7cbf480c3e014307b1e_88541410.png imagette219359221743482101 21935923 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=21935923 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette219359231743482101 21935924 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=21935924 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette219359241743482101 21935927 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=21935927 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette219359271743482101 21935930 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=21935930 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette219359301743482101 21935931 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=21935931 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349210603: '1743482007_1926851_1349210519_81ab827b29129a9670de3bc3a78d1e8e_rle_crop_3742332471_0.png'} change filename to text .imagette219359311743482101/ imagette219359311743482101/1743482007_1926851_1349210519_81ab827b29129a9670de3bc3a78d1e8e_rle_crop_3742332471_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/ce4fbf7f42c05b64cf39b159b25e191b_45537478.png imagette219359311743482101 21935925 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=21935925 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349210635: '1743482030_4176266_1349210472_db9865f2b3915632f2e3935c16783304_rle_crop_3742332718_0.png'} change filename to text .imagette219359251743482101/ imagette219359251743482101/1743482030_4176266_1349210472_db9865f2b3915632f2e3935c16783304_rle_crop_3742332718_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/6f16ae4639a443ad4ce395fd35f31762_28192248.png imagette219359251743482101 21935929 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=21935929 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349210595: '1743482007_1926851_1349210521_6354074bb3358ba6508506236534df58_rle_crop_3742332445_0.png', 1349210596: '1743482007_1926851_1349210521_6354074bb3358ba6508506236534df58_rle_crop_3742332443_0.png', 1349210597: '1743482007_1926851_1349210520_8c4240f4d4c87afc0f71d5a693cf36bf_rle_crop_3742332459_0.png', 1349210598: '1743482007_1926851_1349210520_8c4240f4d4c87afc0f71d5a693cf36bf_rle_crop_3742332454_0.png', 1349210599: '1743482007_1926851_1349210520_8c4240f4d4c87afc0f71d5a693cf36bf_rle_crop_3742332453_0.png', 1349210600: '1743482007_1926851_1349210519_81ab827b29129a9670de3bc3a78d1e8e_rle_crop_3742332465_0.png', 1349210621: '1743482030_4176266_1349210522_239552ac961593a90a0ca097dd50e848_rle_crop_3742332659_0.png', 1349210622: '1743482030_4176266_1349210447_a2849c7fa5c8fcf62b2e137bc2dde76c_rle_crop_3742332737_0.png', 1349210623: '1743482030_4176266_1349210447_a2849c7fa5c8fcf62b2e137bc2dde76c_rle_crop_3742332735_0.png', 1349210624: '1743482030_4176266_1349210447_a2849c7fa5c8fcf62b2e137bc2dde76c_rle_crop_3742332728_0.png', 1349210625: '1743482030_4176266_1349210447_a2849c7fa5c8fcf62b2e137bc2dde76c_rle_crop_3742332731_0.png', 1349210626: '1743482030_4176266_1349210447_a2849c7fa5c8fcf62b2e137bc2dde76c_rle_crop_3742332733_0.png', 1349210627: '1743482030_4176266_1349210437_c9d45008022d62d6a20e80df584874b6_rle_crop_3742332744_0.png', 1349210629: '1743482030_4176266_1349210437_c9d45008022d62d6a20e80df584874b6_rle_crop_3742332749_0.png', 1349210630: '1743482030_4176266_1349210437_c9d45008022d62d6a20e80df584874b6_rle_crop_3742332745_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/a2eccda5ea1edb8d26369a33b9a9c35b_95039697.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/7afd10efa7c060875e1cc256f6f8ea1b_60457017.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/4a0dedf7734babb247eeb6ec475855ba_32216093.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/f2c95cb5bde9c5f2575a8c37fff2565e_28713134.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/b0c59b1d4e0acb18b369e049e3e7c093_230795.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/2f67f9b44f41a445f4d829f920a340b9_39030754.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/535b8124f5c76ae9f17cbd5d74cc4143_13965199.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/0448f29e836da9cc2e3f92167fa16066_99947190.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/e44ebf1a29d9026b9033c83f4ecdfac7_57836167.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/da4d358f53e7622101493d8df463c5d1_28762558.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/75fea1231486771c5b8d2b0b95aaf529_50848245.png change filename to text .wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/37eceef4fd4b8edaf78e084aa96ee65e_8392769.png change filename to text .wget -O 13.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/03e6e481b2cd5da9ac4ed18dfd21535c_36379462.png change filename to text .wget -O 14.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/644b84dceefbdc492e33f4634de3a3a3_16466787.png change filename to text .imagette219359291743482101/ imagette219359291743482101/1743482030_4176266_1349210447_a2849c7fa5c8fcf62b2e137bc2dde76c_rle_crop_3742332731_0.png.png imagette219359291743482101/1743482007_1926851_1349210520_8c4240f4d4c87afc0f71d5a693cf36bf_rle_crop_3742332459_0.png.png imagette219359291743482101/1743482007_1926851_1349210519_81ab827b29129a9670de3bc3a78d1e8e_rle_crop_3742332465_0.png.png imagette219359291743482101/1743482030_4176266_1349210447_a2849c7fa5c8fcf62b2e137bc2dde76c_rle_crop_3742332735_0.png.png imagette219359291743482101/1743482030_4176266_1349210447_a2849c7fa5c8fcf62b2e137bc2dde76c_rle_crop_3742332728_0.png.png imagette219359291743482101/1743482030_4176266_1349210522_239552ac961593a90a0ca097dd50e848_rle_crop_3742332659_0.png.png imagette219359291743482101/1743482007_1926851_1349210520_8c4240f4d4c87afc0f71d5a693cf36bf_rle_crop_3742332453_0.png.png imagette219359291743482101/1743482007_1926851_1349210521_6354074bb3358ba6508506236534df58_rle_crop_3742332443_0.png.png imagette219359291743482101/1743482030_4176266_1349210447_a2849c7fa5c8fcf62b2e137bc2dde76c_rle_crop_3742332733_0.png.png imagette219359291743482101/1743482030_4176266_1349210437_c9d45008022d62d6a20e80df584874b6_rle_crop_3742332744_0.png.png imagette219359291743482101/1743482030_4176266_1349210447_a2849c7fa5c8fcf62b2e137bc2dde76c_rle_crop_3742332737_0.png.png imagette219359291743482101/1743482030_4176266_1349210437_c9d45008022d62d6a20e80df584874b6_rle_crop_3742332745_0.png.png imagette219359291743482101/1743482007_1926851_1349210521_6354074bb3358ba6508506236534df58_rle_crop_3742332445_0.png.png imagette219359291743482101/1743482030_4176266_1349210437_c9d45008022d62d6a20e80df584874b6_rle_crop_3742332749_0.png.png imagette219359291743482101/1743482007_1926851_1349210520_8c4240f4d4c87afc0f71d5a693cf36bf_rle_crop_3742332454_0.png.png wget -O 15.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/4f8a20cf3b3409d8714315e45638de3a_35180733.png imagette219359291743482101 21935932 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=21935932 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349210636: '1743482030_4176266_1349210522_239552ac961593a90a0ca097dd50e848_rle_crop_3742332653_0.png'} change filename to text .imagette219359321743482104/ imagette219359321743482104/1743482030_4176266_1349210522_239552ac961593a90a0ca097dd50e848_rle_crop_3742332653_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/3470929a0376f5106e6b886137f59156_58277801.png imagette219359321743482104 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=21935870 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/21935933,21935934,21935935,21935936,21935937,21935938,21935939,21935940,21935941,21935942,21935943,21935944?tags=cartonnette,autre_refus,kraft,mal_croppe,Carton_gris,papier,metal,environnement,Teint_Dans_La_Masse,flou,plastique,Carton_brun your option no_mail is active, we will not send the real mail to your client args[1349210593] : ('0.05298192131335973',) no score found for photo 1349210593 We are sending mail with results at report@fotonower.com args[1349210571] : ('0.05298192131335973',) no score found for photo 1349210571 We are sending mail with results at report@fotonower.com args[1349210570] : ('0.05298192131335973',) no score found for photo 1349210570 We are sending mail with results at report@fotonower.com args[1349210567] : ('0.05298192131335973',) no score found for photo 1349210567 We are sending mail with results at report@fotonower.com args[1349210563] : ('0.05298192131335973',) no score found for photo 1349210563 We are sending mail with results at report@fotonower.com refus_total : 0.05298192131335973 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=21935870 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 1000 start upload file to ovh https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21935870_01-04-2025_06_35_01.pdf results_Auto_P21935870_01-04-2025_06_35_01.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21935870_01-04-2025_06_35_01.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','21935870','results_Auto_P21935870_01-04-2025_06_35_01.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21935870_01-04-2025_06_35_01.pdf','pdf','','0.13','0.05298192131335973') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21935870]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1349210593, 1349210571, 1349210570, 1349210567, 1349210563] map_info['map_portfolio_photo'] : {21935870: [1349210593, 1349210571, 1349210570, 1349210567, 1349210563, 1349210522, 1349210521, 1349210520, 1349210519, 1349210478, 1349210475, 1349210472, 1349210447, 1349210437]} final : False mtd_id 4302 list_pids : [1349210593, 1349210571, 1349210570, 1349210567, 1349210563] Looping around the photos to save general results len do output : 0 before output type Used above Managing all output in save final without adding information in the mtr_datou_result ('4302', None, None, None, None, None, None, None, '2711743') ('4302', '21935870', '1349210593', None, None, None, None, None, '2711743') ('4302', None, None, None, None, None, None, None, '2711743') ('4302', '21935870', '1349210571', None, None, None, None, None, '2711743') ('4302', None, None, None, None, None, None, None, '2711743') ('4302', '21935870', '1349210570', None, None, None, None, None, '2711743') ('4302', None, None, None, None, None, None, None, '2711743') ('4302', '21935870', '1349210567', None, None, None, None, None, '2711743') ('4302', None, None, None, None, None, None, None, '2711743') ('4302', '21935870', '1349210563', None, None, None, None, None, '2711743') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 5 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '21935870', '1349210593', None, None, None, None, None, '2711743'), ('4302', '21935870', '1349210571', None, None, None, None, None, '2711743'), ('4302', '21935870', '1349210570', None, None, None, None, None, '2711743'), ('4302', '21935870', '1349210567', None, None, None, None, None, '2711743'), ('4302', '21935870', '1349210563', None, None, None, None, None, '2711743')] time used for this insertion : 0.01673269271850586 save_final save missing photos in datou_result : time spend for datou_step_exec : 5.201374292373657 time spend to save output : 0.01696467399597168 total time spend for step 4 : 5.218338966369629 step5:split_time_score Tue Apr 1 06:35:06 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['21935870'] We expect there is only one output and this part is used while all output are not tuple or array Inconsistent number of input and output, step which parrallelize and manage error in input by avoiding sending an output for this data can't be used in tree dependencies of input and output complete output_args for input 1 : VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : [('21935870',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21935870) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1349210593: {'path': 'temp/1743482101_3360936_1349210593_3857bcf3314b4b5494459f3bad627adb.jpg', 'extension': 'jpg'}, 1349210570: {'path': 'temp/1743482101_3360936_1349210570_66c9c3077ea78f62981b33892215090c.jpg', 'extension': 'jpg'}, 1349210571: {'path': 'temp/1743482101_3360936_1349210571_05e993f5d3305c184af325fe0d90c4b4.jpg', 'extension': 'jpg'}, 1349210563: {'path': 'temp/1743482101_3360936_1349210563_7955d18949a62ffe5130eb7046247122.jpg', 'extension': 'jpg'}, 1349210567: {'path': 'temp/1743482101_3360936_1349210567_a9e162a2cf1c0696e02628d37584f091.jpg', 'extension': 'jpg'}} map_subphoto_mainphoto : {} begin split time score SELECT app_name, token FROM MTRUser.mtr_app_api_token WHERE mtr_user_id=979 AND app_name="token_split_time_score" AND expire_at > NOW() select distinct dp.name from MTRPhoto.dashboard_entry_day ded, MTRPhoto.dashboard_places dp, MTRPhoto.dashboard_results dr where ded.dashboard_place_id = dp.id and ded.last_run_id = dr.dashboard_run_id and dp.id = ded.dashboard_place_id and dr.mtr_portfolio_id = 21935870; (('arc_en_ciel_jrm',),) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 21935870 group by h (('06', 14),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=21935870 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 100000 SELECT cps.photo_id, cps.score, h.hashtag, cps.hashtag_id, mpp1.mtr_portfolio_id FROM MTRPhoto.class_photo_score cps, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp1 where mpp1.mtr_photo_id=cps.photo_id AND h.hashtag_id=cps.hashtag_id AND mpp1.hide_status=0 AND mpp1.mtr_portfolio_id in (21935870) AND cps.thcl in (861) order by cps.score desc LIMIT 0, 100000 SELECT cps.photo_id, cps.score, h.hashtag, cps.hashtag_id, mpp1.mtr_portfolio_id FROM MTRPhoto.class_photo_score cps, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp1 where mpp1.mtr_photo_id=cps.photo_id AND h.hashtag_id=cps.hashtag_id AND mpp1.hide_status=0 AND mpp1.mtr_portfolio_id in (21935870) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 01042025 21935870 Nombre de photos uploadées : 14 / 23040 (0%) 01042025 21935870 Nombre de photos taguées (types de déchets): 0 / 14 (0%) 01042025 21935870 Nombre de photos taguées (volume) : 0 / 14 (0%) [{'photo_id': 1349210478, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/05cc6629356914122202eb3e52ef3d62.jpg', 'username': None, 'uploaded_at': 1743481868, 'text': 'image_01042025_06_30_05_10172.jpg'}, {'photo_id': 1349210475, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/9cc8650dd9cbb32b922881d5d05015fc.jpg', 'username': None, 'uploaded_at': 1743481868, 'text': 'image_01042025_06_30_14_9129.jpg'}, {'photo_id': 1349210472, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/db9865f2b3915632f2e3935c16783304.jpg', 'username': None, 'uploaded_at': 1743481868, 'text': 'image_01042025_06_30_24_10134.jpg'}, {'photo_id': 1349210447, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/a2849c7fa5c8fcf62b2e137bc2dde76c.jpg', 'username': None, 'uploaded_at': 1743481868, 'text': 'image_01042025_06_30_34_10140.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.430511474609375e-06 elapsed_time : order_list_meta_photo_and_scores 4.76837158203125e-06 ?????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0007028579711914062 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 21935870, '2025-04-01' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1705632,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.02826857566833496 We will return after consolidate but for now we need the day, how to get it, for now depending on the previous heavy steps SELECT dri.dashboard_entry_day, dr.dashboard_run_id, dr.mtr_portfolio_id, dr.id, dr.hashtag, dr.completion_json FROM MTRPhoto.dashboard_results dr, MTRPhoto.dashboard_run_ids dri, MTRPhoto.dashboard_entry_day ded WHERE ded.id= 1705632 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1705632, 'dashboard_run_id': 1713875, 'mtr_portfolio_id': 21934417, 'dashboard_result_id': 9778777, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21934417_01-04-2025_06_03_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 21934420, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21934421, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21934422, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21934423, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21934424, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21934425, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21934426, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21934427, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21934428, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21934429, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21934430, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21934431, 'pht': 3726}}"}, {'dashboat_entry_day': 1705632, 'dashboard_run_id': 1713875, 'mtr_portfolio_id': 21934914, 'dashboard_result_id': 9778778, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21934914_01-04-2025_06_20_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21934963, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21934964, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21934965, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21934966, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21934967, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21934968, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21934969, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21934970, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21934971, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21934972, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21934973, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21934974, 'pht': 3726}}"}, {'dashboat_entry_day': 1705632, 'dashboard_run_id': 1713875, 'mtr_portfolio_id': 21935562, 'dashboard_result_id': 9778779, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21935562_01-04-2025_06_33_02.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21935589, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21935590, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21935591, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21935592, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21935593, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21935594, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21935595, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21935596, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21935597, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21935598, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21935599, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21935600, 'pht': 3726}}"}, {'dashboat_entry_day': 1705632, 'dashboard_run_id': 1713875, 'mtr_portfolio_id': 21935870, 'dashboard_result_id': 9778780, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21935870_01-04-2025_06_33_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21935921, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21935922, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21935923, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21935924, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21935925, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21935926, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21935927, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21935928, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21935929, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21935930, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21935931, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21935932, 'pht': 3726}}"}] SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 21934417 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 2711638, 'mtr_portfolio_id': 21934417, 'created_at': datetime.datetime(2025, 4, 1, 6, 2, 59), 'result': '0.04317725021261593', 'result_long': None, 'result_double': None}] Qualite : 0.04317725021261593 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21934417 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21934417_01-04-2025_06_03_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21934417 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21934417_01-04-2025_06_03_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 21934420, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21934421, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21934422, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21934423, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21934424, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21934425, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21934426, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21934427, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21934428, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21934429, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21934430, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21934431, 'pht': 3726}}" where mtr_portfolio_id = 21934417 and dashboard_run_id = 1713875 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21934417 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9778777, 0.04317725021261593, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21934417_01-04-2025_06_03_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 21934420, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21934421, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21934422, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21934423, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21934424, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21934425, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21934426, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21934427, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21934428, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21934429, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21934430, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21934431, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 21934914 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 2711684, 'mtr_portfolio_id': 21934914, 'created_at': datetime.datetime(2025, 4, 1, 6, 20, 59), 'result': '0.06418167610118711', 'result_long': None, 'result_double': None}] Qualite : 0.06418167610118711 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21934914 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21934914_01-04-2025_06_20_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21934914 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21934914_01-04-2025_06_20_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21934963, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21934964, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21934965, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21934966, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21934967, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21934968, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21934969, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21934970, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21934971, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21934972, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21934973, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21934974, 'pht': 3726}}" where mtr_portfolio_id = 21934914 and dashboard_run_id = 1713875 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21934914 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9778778, 0.06418167610118711, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21934914_01-04-2025_06_20_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21934963, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21934964, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21934965, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21934966, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21934967, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21934968, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21934969, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21934970, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21934971, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21934972, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21934973, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21934974, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 21935562 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 2711718, 'mtr_portfolio_id': 21935562, 'created_at': datetime.datetime(2025, 4, 1, 6, 33, 1), 'result': '0.059926937124881854', 'result_long': None, 'result_double': None}] Qualite : 0.059926937124881854 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21935562 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21935562_01-04-2025_06_33_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21935562 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21935562_01-04-2025_06_33_02.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21935589, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21935590, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21935591, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21935592, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21935593, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21935594, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21935595, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21935596, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21935597, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21935598, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21935599, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21935600, 'pht': 3726}}" where mtr_portfolio_id = 21935562 and dashboard_run_id = 1713875 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21935562 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9778779, 0.059926937124881854, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21935562_01-04-2025_06_33_02.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21935589, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21935590, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21935591, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21935592, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21935593, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21935594, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21935595, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21935596, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21935597, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21935598, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21935599, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21935600, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 21935870 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 2711743, 'mtr_portfolio_id': 21935870, 'created_at': datetime.datetime(2025, 4, 1, 6, 35), 'result': '0.05298192131335973', 'result_long': None, 'result_double': None}] Qualite : 0.05298192131335973 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21935870 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21935870_01-04-2025_06_35_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21935870 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21935870_01-04-2025_06_35_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21935921, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21935922, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21935923, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21935924, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21935925, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21935926, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21935927, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21935928, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21935929, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21935930, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21935931, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21935932, 'pht': 3726}}" where mtr_portfolio_id = 21935870 and dashboard_run_id = 1713875 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21935870 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9778780, 0.05298192131335973, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21935870_01-04-2025_06_35_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21935921, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21935922, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21935923, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21935924, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21935925, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21935926, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21935927, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21935928, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21935929, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21935930, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21935931, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21935932, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21934417,21934914,21935562,21935870) result : ((1349206106,), (1349206112,), (1349206113,), (1349206114,), (1349206142,), (1349206150,), (1349206168,), (1349206213,), (1349206215,), (1349206216,), (1349206233,), (1349206234,), (1349206235,), (1349206236,), (1349206327,), (1349206332,), (1349206334,), (1349206336,), (1349206377,), (1349206381,), (1349206382,), (1349206384,), (1349206386,), (1349206392,), (1349206394,), (1349206396,), (1349206414,), (1349206419,), (1349206429,), (1349206431,), (1349206432,), (1349206433,), (1349206437,), (1349206439,), (1349206441,), (1349206442,), (1349206526,), (1349206527,), (1349206528,), (1349206529,), (1349206531,), (1349206539,), (1349206541,), (1349206542,), (1349206544,), (1349206558,), (1349206560,), (1349206564,), (1349206566,), (1349206568,), (1349206570,), (1349206581,), (1349206587,), (1349206588,), (1349206591,), (1349206600,), (1349206616,), (1349206618,), (1349206620,), (1349206622,), (1349207034,), (1349207102,), (1349207193,), (1349207246,), (1349207296,), (1349207887,), (1349207683,), (1349207759,), (1349207834,), (1349208290,), (1349208325,), (1349208371,), (1349208399,), (1349208426,), (1349208566,), (1349208570,), (1349208574,), (1349208588,), (1349208615,), (1349208649,), (1349208805,), (1349208810,), (1349208823,), (1349208828,), (1349208848,), (1349208852,), (1349208856,), (1349208887,), (1349208893,), (1349208908,), (1349208913,), (1349208943,), (1349208951,), (1349208975,), (1349209040,), (1349209044,), (1349209049,), (1349209060,), (1349209063,), (1349209066,), (1349209089,), (1349209092,), (1349209096,), (1349209100,), (1349209124,), (1349209269,), (1349209333,), (1349209336,), (1349209339,), (1349209343,), (1349209347,), (1349209406,), (1349209448,), (1349209452,), (1349209471,), (1349209479,), (1349209487,), (1349209491,), (1349209495,), (1349209591,), (1349209595,), (1349209599,), (1349209624,), (1349209631,), (1349209640,), (1349209666,), (1349209670,), (1349209674,), (1349209678,), (1349209683,), (1349209686,), (1349209788,), (1349209768,), (1349209774,), (1349209777,), (1349209783,), (1349209787,), (1349209849,), (1349209854,), (1349209856,), (1349209860,), (1349209920,), (1349209931,), (1349209938,), (1349209972,), (1349209975,), (1349209978,), (1349210016,), (1349210019,), (1349210022,), (1349210062,), (1349210065,), (1349210094,), (1349210102,), (1349210105,), (1349210130,), (1349210133,), (1349210136,), (1349210139,), (1349210167,), (1349210169,), (1349210171,), (1349210174,), (1349210177,), (1349210180,), (1349210197,), (1349210207,), (1349210210,), (1349210213,), (1349210214,), (1349210241,), (1349210242,), (1349210243,), (1349210244,), (1349210247,), (1349210277,), (1349210278,), (1349210279,), (1349210282,), (1349210285,), (1349210288,), (1349210318,), (1349210319,), (1349210329,), (1349210337,), (1349210362,), (1349210364,), (1349210366,), (1349210367,), (1349210396,), (1349210401,), (1349210402,), (1349210480,), (1349210437,), (1349210447,), (1349210472,), (1349210475,), (1349210478,), (1349210519,), (1349210520,), (1349210521,), (1349210522,), (1349210563,), (1349210567,), (1349210570,), (1349210571,), (1349210593,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'01042025': {'nb_upload': 14, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21935870]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1349210593, 1349210571, 1349210570, 1349210567, 1349210563] map_info['map_portfolio_photo'] : {21935870: [1349210593, 1349210571, 1349210570, 1349210567, 1349210563, 1349210522, 1349210521, 1349210520, 1349210519, 1349210478, 1349210475, 1349210472, 1349210447, 1349210437]} final : True mtd_id 4302 list_pids : [1349210593, 1349210571, 1349210570, 1349210567, 1349210563] Looping around the photos to save general results len do output : 1 /21935870Didn't retrieve data . before output type Here is an output not treated by saveGeneral : Managing all output in save final without adding information in the mtr_datou_result ('4302', None, None, None, None, None, None, None, '2711743') ('4302', '21935870', '1349210593', None, None, None, None, None, '2711743') ('4302', None, None, None, None, None, None, None, '2711743') ('4302', '21935870', '1349210571', None, None, None, None, None, '2711743') ('4302', None, None, None, None, None, None, None, '2711743') ('4302', '21935870', '1349210570', None, None, None, None, None, '2711743') ('4302', None, None, None, None, None, None, None, '2711743') ('4302', '21935870', '1349210567', None, None, None, None, None, '2711743') ('4302', None, None, None, None, None, None, None, '2711743') ('4302', '21935870', '1349210563', None, None, None, None, None, '2711743') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 6 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '21935870', 'None', None, None, None, None, '2711743'), ('4302', '21935870', '1349210593', None, None, None, None, None, '2711743'), ('4302', '21935870', '1349210571', None, None, None, None, None, '2711743'), ('4302', '21935870', '1349210570', None, None, None, None, None, '2711743'), ('4302', '21935870', '1349210567', None, None, None, None, None, '2711743'), ('4302', '21935870', '1349210563', None, None, None, None, None, '2711743')] time used for this insertion : 0.05146479606628418 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.33229613304138184 time spend to save output : 0.051729440689086914 total time spend for step 5 : 0.38402557373046875 caffe_path_current : About to save ! 2 After save, about to update current ! ret : 2 len(input) + len(total_photo_id_missing) : 1 set_done_treatment DELETE from MTRPhoto.mtr_datou_current where id in (2711743) 2.03user 1.90system 0:11.05elapsed 35%CPU (0avgtext+0avgdata 158176maxresident)k 54592inputs+6208outputs (346major+72999minor)pagefaults 0swaps