result : ((1349202135,), (1349202136,), (1349202137,), (1349202138,), (1349202149,), (1349202150,), (1349202151,), (1349202152,), (1349202153,), (1349202167,), (1349202169,), (1349202170,), (1349202171,), (1349202172,), (1349202173,), (1349202174,)) 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 21933173 , 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=21933164 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 (21933173) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21933164) result : ((1349202135,), (1349202136,), (1349202137,), (1349202138,), (1349202149,), (1349202150,), (1349202151,), (1349202152,), (1349202153,), (1349202167,), (1349202169,), (1349202170,), (1349202171,), (1349202172,), (1349202173,), (1349202174,)) 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 21933174 , 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=21933164 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='mal_croppe' 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 (21933174) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21933164) result : ((1349202135,), (1349202136,), (1349202137,), (1349202138,), (1349202149,), (1349202150,), (1349202151,), (1349202152,), (1349202153,), (1349202167,), (1349202169,), (1349202170,), (1349202171,), (1349202172,), (1349202173,), (1349202174,)) 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 21933175 , 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=21933164 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 (21933175) result : ((1349202154,), (1349202157,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21933164) result : ((1349202135,), (1349202136,), (1349202137,), (1349202138,), (1349202149,), (1349202150,), (1349202151,), (1349202152,), (1349202153,), (1349202167,), (1349202169,), (1349202170,), (1349202171,), (1349202172,), (1349202173,), (1349202174,)) 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 21933176 , 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=21933164 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 (21933176) result : ((1349202145,), (1349202146,), (1349202159,), (1349202163,), (1349202164,), (1349202165,), (1349202166,), (1349202168,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21933164) result : ((1349202135,), (1349202136,), (1349202137,), (1349202138,), (1349202149,), (1349202150,), (1349202151,), (1349202152,), (1349202153,), (1349202167,), (1349202169,), (1349202170,), (1349202171,), (1349202172,), (1349202173,), (1349202174,)) 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 21933177 , 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=21933164 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='cartonnette' 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 (21933177) result : ((1349202144,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21933164) result : ((1349202135,), (1349202136,), (1349202137,), (1349202138,), (1349202149,), (1349202150,), (1349202151,), (1349202152,), (1349202153,), (1349202167,), (1349202169,), (1349202170,), (1349202171,), (1349202172,), (1349202173,), (1349202174,)) 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 21933178 , 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=21933164 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='autre_refus' 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 (21933178) result : ((1349202143,), (1349202155,), (1349202158,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21933164) result : ((1349202135,), (1349202136,), (1349202137,), (1349202138,), (1349202149,), (1349202150,), (1349202151,), (1349202152,), (1349202153,), (1349202167,), (1349202169,), (1349202170,), (1349202171,), (1349202172,), (1349202173,), (1349202174,)) 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`=21933164 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','autre_refus','mal_croppe','metal','Carton_brun','papier','cartonnette','Teint_Dans_La_Masse','Carton_gris','flou','environnement','plastique')) 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`=21933164 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','autre_refus','mal_croppe','metal','Carton_brun','papier','cartonnette','Teint_Dans_La_Masse','Carton_gris','flou','environnement','plastique')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_gris': {'main_port_id': 21933164, 'sub_port_id': 21933179, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14437128, 'last_updated_at': datetime.datetime(2025, 4, 1, 5, 8, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 5, 8, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 5, 8, 59)}, 'environnement': {'main_port_id': 21933164, 'sub_port_id': 21933180, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14437129, 'last_updated_at': datetime.datetime(2025, 4, 1, 5, 8, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 5, 8, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 5, 8, 59)}, 'papier': {'main_port_id': 21933164, 'sub_port_id': 21933181, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14437130, 'last_updated_at': datetime.datetime(2025, 4, 1, 5, 8, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 5, 8, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 5, 8, 59)}, 'kraft': {'main_port_id': 21933164, 'sub_port_id': 21933182, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14437131, 'last_updated_at': datetime.datetime(2025, 4, 1, 5, 8, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 5, 8, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 5, 8, 59)}, 'metal': {'main_port_id': 21933164, 'sub_port_id': 21933183, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14437132, 'last_updated_at': datetime.datetime(2025, 4, 1, 5, 8, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 5, 8, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 5, 8, 59)}, 'Carton_brun': {'main_port_id': 21933164, 'sub_port_id': 21933184, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14437133, 'last_updated_at': datetime.datetime(2025, 4, 1, 5, 8, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 5, 8, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 5, 8, 59)}, 'flou': {'main_port_id': 21933164, 'sub_port_id': 21933185, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14437134, 'last_updated_at': datetime.datetime(2025, 4, 1, 5, 8, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 5, 8, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 5, 8, 59)}, 'mal_croppe': {'main_port_id': 21933164, 'sub_port_id': 21933186, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14437135, 'last_updated_at': datetime.datetime(2025, 4, 1, 5, 8, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 5, 8, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 5, 8, 59)}, 'Teint_Dans_La_Masse': {'main_port_id': 21933164, 'sub_port_id': 21933187, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14437136, 'last_updated_at': datetime.datetime(2025, 4, 1, 5, 8, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 5, 8, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 5, 8, 59)}, 'plastique': {'main_port_id': 21933164, 'sub_port_id': 21933188, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14437137, 'last_updated_at': datetime.datetime(2025, 4, 1, 5, 8, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 5, 8, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 5, 8, 59)}, 'cartonnette': {'main_port_id': 21933164, 'sub_port_id': 21933189, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14437138, 'last_updated_at': datetime.datetime(2025, 4, 1, 5, 8, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 5, 8, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 5, 8, 59)}, 'autre_refus': {'main_port_id': 21933164, 'sub_port_id': 21933190, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14437139, 'last_updated_at': datetime.datetime(2025, 4, 1, 5, 10, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 5, 10, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 5, 8, 59)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21933179,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21933167 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21933180,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21933168 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21933181,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21933169 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21933182,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21933170 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21933183,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21933171 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21933184,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21933172 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21933185,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21933173 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21933186,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21933174 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21933187,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21933175 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21933188,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21933176 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21933189,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21933177 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21933190,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21933178 lien utilise dans velours : https://www.fotonower.com/velours/21933179,21933180,21933181,21933182,21933183,21933184,21933185,21933186,21933187,21933188,21933189,21933190?tags=Carton_gris,environnement,papier,kraft,metal,Carton_brun,flou,mal_croppe,Teint_Dans_La_Masse,plastique,cartonnette,autre_refus After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21933164]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1349202174, 1349202173, 1349202172, 1349202171, 1349202170, 1349202169] map_info['map_portfolio_photo'] : {21933164: [1349202174, 1349202173, 1349202172, 1349202171, 1349202170, 1349202169, 1349202167, 1349202153, 1349202152, 1349202151, 1349202150, 1349202149, 1349202138, 1349202137, 1349202136, 1349202135]} final : False mtd_id 4302 list_pids : [1349202174, 1349202173, 1349202172, 1349202171, 1349202170, 1349202169] Looping around the photos to save general results len do output : 1 /21933164. 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, '2711497') ('4302', '21933164', '1349202174', None, None, None, None, None, '2711497') ('4302', None, None, None, None, None, None, None, '2711497') ('4302', '21933164', '1349202173', None, None, None, None, None, '2711497') ('4302', None, None, None, None, None, None, None, '2711497') ('4302', '21933164', '1349202172', None, None, None, None, None, '2711497') ('4302', None, None, None, None, None, None, None, '2711497') ('4302', '21933164', '1349202171', None, None, None, None, None, '2711497') ('4302', None, None, None, None, None, None, None, '2711497') ('4302', '21933164', '1349202170', None, None, None, None, None, '2711497') ('4302', None, None, None, None, None, None, None, '2711497') ('4302', '21933164', '1349202169', None, None, None, None, None, '2711497') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 7 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, '21933164', "{'Carton_gris': 21933167, 'environnement': 21933168, 'papier': 21933169, 'kraft': 21933170, 'metal': 21933171, 'Carton_brun': 21933172, 'flou': 21933173, 'mal_croppe': 21933174, 'Teint_Dans_La_Masse': 21933175, 'plastique': 21933176, 'cartonnette': 21933177, 'autre_refus': 21933178}", None, None, None, None, '2711497'), ('4302', '21933164', '1349202174', None, None, None, None, None, '2711497'), ('4302', '21933164', '1349202173', None, None, None, None, None, '2711497'), ('4302', '21933164', '1349202172', None, None, None, None, None, '2711497'), ('4302', '21933164', '1349202171', None, None, None, None, None, '2711497'), ('4302', '21933164', '1349202170', None, None, None, None, None, '2711497'), ('4302', '21933164', '1349202169', None, None, None, None, None, '2711497')] time used for this insertion : 0.01373147964477539 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5019550323486328 time spend to save output : 0.014088869094848633 total time spend for step 1 : 1.5160439014434814 step2:final Tue Apr 1 05:13: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 (21933164) 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 21933164 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1349202138,1349202137,1349202136,1349202135,1349202152,1349202151,1349202150,1349202149,1349202153,1349202167,1349202172,1349202171,1349202170,1349202169,1349202174,1349202173); 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([21933164]) Inside saveOutput : final : False verbose : True original output for save of step final : {1349202174: ('0.08091946049237946',), 1349202173: ('0.08091946049237946',), 1349202172: ('0.08091946049237946',), 1349202171: ('0.08091946049237946',), 1349202170: ('0.08091946049237946',), 1349202169: ('0.08091946049237946',)} new output for save of step final : {1349202174: ('0.08091946049237946',), 1349202173: ('0.08091946049237946',), 1349202172: ('0.08091946049237946',), 1349202171: ('0.08091946049237946',), 1349202170: ('0.08091946049237946',), 1349202169: ('0.08091946049237946',)} [1349202174, 1349202173, 1349202172, 1349202171, 1349202170, 1349202169] map_info['map_portfolio_photo'] : {21933164: [1349202174, 1349202173, 1349202172, 1349202171, 1349202170, 1349202169, 1349202167, 1349202153, 1349202152, 1349202151, 1349202150, 1349202149, 1349202138, 1349202137, 1349202136, 1349202135]} final : False mtd_id 4302 list_pids : [1349202174, 1349202173, 1349202172, 1349202171, 1349202170, 1349202169] Looping around the photos to save general results len do output : 6 /1349202174.Didn't retrieve data . /1349202173.Didn't retrieve data . /1349202172.Didn't retrieve data . /1349202171.Didn't retrieve data . /1349202170.Didn't retrieve data . /1349202169.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, '2711497') ('4302', '21933164', '1349202174', None, None, None, None, None, '2711497') ('4302', None, None, None, None, None, None, None, '2711497') ('4302', '21933164', '1349202173', None, None, None, None, None, '2711497') ('4302', None, None, None, None, None, None, None, '2711497') ('4302', '21933164', '1349202172', None, None, None, None, None, '2711497') ('4302', None, None, None, None, None, None, None, '2711497') ('4302', '21933164', '1349202171', None, None, None, None, None, '2711497') ('4302', None, None, None, None, None, None, None, '2711497') ('4302', '21933164', '1349202170', None, None, None, None, None, '2711497') ('4302', None, None, None, None, None, None, None, '2711497') ('4302', '21933164', '1349202169', None, None, None, None, None, '2711497') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 18 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', '21933164', '1349202174', '0.08091946049237946', None, None, None, None, '2711497'), ('4302', '21933164', '1349202173', '0.08091946049237946', None, None, None, None, '2711497'), ('4302', '21933164', '1349202172', '0.08091946049237946', None, None, None, None, '2711497'), ('4302', '21933164', '1349202171', '0.08091946049237946', None, None, None, None, '2711497'), ('4302', '21933164', '1349202170', '0.08091946049237946', None, None, None, None, '2711497'), ('4302', '21933164', '1349202169', '0.08091946049237946', None, None, None, None, '2711497')] time used for this insertion : 0.0156557559967041 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.07365250587463379 time spend to save output : 0.016069650650024414 total time spend for step 2 : 0.0897221565246582 step3:velours_tree Tue Apr 1 05:13: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 : {21933164: [{'Carton_gris': 21933167, 'environnement': 21933168, 'papier': 21933169, 'kraft': 21933170, 'metal': 21933171, 'Carton_brun': 21933172, 'flou': 21933173, 'mal_croppe': 21933174, 'Teint_Dans_La_Masse': 21933175, 'plastique': 21933176, 'cartonnette': 21933177, 'autre_refus': 21933178}]} input_args_next_step : {21933164: ()} output_args : {21933164: [{'Carton_gris': 21933167, 'environnement': 21933168, 'papier': 21933169, 'kraft': 21933170, 'metal': 21933171, 'Carton_brun': 21933172, 'flou': 21933173, 'mal_croppe': 21933174, 'Teint_Dans_La_Masse': 21933175, 'plastique': 21933176, 'cartonnette': 21933177, 'autre_refus': 21933178}]} args : 21933164 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 : ({'Carton_gris': 21933167, 'environnement': 21933168, 'papier': 21933169, 'kraft': 21933170, 'metal': 21933171, 'Carton_brun': 21933172, 'flou': 21933173, 'mal_croppe': 21933174, 'Teint_Dans_La_Masse': 21933175, 'plastique': 21933176, 'cartonnette': 21933177, 'autre_refus': 21933178},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21933164) 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([21933164]) 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.48171329498291016 time spend to save output : 5.435943603515625e-05 total time spend for step 3 : 0.4817676544189453 step4:send_mail_cod Tue Apr 1 05:13: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 ! complete output_args for input 2 : {1349202174: ('0.08091946049237946',), 1349202173: ('0.08091946049237946',), 1349202172: ('0.08091946049237946',), 1349202171: ('0.08091946049237946',), 1349202170: ('0.08091946049237946',), 1349202169: ('0.08091946049237946',)} input_args_next_step : {1349202174: ()} output_args : {1349202174: ('0.08091946049237946',), 1349202173: ('0.08091946049237946',), 1349202172: ('0.08091946049237946',), 1349202171: ('0.08091946049237946',), 1349202170: ('0.08091946049237946',), 1349202169: ('0.08091946049237946',)} args : 1349202174 depend.output_id : 0 input_args_next_step : {1349202174: ('0.08091946049237946',), 1349202173: ()} output_args : {1349202174: ('0.08091946049237946',), 1349202173: ('0.08091946049237946',), 1349202172: ('0.08091946049237946',), 1349202171: ('0.08091946049237946',), 1349202170: ('0.08091946049237946',), 1349202169: ('0.08091946049237946',)} args : 1349202173 depend.output_id : 0 input_args_next_step : {1349202174: ('0.08091946049237946',), 1349202173: ('0.08091946049237946',), 1349202172: ()} output_args : {1349202174: ('0.08091946049237946',), 1349202173: ('0.08091946049237946',), 1349202172: ('0.08091946049237946',), 1349202171: ('0.08091946049237946',), 1349202170: ('0.08091946049237946',), 1349202169: ('0.08091946049237946',)} args : 1349202172 depend.output_id : 0 input_args_next_step : {1349202174: ('0.08091946049237946',), 1349202173: ('0.08091946049237946',), 1349202172: ('0.08091946049237946',), 1349202171: ()} output_args : {1349202174: ('0.08091946049237946',), 1349202173: ('0.08091946049237946',), 1349202172: ('0.08091946049237946',), 1349202171: ('0.08091946049237946',), 1349202170: ('0.08091946049237946',), 1349202169: ('0.08091946049237946',)} args : 1349202171 depend.output_id : 0 input_args_next_step : {1349202174: ('0.08091946049237946',), 1349202173: ('0.08091946049237946',), 1349202172: ('0.08091946049237946',), 1349202171: ('0.08091946049237946',), 1349202170: ()} output_args : {1349202174: ('0.08091946049237946',), 1349202173: ('0.08091946049237946',), 1349202172: ('0.08091946049237946',), 1349202171: ('0.08091946049237946',), 1349202170: ('0.08091946049237946',), 1349202169: ('0.08091946049237946',)} args : 1349202170 depend.output_id : 0 input_args_next_step : {1349202174: ('0.08091946049237946',), 1349202173: ('0.08091946049237946',), 1349202172: ('0.08091946049237946',), 1349202171: ('0.08091946049237946',), 1349202170: ('0.08091946049237946',), 1349202169: ()} output_args : {1349202174: ('0.08091946049237946',), 1349202173: ('0.08091946049237946',), 1349202172: ('0.08091946049237946',), 1349202171: ('0.08091946049237946',), 1349202170: ('0.08091946049237946',), 1349202169: ('0.08091946049237946',)} args : 1349202169 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 : {21933164: [{'Carton_gris': 21933167, 'environnement': 21933168, 'papier': 21933169, 'kraft': 21933170, 'metal': 21933171, 'Carton_brun': 21933172, 'flou': 21933173, 'mal_croppe': 21933174, 'Teint_Dans_La_Masse': 21933175, 'plastique': 21933176, 'cartonnette': 21933177, 'autre_refus': 21933178}]} input_args_next_step : {1349202174: ('0.08091946049237946',), 1349202173: ('0.08091946049237946',), 1349202172: ('0.08091946049237946',), 1349202171: ('0.08091946049237946',), 1349202170: ('0.08091946049237946',), 1349202169: ('0.08091946049237946',), 21933164: ()} output_args : {21933164: [{'Carton_gris': 21933167, 'environnement': 21933168, 'papier': 21933169, 'kraft': 21933170, 'metal': 21933171, 'Carton_brun': 21933172, 'flou': 21933173, 'mal_croppe': 21933174, 'Teint_Dans_La_Masse': 21933175, 'plastique': 21933176, 'cartonnette': 21933177, 'autre_refus': 21933178}]} args : 21933164 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 :7, first value : ('0.08091946049237946',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21933164) 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 (1349202174,1349202173,1349202172,1349202171,1349202170,1349202169) Found this number of photos: 6 ##### Call download_photos : nb_thread : 5 begin to download photo : 1349202169 begin to download photo : 1349202171 begin to download photo : 1349202173 download finish for photo 1349202171 begin to download photo : 1349202172 download finish for photo 1349202169 begin to download photo : 1349202170 download finish for photo 1349202173 begin to download photo : 1349202174 download finish for photo 1349202170 download finish for photo 1349202174 download finish for photo 1349202172 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 : 6 ; length of list_pids : 6 ; length of list_args : 6 results_Auto_P21933164_01-04-2025_05_13_00.pdf 21933170 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=21933170 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349202147: '1743476832_4116131_1349202136_665815146356ef13b81d5360312572b4_rle_crop_3742283249_0.png', 1349202148: '1743476832_4116131_1349202135_2df9d6e2ccbaa2a2d7d7bdc0c78163ab_rle_crop_3742283266_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/b99748ff6a3bc4a73d5b972d4e21d9b8_7652838.png change filename to text .imagette219331701743477180/ imagette219331701743477180/1743476832_4116131_1349202136_665815146356ef13b81d5360312572b4_rle_crop_3742283249_0.png.png imagette219331701743477180/1743476832_4116131_1349202135_2df9d6e2ccbaa2a2d7d7bdc0c78163ab_rle_crop_3742283266_0.png.png imagette219331711743477181/ imagette219331731743477181/ imagette219331741743477181/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/18a58e356148ca2a4246cc716b617216_21768418.png imagette219331701743477180 21933171 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=21933171 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette219331711743477181 21933173 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=21933173 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette219331731743477181 21933174 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=21933174 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette219331741743477181 21933176 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=21933176 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349202145: '1743476832_4116131_1349202136_665815146356ef13b81d5360312572b4_rle_crop_3742283252_0.png', 1349202146: '1743476832_4116131_1349202135_2df9d6e2ccbaa2a2d7d7bdc0c78163ab_rle_crop_3742283260_0.png', 1349202159: '1743476940_4117154_1349202152_fe2494147fd838347257ca5840504af2_rle_crop_3742283428_0.png', 1349202163: '1743476930_4117041_1349202151_ce343551cdf67ee0bbbeb5e3ad041b4c_rle_crop_3742283399_0.png', 1349202164: '1743476930_4117041_1349202151_ce343551cdf67ee0bbbeb5e3ad041b4c_rle_crop_3742283402_0.png', 1349202165: '1743476930_4117041_1349202150_dade15f789f37e2299871ca026d4074c_rle_crop_3742283417_0.png', 1349202166: '1743476930_4117041_1349202150_dade15f789f37e2299871ca026d4074c_rle_crop_3742283410_0.png', 1349202168: '1743477031_4118109_1349202153_32762488d85ad74acc5010b711e24aa2_rle_crop_3742285110_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/45b7b93aabcc98896fec1fa245c92921_30866381.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/dceddd7f340938b8c9887115a0b4a538_52335730.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/23bbe6acb953af9c0406e554ebd1bd27_45591898.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/65b73e80f2fc3920fb3564c7e6fbd7d0_40535696.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/11a87b6da5389e9f1a2168f62fbf00b8_83860458.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/5309b50d28654a77d778c3929caf0a77_39451474.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/bf834d23a43e902af58146dcc065f60c_68603344.png change filename to text .imagette219331761743477181/ imagette219331761743477181/1743477031_4118109_1349202153_32762488d85ad74acc5010b711e24aa2_rle_crop_3742285110_0.png.png imagette219331761743477181/1743476930_4117041_1349202151_ce343551cdf67ee0bbbeb5e3ad041b4c_rle_crop_3742283402_0.png.png imagette219331761743477181/1743476930_4117041_1349202151_ce343551cdf67ee0bbbeb5e3ad041b4c_rle_crop_3742283399_0.png.png imagette219331761743477181/1743476930_4117041_1349202150_dade15f789f37e2299871ca026d4074c_rle_crop_3742283417_0.png.png imagette219331761743477181/1743476832_4116131_1349202136_665815146356ef13b81d5360312572b4_rle_crop_3742283252_0.png.png imagette219331761743477181/1743476930_4117041_1349202150_dade15f789f37e2299871ca026d4074c_rle_crop_3742283410_0.png.png imagette219331761743477181/1743476832_4116131_1349202135_2df9d6e2ccbaa2a2d7d7bdc0c78163ab_rle_crop_3742283260_0.png.png imagette219331761743477181/1743476940_4117154_1349202152_fe2494147fd838347257ca5840504af2_rle_crop_3742283428_0.png.png wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/52ddeab4fa3ffa2f529b2582ea9e205f_37898339.png imagette219331761743477181 21933177 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=21933177 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349202144: '1743476832_4116131_1349202135_2df9d6e2ccbaa2a2d7d7bdc0c78163ab_rle_crop_3742283257_0.png'} change filename to text .imagette219331771743477181/ imagette219331771743477181/1743476832_4116131_1349202135_2df9d6e2ccbaa2a2d7d7bdc0c78163ab_rle_crop_3742283257_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/a988aa70cb4f746e978f5cd96c30c529_28368324.png imagette219331771743477181 21933178 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=21933178 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349202143: '1743476832_4116131_1349202136_665815146356ef13b81d5360312572b4_rle_crop_3742283248_0.png', 1349202155: '1743476940_4117154_1349202152_fe2494147fd838347257ca5840504af2_rle_crop_3742283423_0.png', 1349202158: '1743476930_4117041_1349202151_ce343551cdf67ee0bbbeb5e3ad041b4c_rle_crop_3742283396_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/37aa71076ea2b348e14bef6674b7ecf3_57669897.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/15af01e1ba94866e25c3aafb1aaeabe1_30489789.png change filename to text .imagette219331781743477181/ imagette219331781743477181/1743476832_4116131_1349202136_665815146356ef13b81d5360312572b4_rle_crop_3742283248_0.png.png imagette219331781743477181/1743476930_4117041_1349202151_ce343551cdf67ee0bbbeb5e3ad041b4c_rle_crop_3742283396_0.png.png imagette219331781743477181/1743476940_4117154_1349202152_fe2494147fd838347257ca5840504af2_rle_crop_3742283423_0.png.png imagette219331671743477182/ wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/ab798e452f27fc4518f8ece41b4fdc5b_36417245.png imagette219331781743477181 21933167 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=21933167 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette219331671743477182 21933172 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=21933172 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349202156: '1743476940_4117154_1349202152_fe2494147fd838347257ca5840504af2_rle_crop_3742283426_0.png', 1349202160: '1743476930_4117041_1349202151_ce343551cdf67ee0bbbeb5e3ad041b4c_rle_crop_3742283393_0.png', 1349202161: '1743476930_4117041_1349202151_ce343551cdf67ee0bbbeb5e3ad041b4c_rle_crop_3742283397_0.png', 1349202162: '1743476930_4117041_1349202150_dade15f789f37e2299871ca026d4074c_rle_crop_3742283416_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/42d0649affa2c5918acd4f1755516db2_98063386.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/539ded4b2bb06111ad665131385a2592_69975230.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/a88146559d109286cd5d4b06ad498c03_63366737.png change filename to text .imagette219331721743477182/ imagette219331721743477182/1743476930_4117041_1349202150_dade15f789f37e2299871ca026d4074c_rle_crop_3742283416_0.png.png imagette219331721743477182/1743476940_4117154_1349202152_fe2494147fd838347257ca5840504af2_rle_crop_3742283426_0.png.png imagette219331721743477182/1743476930_4117041_1349202151_ce343551cdf67ee0bbbeb5e3ad041b4c_rle_crop_3742283393_0.png.png imagette219331721743477182/1743476930_4117041_1349202151_ce343551cdf67ee0bbbeb5e3ad041b4c_rle_crop_3742283397_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/d9817c7dc9addd1dd46039b5a23bf8d6_9393856.png imagette219331721743477182 21933175 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=21933175 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349202154: '1743476940_4117154_1349202152_fe2494147fd838347257ca5840504af2_rle_crop_3742283425_0.png', 1349202157: '1743476930_4117041_1349202149_aa3ebc69ec7f344510cab97160fa3efb_rle_crop_3742283438_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/2960955c74d8f09f1f97792795d8df0d_14330224.png change filename to text .imagette219331751743477182/ imagette219331751743477182/1743476940_4117154_1349202152_fe2494147fd838347257ca5840504af2_rle_crop_3742283425_0.png.png imagette219331751743477182/1743476930_4117041_1349202149_aa3ebc69ec7f344510cab97160fa3efb_rle_crop_3742283438_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/1925a4b0ac59ee4c2b98deb8a94fe8be_98054821.png imagette219331751743477182 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=21933164 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/21933179,21933180,21933181,21933182,21933183,21933184,21933185,21933186,21933187,21933188,21933189,21933190?tags=Carton_gris,environnement,papier,kraft,metal,Carton_brun,flou,mal_croppe,Teint_Dans_La_Masse,plastique,cartonnette,autre_refus your option no_mail is active, we will not send the real mail to your client args[1349202174] : ('0.08091946049237946',) no score found for photo 1349202174 We are sending mail with results at report@fotonower.com args[1349202173] : ('0.08091946049237946',) no score found for photo 1349202173 We are sending mail with results at report@fotonower.com args[1349202172] : ('0.08091946049237946',) no score found for photo 1349202172 We are sending mail with results at report@fotonower.com args[1349202171] : ('0.08091946049237946',) no score found for photo 1349202171 We are sending mail with results at report@fotonower.com args[1349202170] : ('0.08091946049237946',) no score found for photo 1349202170 We are sending mail with results at report@fotonower.com args[1349202169] : ('0.08091946049237946',) no score found for photo 1349202169 We are sending mail with results at report@fotonower.com refus_total : 0.08091946049237946 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=21933164 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_P21933164_01-04-2025_05_13_00.pdf results_Auto_P21933164_01-04-2025_05_13_00.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21933164_01-04-2025_05_13_00.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','21933164','results_Auto_P21933164_01-04-2025_05_13_00.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21933164_01-04-2025_05_13_00.pdf','pdf','','0.16','0.08091946049237946') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21933164]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1349202174, 1349202173, 1349202172, 1349202171, 1349202170, 1349202169] map_info['map_portfolio_photo'] : {21933164: [1349202174, 1349202173, 1349202172, 1349202171, 1349202170, 1349202169, 1349202167, 1349202153, 1349202152, 1349202151, 1349202150, 1349202149, 1349202138, 1349202137, 1349202136, 1349202135]} final : False mtd_id 4302 list_pids : [1349202174, 1349202173, 1349202172, 1349202171, 1349202170, 1349202169] 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, '2711497') ('4302', '21933164', '1349202174', None, None, None, None, None, '2711497') ('4302', None, None, None, None, None, None, None, '2711497') ('4302', '21933164', '1349202173', None, None, None, None, None, '2711497') ('4302', None, None, None, None, None, None, None, '2711497') ('4302', '21933164', '1349202172', None, None, None, None, None, '2711497') ('4302', None, None, None, None, None, None, None, '2711497') ('4302', '21933164', '1349202171', None, None, None, None, None, '2711497') ('4302', None, None, None, None, None, None, None, '2711497') ('4302', '21933164', '1349202170', None, None, None, None, None, '2711497') ('4302', None, None, None, None, None, None, None, '2711497') ('4302', '21933164', '1349202169', None, None, None, None, None, '2711497') 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', '21933164', '1349202174', None, None, None, None, None, '2711497'), ('4302', '21933164', '1349202173', None, None, None, None, None, '2711497'), ('4302', '21933164', '1349202172', None, None, None, None, None, '2711497'), ('4302', '21933164', '1349202171', None, None, None, None, None, '2711497'), ('4302', '21933164', '1349202170', None, None, None, None, None, '2711497'), ('4302', '21933164', '1349202169', None, None, None, None, None, '2711497')] time used for this insertion : 0.06824254989624023 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.530958414077759 time spend to save output : 0.06850957870483398 total time spend for step 4 : 2.5994679927825928 step5:split_time_score Tue Apr 1 05:13:03 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 : ['21933164'] 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 : [('21933164',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21933164) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1349202169: {'path': 'temp/1743477180_3079999_1349202169_17d51b047a80c9d5f54086419b6a8a6e.jpg', 'extension': 'jpg'}, 1349202170: {'path': 'temp/1743477180_3079999_1349202170_dcd8c7b98dc310c559b38ffe944edc56.jpg', 'extension': 'jpg'}, 1349202173: {'path': 'temp/1743477180_3079999_1349202173_26c62d92e21012a0985b9f114b439cdf.jpg', 'extension': 'jpg'}, 1349202174: {'path': 'temp/1743477180_3079999_1349202174_c7d5b21b0fc9922e9b40b60735944524.jpg', 'extension': 'jpg'}, 1349202171: {'path': 'temp/1743477180_3079999_1349202171_f16dcb2dfc866f5cebcfd492ceabc04d.jpg', 'extension': 'jpg'}, 1349202172: {'path': 'temp/1743477180_3079999_1349202172_099cd2431525458d8fe26ccb11e48470.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 = 21933164; (('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 = 21933164 group by h (('05', 16),) 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=21933164 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 (21933164) 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 (21933164) 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 21933164 Nombre de photos uploadées : 16 / 23040 (0%) 01042025 21933164 Nombre de photos taguées (types de déchets): 0 / 16 (0%) 01042025 21933164 Nombre de photos taguées (volume) : 0 / 16 (0%) [{'photo_id': 1349202138, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/5b5a124c1c1d0866a07d933deaa5c8e5.jpg', 'username': None, 'uploaded_at': 1743476758, 'text': 'image_01042025_05_02_04_10136.jpg'}, {'photo_id': 1349202137, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/50970ad4438df9554026769bba6425c4.jpg', 'username': None, 'uploaded_at': 1743476758, 'text': 'image_01042025_05_03_14_10136.jpg'}, {'photo_id': 1349202136, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/665815146356ef13b81d5360312572b4.jpg', 'username': None, 'uploaded_at': 1743476758, 'text': 'image_01042025_05_04_14_010141m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1349202135, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/2df9d6e2ccbaa2a2d7d7bdc0c78163ab.jpg', 'username': None, 'uploaded_at': 1743476758, 'text': 'image_01042025_05_04_24_010133m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 1.6689300537109375e-06 elapsed_time : order_list_meta_photo_and_scores 5.0067901611328125e-06 ???????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0009720325469970703 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 21933164, '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.022967815399169922 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': 1713660, 'mtr_portfolio_id': 21933164, 'dashboard_result_id': 9776848, '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_P21933164_01-04-2025_05_11_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21933167, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21933168, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21933169, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21933170, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21933171, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21933172, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21933173, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21933174, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21933175, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21933176, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21933177, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21933178, '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 = 21933164 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': 2711497, 'mtr_portfolio_id': 21933164, 'created_at': datetime.datetime(2025, 4, 1, 5, 13), 'result': '0.08091946049237946', 'result_long': None, 'result_double': None}] Qualite : 0.08091946049237946 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21933164 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21933164_01-04-2025_05_13_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21933164 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_P21933164_01-04-2025_05_13_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21933167, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21933168, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21933169, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21933170, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21933171, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21933172, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21933173, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21933174, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21933175, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21933176, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21933177, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21933178, 'pht': 3726}}" where mtr_portfolio_id = 21933164 and dashboard_run_id = 1713660 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`=21933164 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9776848, 0.08091946049237946, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21933164_01-04-2025_05_13_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21933167, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21933168, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21933169, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21933170, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21933171, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21933172, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21933173, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21933174, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21933175, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21933176, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21933177, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21933178, '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 (21933164) result : ((1349202135,), (1349202136,), (1349202137,), (1349202138,), (1349202149,), (1349202150,), (1349202151,), (1349202152,), (1349202153,), (1349202167,), (1349202169,), (1349202170,), (1349202171,), (1349202172,), (1349202173,), (1349202174,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'01042025': {'nb_upload': 16, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21933164]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1349202174, 1349202173, 1349202172, 1349202171, 1349202170, 1349202169] map_info['map_portfolio_photo'] : {21933164: [1349202174, 1349202173, 1349202172, 1349202171, 1349202170, 1349202169, 1349202167, 1349202153, 1349202152, 1349202151, 1349202150, 1349202149, 1349202138, 1349202137, 1349202136, 1349202135]} final : True mtd_id 4302 list_pids : [1349202174, 1349202173, 1349202172, 1349202171, 1349202170, 1349202169] Looping around the photos to save general results len do output : 1 /21933164Didn'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, '2711497') ('4302', '21933164', '1349202174', None, None, None, None, None, '2711497') ('4302', None, None, None, None, None, None, None, '2711497') ('4302', '21933164', '1349202173', None, None, None, None, None, '2711497') ('4302', None, None, None, None, None, None, None, '2711497') ('4302', '21933164', '1349202172', None, None, None, None, None, '2711497') ('4302', None, None, None, None, None, None, None, '2711497') ('4302', '21933164', '1349202171', None, None, None, None, None, '2711497') ('4302', None, None, None, None, None, None, None, '2711497') ('4302', '21933164', '1349202170', None, None, None, None, None, '2711497') ('4302', None, None, None, None, None, None, None, '2711497') ('4302', '21933164', '1349202169', None, None, None, None, None, '2711497') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 7 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, '21933164', 'None', None, None, None, None, '2711497'), ('4302', '21933164', '1349202174', None, None, None, None, None, '2711497'), ('4302', '21933164', '1349202173', None, None, None, None, None, '2711497'), ('4302', '21933164', '1349202172', None, None, None, None, None, '2711497'), ('4302', '21933164', '1349202171', None, None, None, None, None, '2711497'), ('4302', '21933164', '1349202170', None, None, None, None, None, '2711497'), ('4302', '21933164', '1349202169', None, None, None, None, None, '2711497')] time used for this insertion : 0.020986557006835938 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.16771602630615234 time spend to save output : 0.021209239959716797 total time spend for step 5 : 0.18892526626586914 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 (2711497) 2.08user 2.47system 0:07.94elapsed 57%CPU (0avgtext+0avgdata 158584maxresident)k 7888inputs+7872outputs (86major+64982minor)pagefaults 0swaps