SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22666582) result : ((1355979109,), (1355979172,), (1355979203,), (1355979236,), (1355979494,), (1355979500,), (1355979535,), (1355979539,), (1355979545,), (1355979554,), (1355979763,), (1355979777,), (1355979803,), (1355979931,), (1355979933,), (1355979936,), (1355979939,), (1355979942,), (1355979945,), (1355979983,), (1355979988,), (1355979993,), (1355979998,), (1355980045,), (1355980049,), (1355980053,), (1355980057,), (1355980061,), (1355980065,), (1355980098,), (1355980100,), (1355980103,), (1355980106,)) 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 (1355980100,1355979500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22666601 , 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=22666582 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 (22666601) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22666582) result : ((1355979109,), (1355979172,), (1355979203,), (1355979236,), (1355979494,), (1355979500,), (1355979535,), (1355979539,), (1355979545,), (1355979554,), (1355979763,), (1355979777,), (1355979803,), (1355979931,), (1355979933,), (1355979936,), (1355979939,), (1355979942,), (1355979945,), (1355979983,), (1355979988,), (1355979993,), (1355979998,), (1355980045,), (1355980049,), (1355980053,), (1355980057,), (1355980061,), (1355980065,), (1355980098,), (1355980100,), (1355980103,), (1355980106,)) 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 (1355980100,1355979500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22666602 , 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=22666582 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='kraft' 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 (22666602) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22666582) result : ((1355979109,), (1355979172,), (1355979203,), (1355979236,), (1355979494,), (1355979500,), (1355979535,), (1355979539,), (1355979545,), (1355979554,), (1355979763,), (1355979777,), (1355979803,), (1355979931,), (1355979933,), (1355979936,), (1355979939,), (1355979942,), (1355979945,), (1355979983,), (1355979988,), (1355979993,), (1355979998,), (1355980045,), (1355980049,), (1355980053,), (1355980057,), (1355980061,), (1355980065,), (1355980098,), (1355980100,), (1355980103,), (1355980106,)) 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 (1355980100,1355979500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22666603 , 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=22666582 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 (22666603) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22666582) result : ((1355979109,), (1355979172,), (1355979203,), (1355979236,), (1355979494,), (1355979500,), (1355979535,), (1355979539,), (1355979545,), (1355979554,), (1355979763,), (1355979777,), (1355979803,), (1355979931,), (1355979933,), (1355979936,), (1355979939,), (1355979942,), (1355979945,), (1355979983,), (1355979988,), (1355979993,), (1355979998,), (1355980045,), (1355980049,), (1355980053,), (1355980057,), (1355980061,), (1355980065,), (1355980098,), (1355980100,), (1355980103,), (1355980106,)) 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 (1355980100,1355979500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22666604 , 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=22666582 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 (22666604) result : ((1355979720,), (1355980071,), (1355980140,), (1355980141,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22666582) result : ((1355979109,), (1355979172,), (1355979203,), (1355979236,), (1355979494,), (1355979500,), (1355979535,), (1355979539,), (1355979545,), (1355979554,), (1355979763,), (1355979777,), (1355979803,), (1355979931,), (1355979933,), (1355979936,), (1355979939,), (1355979942,), (1355979945,), (1355979983,), (1355979988,), (1355979993,), (1355979998,), (1355980045,), (1355980049,), (1355980053,), (1355980057,), (1355980061,), (1355980065,), (1355980098,), (1355980100,), (1355980103,), (1355980106,)) 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 (1355980100,1355979500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22666605 , 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=22666582 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 (22666605) result : ((1355980136,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22666582) result : ((1355979109,), (1355979172,), (1355979203,), (1355979236,), (1355979494,), (1355979500,), (1355979535,), (1355979539,), (1355979545,), (1355979554,), (1355979763,), (1355979777,), (1355979803,), (1355979931,), (1355979933,), (1355979936,), (1355979939,), (1355979942,), (1355979945,), (1355979983,), (1355979988,), (1355979993,), (1355979998,), (1355980045,), (1355980049,), (1355980053,), (1355980057,), (1355980061,), (1355980065,), (1355980098,), (1355980100,), (1355980103,), (1355980106,)) 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 (1355980100,1355979500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22666606 , 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=22666582 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 (22666606) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22666582) result : ((1355979109,), (1355979172,), (1355979203,), (1355979236,), (1355979494,), (1355979500,), (1355979535,), (1355979539,), (1355979545,), (1355979554,), (1355979763,), (1355979777,), (1355979803,), (1355979931,), (1355979933,), (1355979936,), (1355979939,), (1355979942,), (1355979945,), (1355979983,), (1355979988,), (1355979993,), (1355979998,), (1355980045,), (1355980049,), (1355980053,), (1355980057,), (1355980061,), (1355980065,), (1355980098,), (1355980100,), (1355980103,), (1355980106,)) 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 (1355980100,1355979500) and cspi.crop_hashtag_id = chi.id; 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`=22666582 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','cartonnette','Carton_gris','papier','Carton_brun','flou','plastique','environnement','autre_refus','kraft','mal_croppe','metal')) 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`=22666582 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','cartonnette','Carton_gris','papier','Carton_brun','flou','plastique','environnement','autre_refus','kraft','mal_croppe','metal')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_gris': {'main_port_id': 22666582, 'sub_port_id': 22666607, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15088293, 'last_updated_at': datetime.datetime(2025, 5, 5, 10, 5, 28), 'last_updated_at_desc': datetime.datetime(2025, 5, 5, 10, 5, 28), 'last_updated_at_asc': datetime.datetime(2025, 5, 5, 10, 5, 28)}, 'Carton_brun': {'main_port_id': 22666582, 'sub_port_id': 22666608, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15088294, 'last_updated_at': datetime.datetime(2025, 5, 5, 10, 5, 28), 'last_updated_at_desc': datetime.datetime(2025, 5, 5, 10, 5, 28), 'last_updated_at_asc': datetime.datetime(2025, 5, 5, 10, 5, 28)}, 'metal': {'main_port_id': 22666582, 'sub_port_id': 22666609, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15088295, 'last_updated_at': datetime.datetime(2025, 5, 5, 10, 5, 28), 'last_updated_at_desc': datetime.datetime(2025, 5, 5, 10, 5, 28), 'last_updated_at_asc': datetime.datetime(2025, 5, 5, 10, 5, 28)}, 'Teint_Dans_La_Masse': {'main_port_id': 22666582, 'sub_port_id': 22666610, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15088296, 'last_updated_at': datetime.datetime(2025, 5, 5, 10, 5, 28), 'last_updated_at_desc': datetime.datetime(2025, 5, 5, 10, 5, 28), 'last_updated_at_asc': datetime.datetime(2025, 5, 5, 10, 5, 28)}, 'environnement': {'main_port_id': 22666582, 'sub_port_id': 22666611, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15088297, 'last_updated_at': datetime.datetime(2025, 5, 5, 10, 5, 28), 'last_updated_at_desc': datetime.datetime(2025, 5, 5, 10, 5, 28), 'last_updated_at_asc': datetime.datetime(2025, 5, 5, 10, 5, 28)}, 'papier': {'main_port_id': 22666582, 'sub_port_id': 22666612, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15088298, 'last_updated_at': datetime.datetime(2025, 5, 5, 10, 5, 28), 'last_updated_at_desc': datetime.datetime(2025, 5, 5, 10, 5, 28), 'last_updated_at_asc': datetime.datetime(2025, 5, 5, 10, 5, 28)}, 'mal_croppe': {'main_port_id': 22666582, 'sub_port_id': 22666613, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15088299, 'last_updated_at': datetime.datetime(2025, 5, 5, 10, 5, 28), 'last_updated_at_desc': datetime.datetime(2025, 5, 5, 10, 5, 28), 'last_updated_at_asc': datetime.datetime(2025, 5, 5, 10, 5, 28)}, 'kraft': {'main_port_id': 22666582, 'sub_port_id': 22666614, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15088300, 'last_updated_at': datetime.datetime(2025, 5, 5, 10, 5, 28), 'last_updated_at_desc': datetime.datetime(2025, 5, 5, 10, 5, 28), 'last_updated_at_asc': datetime.datetime(2025, 5, 5, 10, 5, 28)}, 'plastique': {'main_port_id': 22666582, 'sub_port_id': 22666615, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15088301, 'last_updated_at': datetime.datetime(2025, 5, 5, 10, 5, 28), 'last_updated_at_desc': datetime.datetime(2025, 5, 5, 10, 5, 28), 'last_updated_at_asc': datetime.datetime(2025, 5, 5, 10, 5, 28)}, 'cartonnette': {'main_port_id': 22666582, 'sub_port_id': 22666616, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15088302, 'last_updated_at': datetime.datetime(2025, 5, 5, 10, 5, 28), 'last_updated_at_desc': datetime.datetime(2025, 5, 5, 10, 5, 28), 'last_updated_at_asc': datetime.datetime(2025, 5, 5, 10, 5, 28)}, 'autre_refus': {'main_port_id': 22666582, 'sub_port_id': 22666617, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15088303, 'last_updated_at': datetime.datetime(2025, 5, 5, 10, 5, 28), 'last_updated_at_desc': datetime.datetime(2025, 5, 5, 10, 5, 28), 'last_updated_at_asc': datetime.datetime(2025, 5, 5, 10, 5, 28)}, 'flou': {'main_port_id': 22666582, 'sub_port_id': 22666618, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15088304, 'last_updated_at': datetime.datetime(2025, 5, 5, 10, 6, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 5, 10, 6, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 5, 10, 5, 28)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22666607,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22666595 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22666608,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22666596 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22666609,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22666597 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22666610,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22666598 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22666611,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22666599 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22666612,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22666600 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22666613,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22666601 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22666614,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22666602 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22666615,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22666603 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22666616,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22666604 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22666617,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22666605 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22666618,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22666606 lien utilise dans velours : https://www.fotonower.com/velours/22666607,22666608,22666609,22666610,22666611,22666612,22666613,22666614,22666615,22666616,22666617,22666618?tags=Carton_gris,Carton_brun,metal,Teint_Dans_La_Masse,environnement,papier,mal_croppe,kraft,plastique,cartonnette,autre_refus,flou After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22666582]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1355980106, 1355980103, 1355980100, 1355980098, 1355980065, 1355980061, 1355980057, 1355980053, 1355980049, 1355980045] map_info['map_portfolio_photo'] : {22666582: [1355980106, 1355980103, 1355980100, 1355980098, 1355980065, 1355980061, 1355980057, 1355980053, 1355980049, 1355980045, 1355979998, 1355979993, 1355979988, 1355979983, 1355979945, 1355979942, 1355979939, 1355979936, 1355979933, 1355979931, 1355979803, 1355979777, 1355979763, 1355979554, 1355979545, 1355979539, 1355979535, 1355979500, 1355979494, 1355979236, 1355979203, 1355979172, 1355979109]} final : False mtd_id 4302 list_pids : [1355980106, 1355980103, 1355980100, 1355980098, 1355980065, 1355980061, 1355980057, 1355980053, 1355980049, 1355980045] Looping around the photos to save general results len do output : 1 /22666582. 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, '2791799') ('4302', '22666582', '1355980106', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980103', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980100', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980098', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980065', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980061', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980057', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980053', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980049', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980045', None, None, None, None, None, '2791799') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 11 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, '22666582', "{'Carton_gris': 22666595, 'Carton_brun': 22666596, 'metal': 22666597, 'Teint_Dans_La_Masse': 22666598, 'environnement': 22666599, 'papier': 22666600, 'mal_croppe': 22666601, 'kraft': 22666602, 'plastique': 22666603, 'cartonnette': 22666604, 'autre_refus': 22666605, 'flou': 22666606}", None, None, None, None, '2791799'), ('4302', '22666582', '1355980106', None, None, None, None, None, '2791799'), ('4302', '22666582', '1355980103', None, None, None, None, None, '2791799'), ('4302', '22666582', '1355980100', None, None, None, None, None, '2791799'), ('4302', '22666582', '1355980098', None, None, None, None, None, '2791799'), ('4302', '22666582', '1355980065', None, None, None, None, None, '2791799'), ('4302', '22666582', '1355980061', None, None, None, None, None, '2791799'), ('4302', '22666582', '1355980057', None, None, None, None, None, '2791799'), ('4302', '22666582', '1355980053', None, None, None, None, None, '2791799'), ('4302', '22666582', '1355980049', None, None, None, None, None, '2791799'), ('4302', '22666582', '1355980045', None, None, None, None, None, '2791799')] time used for this insertion : 0.01891946792602539 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.4615762233734131 time spend to save output : 0.01917409896850586 total time spend for step 1 : 0.48075032234191895 step2:final Mon May 5 10:09: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 (22666582) 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 22666582 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1355979236,1355979203,1355979172,1355979109,1355979554,1355979545,1355979539,1355979535,1355979500,1355979494,1355979803,1355979777,1355979763,1355979945,1355979942,1355979939,1355979936,1355979933,1355979931,1355979998,1355979993,1355979988,1355979983,1355980065,1355980061,1355980057,1355980053,1355980049,1355980045,1355980106,1355980103,1355980100,1355980098); 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([22666582]) Inside saveOutput : final : False verbose : True original output for save of step final : {1355980106: ('0.03375743636865081',), 1355980103: ('0.03375743636865081',), 1355980100: ('0.03375743636865081',), 1355980098: ('0.03375743636865081',), 1355980065: ('0.03375743636865081',), 1355980061: ('0.03375743636865081',), 1355980057: ('0.03375743636865081',), 1355980053: ('0.03375743636865081',), 1355980049: ('0.03375743636865081',), 1355980045: ('0.03375743636865081',)} new output for save of step final : {1355980106: ('0.03375743636865081',), 1355980103: ('0.03375743636865081',), 1355980100: ('0.03375743636865081',), 1355980098: ('0.03375743636865081',), 1355980065: ('0.03375743636865081',), 1355980061: ('0.03375743636865081',), 1355980057: ('0.03375743636865081',), 1355980053: ('0.03375743636865081',), 1355980049: ('0.03375743636865081',), 1355980045: ('0.03375743636865081',)} [1355980106, 1355980103, 1355980100, 1355980098, 1355980065, 1355980061, 1355980057, 1355980053, 1355980049, 1355980045] map_info['map_portfolio_photo'] : {22666582: [1355980106, 1355980103, 1355980100, 1355980098, 1355980065, 1355980061, 1355980057, 1355980053, 1355980049, 1355980045, 1355979998, 1355979993, 1355979988, 1355979983, 1355979945, 1355979942, 1355979939, 1355979936, 1355979933, 1355979931, 1355979803, 1355979777, 1355979763, 1355979554, 1355979545, 1355979539, 1355979535, 1355979500, 1355979494, 1355979236, 1355979203, 1355979172, 1355979109]} final : False mtd_id 4302 list_pids : [1355980106, 1355980103, 1355980100, 1355980098, 1355980065, 1355980061, 1355980057, 1355980053, 1355980049, 1355980045] Looping around the photos to save general results len do output : 10 /1355980106.Didn't retrieve data . /1355980103.Didn't retrieve data . /1355980100.Didn't retrieve data . /1355980098.Didn't retrieve data . /1355980065.Didn't retrieve data . /1355980061.Didn't retrieve data . /1355980057.Didn't retrieve data . /1355980053.Didn't retrieve data . /1355980049.Didn't retrieve data . /1355980045.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, '2791799') ('4302', '22666582', '1355980106', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980103', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980100', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980098', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980065', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980061', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980057', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980053', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980049', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980045', None, None, None, None, None, '2791799') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 30 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', '22666582', '1355980106', '0.03375743636865081', None, None, None, None, '2791799'), ('4302', '22666582', '1355980103', '0.03375743636865081', None, None, None, None, '2791799'), ('4302', '22666582', '1355980100', '0.03375743636865081', None, None, None, None, '2791799'), ('4302', '22666582', '1355980098', '0.03375743636865081', None, None, None, None, '2791799'), ('4302', '22666582', '1355980065', '0.03375743636865081', None, None, None, None, '2791799'), ('4302', '22666582', '1355980061', '0.03375743636865081', None, None, None, None, '2791799'), ('4302', '22666582', '1355980057', '0.03375743636865081', None, None, None, None, '2791799'), ('4302', '22666582', '1355980053', '0.03375743636865081', None, None, None, None, '2791799'), ('4302', '22666582', '1355980049', '0.03375743636865081', None, None, None, None, '2791799'), ('4302', '22666582', '1355980045', '0.03375743636865081', None, None, None, None, '2791799')] time used for this insertion : 0.017402172088623047 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06495118141174316 time spend to save output : 0.017889738082885742 total time spend for step 2 : 0.0828409194946289 step3:velours_tree Mon May 5 10:09: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 : {22666582: [{'Carton_gris': 22666595, 'Carton_brun': 22666596, 'metal': 22666597, 'Teint_Dans_La_Masse': 22666598, 'environnement': 22666599, 'papier': 22666600, 'mal_croppe': 22666601, 'kraft': 22666602, 'plastique': 22666603, 'cartonnette': 22666604, 'autre_refus': 22666605, 'flou': 22666606}]} input_args_next_step : {22666582: ()} output_args : {22666582: [{'Carton_gris': 22666595, 'Carton_brun': 22666596, 'metal': 22666597, 'Teint_Dans_La_Masse': 22666598, 'environnement': 22666599, 'papier': 22666600, 'mal_croppe': 22666601, 'kraft': 22666602, 'plastique': 22666603, 'cartonnette': 22666604, 'autre_refus': 22666605, 'flou': 22666606}]} args : 22666582 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': 22666595, 'Carton_brun': 22666596, 'metal': 22666597, 'Teint_Dans_La_Masse': 22666598, 'environnement': 22666599, 'papier': 22666600, 'mal_croppe': 22666601, 'kraft': 22666602, 'plastique': 22666603, 'cartonnette': 22666604, 'autre_refus': 22666605, 'flou': 22666606},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22666582) 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([22666582]) 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.35837244987487793 time spend to save output : 7.843971252441406e-05 total time spend for step 3 : 0.35845088958740234 step4:send_mail_cod Mon May 5 10:09: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 : {1355980106: ('0.03375743636865081',), 1355980103: ('0.03375743636865081',), 1355980100: ('0.03375743636865081',), 1355980098: ('0.03375743636865081',), 1355980065: ('0.03375743636865081',), 1355980061: ('0.03375743636865081',), 1355980057: ('0.03375743636865081',), 1355980053: ('0.03375743636865081',), 1355980049: ('0.03375743636865081',), 1355980045: ('0.03375743636865081',)} input_args_next_step : {1355980106: ()} output_args : {1355980106: ('0.03375743636865081',), 1355980103: ('0.03375743636865081',), 1355980100: ('0.03375743636865081',), 1355980098: ('0.03375743636865081',), 1355980065: ('0.03375743636865081',), 1355980061: ('0.03375743636865081',), 1355980057: ('0.03375743636865081',), 1355980053: ('0.03375743636865081',), 1355980049: ('0.03375743636865081',), 1355980045: ('0.03375743636865081',)} args : 1355980106 depend.output_id : 0 input_args_next_step : {1355980106: ('0.03375743636865081',), 1355980103: ()} output_args : {1355980106: ('0.03375743636865081',), 1355980103: ('0.03375743636865081',), 1355980100: ('0.03375743636865081',), 1355980098: ('0.03375743636865081',), 1355980065: ('0.03375743636865081',), 1355980061: ('0.03375743636865081',), 1355980057: ('0.03375743636865081',), 1355980053: ('0.03375743636865081',), 1355980049: ('0.03375743636865081',), 1355980045: ('0.03375743636865081',)} args : 1355980103 depend.output_id : 0 input_args_next_step : {1355980106: ('0.03375743636865081',), 1355980103: ('0.03375743636865081',), 1355980100: ()} output_args : {1355980106: ('0.03375743636865081',), 1355980103: ('0.03375743636865081',), 1355980100: ('0.03375743636865081',), 1355980098: ('0.03375743636865081',), 1355980065: ('0.03375743636865081',), 1355980061: ('0.03375743636865081',), 1355980057: ('0.03375743636865081',), 1355980053: ('0.03375743636865081',), 1355980049: ('0.03375743636865081',), 1355980045: ('0.03375743636865081',)} args : 1355980100 depend.output_id : 0 input_args_next_step : {1355980106: ('0.03375743636865081',), 1355980103: ('0.03375743636865081',), 1355980100: ('0.03375743636865081',), 1355980098: ()} output_args : {1355980106: ('0.03375743636865081',), 1355980103: ('0.03375743636865081',), 1355980100: ('0.03375743636865081',), 1355980098: ('0.03375743636865081',), 1355980065: ('0.03375743636865081',), 1355980061: ('0.03375743636865081',), 1355980057: ('0.03375743636865081',), 1355980053: ('0.03375743636865081',), 1355980049: ('0.03375743636865081',), 1355980045: ('0.03375743636865081',)} args : 1355980098 depend.output_id : 0 input_args_next_step : {1355980106: ('0.03375743636865081',), 1355980103: ('0.03375743636865081',), 1355980100: ('0.03375743636865081',), 1355980098: ('0.03375743636865081',), 1355980065: ()} output_args : {1355980106: ('0.03375743636865081',), 1355980103: ('0.03375743636865081',), 1355980100: ('0.03375743636865081',), 1355980098: ('0.03375743636865081',), 1355980065: ('0.03375743636865081',), 1355980061: ('0.03375743636865081',), 1355980057: ('0.03375743636865081',), 1355980053: ('0.03375743636865081',), 1355980049: ('0.03375743636865081',), 1355980045: ('0.03375743636865081',)} args : 1355980065 depend.output_id : 0 input_args_next_step : {1355980106: ('0.03375743636865081',), 1355980103: ('0.03375743636865081',), 1355980100: ('0.03375743636865081',), 1355980098: ('0.03375743636865081',), 1355980065: ('0.03375743636865081',), 1355980061: ()} output_args : {1355980106: ('0.03375743636865081',), 1355980103: ('0.03375743636865081',), 1355980100: ('0.03375743636865081',), 1355980098: ('0.03375743636865081',), 1355980065: ('0.03375743636865081',), 1355980061: ('0.03375743636865081',), 1355980057: ('0.03375743636865081',), 1355980053: ('0.03375743636865081',), 1355980049: ('0.03375743636865081',), 1355980045: ('0.03375743636865081',)} args : 1355980061 depend.output_id : 0 input_args_next_step : {1355980106: ('0.03375743636865081',), 1355980103: ('0.03375743636865081',), 1355980100: ('0.03375743636865081',), 1355980098: ('0.03375743636865081',), 1355980065: ('0.03375743636865081',), 1355980061: ('0.03375743636865081',), 1355980057: ()} output_args : {1355980106: ('0.03375743636865081',), 1355980103: ('0.03375743636865081',), 1355980100: ('0.03375743636865081',), 1355980098: ('0.03375743636865081',), 1355980065: ('0.03375743636865081',), 1355980061: ('0.03375743636865081',), 1355980057: ('0.03375743636865081',), 1355980053: ('0.03375743636865081',), 1355980049: ('0.03375743636865081',), 1355980045: ('0.03375743636865081',)} args : 1355980057 depend.output_id : 0 input_args_next_step : {1355980106: ('0.03375743636865081',), 1355980103: ('0.03375743636865081',), 1355980100: ('0.03375743636865081',), 1355980098: ('0.03375743636865081',), 1355980065: ('0.03375743636865081',), 1355980061: ('0.03375743636865081',), 1355980057: ('0.03375743636865081',), 1355980053: ()} output_args : {1355980106: ('0.03375743636865081',), 1355980103: ('0.03375743636865081',), 1355980100: ('0.03375743636865081',), 1355980098: ('0.03375743636865081',), 1355980065: ('0.03375743636865081',), 1355980061: ('0.03375743636865081',), 1355980057: ('0.03375743636865081',), 1355980053: ('0.03375743636865081',), 1355980049: ('0.03375743636865081',), 1355980045: ('0.03375743636865081',)} args : 1355980053 depend.output_id : 0 input_args_next_step : {1355980106: ('0.03375743636865081',), 1355980103: ('0.03375743636865081',), 1355980100: ('0.03375743636865081',), 1355980098: ('0.03375743636865081',), 1355980065: ('0.03375743636865081',), 1355980061: ('0.03375743636865081',), 1355980057: ('0.03375743636865081',), 1355980053: ('0.03375743636865081',), 1355980049: ()} output_args : {1355980106: ('0.03375743636865081',), 1355980103: ('0.03375743636865081',), 1355980100: ('0.03375743636865081',), 1355980098: ('0.03375743636865081',), 1355980065: ('0.03375743636865081',), 1355980061: ('0.03375743636865081',), 1355980057: ('0.03375743636865081',), 1355980053: ('0.03375743636865081',), 1355980049: ('0.03375743636865081',), 1355980045: ('0.03375743636865081',)} args : 1355980049 depend.output_id : 0 input_args_next_step : {1355980106: ('0.03375743636865081',), 1355980103: ('0.03375743636865081',), 1355980100: ('0.03375743636865081',), 1355980098: ('0.03375743636865081',), 1355980065: ('0.03375743636865081',), 1355980061: ('0.03375743636865081',), 1355980057: ('0.03375743636865081',), 1355980053: ('0.03375743636865081',), 1355980049: ('0.03375743636865081',), 1355980045: ()} output_args : {1355980106: ('0.03375743636865081',), 1355980103: ('0.03375743636865081',), 1355980100: ('0.03375743636865081',), 1355980098: ('0.03375743636865081',), 1355980065: ('0.03375743636865081',), 1355980061: ('0.03375743636865081',), 1355980057: ('0.03375743636865081',), 1355980053: ('0.03375743636865081',), 1355980049: ('0.03375743636865081',), 1355980045: ('0.03375743636865081',)} args : 1355980045 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 : {22666582: [{'Carton_gris': 22666595, 'Carton_brun': 22666596, 'metal': 22666597, 'Teint_Dans_La_Masse': 22666598, 'environnement': 22666599, 'papier': 22666600, 'mal_croppe': 22666601, 'kraft': 22666602, 'plastique': 22666603, 'cartonnette': 22666604, 'autre_refus': 22666605, 'flou': 22666606}]} input_args_next_step : {1355980106: ('0.03375743636865081',), 1355980103: ('0.03375743636865081',), 1355980100: ('0.03375743636865081',), 1355980098: ('0.03375743636865081',), 1355980065: ('0.03375743636865081',), 1355980061: ('0.03375743636865081',), 1355980057: ('0.03375743636865081',), 1355980053: ('0.03375743636865081',), 1355980049: ('0.03375743636865081',), 1355980045: ('0.03375743636865081',), 22666582: ()} output_args : {22666582: [{'Carton_gris': 22666595, 'Carton_brun': 22666596, 'metal': 22666597, 'Teint_Dans_La_Masse': 22666598, 'environnement': 22666599, 'papier': 22666600, 'mal_croppe': 22666601, 'kraft': 22666602, 'plastique': 22666603, 'cartonnette': 22666604, 'autre_refus': 22666605, 'flou': 22666606}]} args : 22666582 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 :11, first value : ('0.03375743636865081',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22666582) 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 (1355980106,1355980103,1355980100,1355980098,1355980065,1355980061,1355980057,1355980053,1355980049,1355980045) Found this number of photos: 10 ##### Call download_photos : nb_thread : 5 begin to download photo : 1355980045 begin to download photo : 1355980057 begin to download photo : 1355980098 begin to download photo : 1355980106 download finish for photo 1355980045 begin to download photo : 1355980049 download finish for photo 1355980106 download finish for photo 1355980098 begin to download photo : 1355980100 download finish for photo 1355980057 begin to download photo : 1355980061 download finish for photo 1355980100 begin to download photo : 1355980103 download finish for photo 1355980049 begin to download photo : 1355980053 download finish for photo 1355980061 begin to download photo : 1355980065 download finish for photo 1355980103 download finish for photo 1355980053 download finish for photo 1355980065 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette226665971746432541/ imagette226666011746432541/ imagette226666021746432541/ imagette226666031746432541/ length of list_filenames : 10 ; length of list_pids : 10 ; length of list_args : 10 results_Auto_P22666582_05-05-2025_10_09_01.pdf 22666597 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=22666597 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette226665971746432541 22666601 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=22666601 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette226666011746432541 22666602 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=22666602 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette226666021746432541 22666603 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=22666603 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette226666031746432541 22666604 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=22666604 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1355979720: '1746432194_512434_1355979172_d8e348a91727307df0b529937e8d9b4d_rle_crop_3784310206_0.png', 1355980071: '1746432431_514525_1355979983_f71185b429cfffb894c34c0a6b27c1b3_rle_crop_3784312017_0.png', 1355980140: '1746432492_515208_1355979936_c7d14a46c6a6fb5e2c62fe79d1d7d69d_rle_crop_3784312480_0.png', 1355980141: '1746432492_515208_1355979933_5d6ecf0f2b8b1541b066f22fa827b613_rle_crop_3784312491_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/5/a43debbb91ed703dc1c67d828f928537_91205387.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/5/9c4333857abd713acacc86f36b3bd30a_13509910.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/5/787a4b9cec0833329a48ce5167fd5400_25368646.png change filename to text .imagette226666041746432541/ imagette226666041746432541/1746432194_512434_1355979172_d8e348a91727307df0b529937e8d9b4d_rle_crop_3784310206_0.png.png imagette226666041746432541/1746432492_515208_1355979936_c7d14a46c6a6fb5e2c62fe79d1d7d69d_rle_crop_3784312480_0.png.png imagette226666041746432541/1746432431_514525_1355979983_f71185b429cfffb894c34c0a6b27c1b3_rle_crop_3784312017_0.png.png imagette226666041746432541/1746432492_515208_1355979933_5d6ecf0f2b8b1541b066f22fa827b613_rle_crop_3784312491_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/5/a34922e482ee808cb25628794a1d5d5d_71571460.png imagette226666041746432541 22666605 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=22666605 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1355980136: '1746432492_515208_1355979931_d22533e90a15631b086e7393550f6e11_rle_crop_3784312504_0.png'} change filename to text .imagette226666051746432541/ imagette226666051746432541/1746432492_515208_1355979931_d22533e90a15631b086e7393550f6e11_rle_crop_3784312504_0.png.png imagette226666061746432541/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/5/bbc846f3eb20889b4cccb10f5187defb_74167034.png imagette226666051746432541 22666606 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=22666606 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette226666061746432541 22666595 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=22666595 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1355980137: '1746432492_515208_1355979939_68be709b16709fc0dc40d30c3567394d_rle_crop_3784312470_0.png', 1355980138: '1746432492_515208_1355979933_5d6ecf0f2b8b1541b066f22fa827b613_rle_crop_3784312489_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/5/d0d32e40bbf6ed47cf7badb05417addd_92443088.png change filename to text .imagette226665951746432541/ imagette226665951746432541/1746432492_515208_1355979933_5d6ecf0f2b8b1541b066f22fa827b613_rle_crop_3784312489_0.png.png imagette226665951746432541/1746432492_515208_1355979939_68be709b16709fc0dc40d30c3567394d_rle_crop_3784312470_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/5/69c04b16c0b4af9e671232a84a66a1b4_9413142.png imagette226665951746432541 22666596 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=22666596 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1355979728: '1746432194_512434_1355979203_a57d9d7dd63fc4a476455db156a707e0_rle_crop_3784310191_0.png', 1355979729: '1746432194_512434_1355979172_d8e348a91727307df0b529937e8d9b4d_rle_crop_3784310202_0.png', 1355980142: '1746432492_515208_1355979931_d22533e90a15631b086e7393550f6e11_rle_crop_3784312507_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/5/e1dd542e7f5176eaedffbb9bf4a197f6_40727034.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/5/ceba258e36fb147526da39c8c2d36730_16377834.png change filename to text .imagette226665961746432541/ imagette226665961746432541/1746432194_512434_1355979172_d8e348a91727307df0b529937e8d9b4d_rle_crop_3784310202_0.png.png imagette226665961746432541/1746432194_512434_1355979203_a57d9d7dd63fc4a476455db156a707e0_rle_crop_3784310191_0.png.png imagette226665961746432541/1746432492_515208_1355979931_d22533e90a15631b086e7393550f6e11_rle_crop_3784312507_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/5/5918f4889bd0805c3bb877b4eee800e2_47035131.png imagette226665961746432541 22666598 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=22666598 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1355979715: '1746432194_512434_1355979109_6232f15c2684f657d1747df1f1aa3697_rle_crop_3784310216_0.png', 1355980070: '1746432431_514525_1355979983_f71185b429cfffb894c34c0a6b27c1b3_rle_crop_3784312021_0.png', 1355980135: '1746432492_515208_1355979998_6777f3e758a56fabc4340d91487d5d4b_rle_crop_3784312450_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/5/e4ba9cf05a3d7073a683c30573533a1e_24434909.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/5/20b42e31ed0f842958adf5dc28b6fa83_8545198.png change filename to text .imagette226665981746432541/ imagette226665981746432541/1746432492_515208_1355979998_6777f3e758a56fabc4340d91487d5d4b_rle_crop_3784312450_0.png.png imagette226665981746432541/1746432194_512434_1355979109_6232f15c2684f657d1747df1f1aa3697_rle_crop_3784310216_0.png.png imagette226665981746432541/1746432431_514525_1355979983_f71185b429cfffb894c34c0a6b27c1b3_rle_crop_3784312021_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/5/4ae4f9ffc039f5586e071bcb1c2b3070_84715938.png imagette226665981746432541 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=22666582 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/22666607,22666608,22666609,22666610,22666611,22666612,22666613,22666614,22666615,22666616,22666617,22666618?tags=Carton_gris,Carton_brun,metal,Teint_Dans_La_Masse,environnement,papier,mal_croppe,kraft,plastique,cartonnette,autre_refus,flou your option no_mail is active, we will not send the real mail to your client args[1355980106] : ('0.03375743636865081',) no score found for photo 1355980106 We are sending mail with results at report@fotonower.com args[1355980103] : ('0.03375743636865081',) no score found for photo 1355980103 We are sending mail with results at report@fotonower.com args[1355980100] : ('0.03375743636865081',) no score found for photo 1355980100 We are sending mail with results at report@fotonower.com args[1355980098] : ('0.03375743636865081',) no score found for photo 1355980098 We are sending mail with results at report@fotonower.com args[1355980065] : ('0.03375743636865081',) no score found for photo 1355980065 We are sending mail with results at report@fotonower.com args[1355980061] : ('0.03375743636865081',) no score found for photo 1355980061 We are sending mail with results at report@fotonower.com args[1355980057] : ('0.03375743636865081',) no score found for photo 1355980057 We are sending mail with results at report@fotonower.com args[1355980053] : ('0.03375743636865081',) no score found for photo 1355980053 We are sending mail with results at report@fotonower.com args[1355980049] : ('0.03375743636865081',) no score found for photo 1355980049 We are sending mail with results at report@fotonower.com args[1355980045] : ('0.03375743636865081',) no score found for photo 1355980045 We are sending mail with results at report@fotonower.com refus_total : 0.03375743636865081 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=22666582 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_P22666582_05-05-2025_10_09_01.pdf results_Auto_P22666582_05-05-2025_10_09_01.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22666582_05-05-2025_10_09_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','22666582','results_Auto_P22666582_05-05-2025_10_09_01.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22666582_05-05-2025_10_09_01.pdf','pdf','','0.14','0.03375743636865081') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22666582]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1355980106, 1355980103, 1355980100, 1355980098, 1355980065, 1355980061, 1355980057, 1355980053, 1355980049, 1355980045] map_info['map_portfolio_photo'] : {22666582: [1355980106, 1355980103, 1355980100, 1355980098, 1355980065, 1355980061, 1355980057, 1355980053, 1355980049, 1355980045, 1355979998, 1355979993, 1355979988, 1355979983, 1355979945, 1355979942, 1355979939, 1355979936, 1355979933, 1355979931, 1355979803, 1355979777, 1355979763, 1355979554, 1355979545, 1355979539, 1355979535, 1355979500, 1355979494, 1355979236, 1355979203, 1355979172, 1355979109]} final : False mtd_id 4302 list_pids : [1355980106, 1355980103, 1355980100, 1355980098, 1355980065, 1355980061, 1355980057, 1355980053, 1355980049, 1355980045] 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, '2791799') ('4302', '22666582', '1355980106', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980103', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980100', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980098', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980065', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980061', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980057', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980053', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980049', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980045', None, None, None, None, None, '2791799') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 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', '22666582', '1355980106', None, None, None, None, None, '2791799'), ('4302', '22666582', '1355980103', None, None, None, None, None, '2791799'), ('4302', '22666582', '1355980100', None, None, None, None, None, '2791799'), ('4302', '22666582', '1355980098', None, None, None, None, None, '2791799'), ('4302', '22666582', '1355980065', None, None, None, None, None, '2791799'), ('4302', '22666582', '1355980061', None, None, None, None, None, '2791799'), ('4302', '22666582', '1355980057', None, None, None, None, None, '2791799'), ('4302', '22666582', '1355980053', None, None, None, None, None, '2791799'), ('4302', '22666582', '1355980049', None, None, None, None, None, '2791799'), ('4302', '22666582', '1355980045', None, None, None, None, None, '2791799')] time used for this insertion : 0.01579904556274414 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.215144395828247 time spend to save output : 0.016010522842407227 total time spend for step 4 : 2.2311549186706543 step5:split_time_score Mon May 5 10:09:02 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 : ['22666582'] 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 : [('22666582',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22666582) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1355980106: {'path': 'temp/1746432540_4036405_1355980106_e1b4cecaa296782af37633a43aea152b.jpg', 'extension': 'jpg'}, 1355980098: {'path': 'temp/1746432540_4036405_1355980098_a1e0a046d86227550c0cc4914ef7576e.jpg', 'extension': 'jpg'}, 1355980100: {'path': 'temp/1746432540_4036405_1355980100_b1da77ff4da7906fbba40213c74a0c92.jpg', 'extension': 'jpg'}, 1355980103: {'path': 'temp/1746432540_4036405_1355980103_5607bc0d3eb4be2f0887290cff6b35dd.jpg', 'extension': 'jpg'}, 1355980045: {'path': 'temp/1746432540_4036405_1355980045_02ce25beb90cfc550d2e295979a3616c.jpg', 'extension': 'jpg'}, 1355980049: {'path': 'temp/1746432540_4036405_1355980049_23f512b0d6e1ed750d721bb9d335ca68.jpg', 'extension': 'jpg'}, 1355980053: {'path': 'temp/1746432540_4036405_1355980053_f730a0b27a09e15237d8a05f6de74714.jpg', 'extension': 'jpg'}, 1355980057: {'path': 'temp/1746432540_4036405_1355980057_3ef0df9bd13a267e52e53e5f5fc2976e.jpg', 'extension': 'jpg'}, 1355980061: {'path': 'temp/1746432540_4036405_1355980061_ae2dfaddc9da53fd424d6e59cbf49bb9.jpg', 'extension': 'jpg'}, 1355980065: {'path': 'temp/1746432540_4036405_1355980065_55468a91ecfb2dc2b822f13d76a0a2b8.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 = 22666582; (('arc_en_ciel_jrm_live',),) 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 = 22666582 group by h (('10', 33),) 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=22666582 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 (22666582) 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 (22666582) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 05052025 22666582 Nombre de photos uploadées : 33 / 23040 (0%) 05052025 22666582 Nombre de photos taguées (types de déchets): 0 / 33 (0%) 05052025 22666582 Nombre de photos taguées (volume) : 0 / 33 (0%) [{'photo_id': 1355979236, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/5/761eb73a7cbe87d0cd7f5aa87124bb39.jpg', 'username': None, 'uploaded_at': 1746432127, 'text': 'image_05052025_10_00_54_10140.jpg'}, {'photo_id': 1355979203, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/5/a57d9d7dd63fc4a476455db156a707e0.jpg', 'username': None, 'uploaded_at': 1746432127, 'text': 'image_05052025_10_01_04_010154m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1355979172, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/5/d8e348a91727307df0b529937e8d9b4d.jpg', 'username': None, 'uploaded_at': 1746432127, 'text': 'image_05052025_10_01_13_009126m0.jpg 2e-05 for time 1, id_amount 3 this amount prod time diff : 1e-05'}, {'photo_id': 1355979109, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/5/6232f15c2684f657d1747df1f1aa3697.jpg', 'username': None, 'uploaded_at': 1746432127, 'text': 'image_05052025_10_01_23_010143m0.jpg 3.0000000000000004e-05 for time 1, id_amount 1 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.9604644775390625e-06 ????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0016121864318847656 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 218, 22666582, '2025-05-05' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1773249,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.028452396392822266 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= 1773249 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1773249, 'dashboard_run_id': 1781549, 'mtr_portfolio_id': 22665500, 'dashboard_result_id': 10288231, '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_P22665500_05-05-2025_09_48_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22665502, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22665503, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22665504, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22665505, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22665506, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22665507, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22665508, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22665509, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22665510, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22665511, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22665512, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22665513, 'pht': 3726}}"}, {'dashboat_entry_day': 1773249, 'dashboard_run_id': 1781549, 'mtr_portfolio_id': 22666082, 'dashboard_result_id': 10288232, '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_P22666082_05-05-2025_10_04_58.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22666113, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22666114, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22666115, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22666116, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22666117, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22666118, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22666119, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22666120, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22666121, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22666122, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22666123, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22666124, 'pht': 3726}}"}, {'dashboat_entry_day': 1773249, 'dashboard_run_id': 1781549, 'mtr_portfolio_id': 22666582, 'dashboard_result_id': 10288233, '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_P22666582_05-05-2025_10_06_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22666595, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22666596, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22666597, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22666598, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22666599, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22666600, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22666601, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22666602, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22666603, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22666604, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22666605, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22666606, '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 = 22665500 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': 2791637, 'mtr_portfolio_id': 22665500, 'created_at': datetime.datetime(2025, 5, 5, 9, 48, 57), 'result': '0.03405055145795254', 'result_long': None, 'result_double': None}] Qualite : 0.03405055145795254 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22665500 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22665500_05-05-2025_09_48_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22665500 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_P22665500_05-05-2025_09_48_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22665502, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22665503, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22665504, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22665505, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22665506, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22665507, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22665508, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22665509, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22665510, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22665511, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22665512, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22665513, 'pht': 3726}}" where mtr_portfolio_id = 22665500 and dashboard_run_id = 1781549 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`=22665500 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10288231, 0.03405055145795254, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22665500_05-05-2025_09_48_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22665502, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22665503, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22665504, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22665505, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22665506, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22665507, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22665508, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22665509, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22665510, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22665511, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22665512, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22665513, '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 = 22666082 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': 2791720, 'mtr_portfolio_id': 22666082, 'created_at': datetime.datetime(2025, 5, 5, 10, 4, 57), 'result': '0.020976144175548283', 'result_long': None, 'result_double': None}] Qualite : 0.020976144175548283 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22666082 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22666082_05-05-2025_10_04_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22666082 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_P22666082_05-05-2025_10_04_58.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22666113, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22666114, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22666115, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22666116, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22666117, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22666118, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22666119, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22666120, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22666121, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22666122, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22666123, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22666124, 'pht': 3726}}" where mtr_portfolio_id = 22666082 and dashboard_run_id = 1781549 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`=22666082 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10288232, 0.020976144175548283, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22666082_05-05-2025_10_04_58.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22666113, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22666114, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22666115, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22666116, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22666117, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22666118, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22666119, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22666120, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22666121, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22666122, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22666123, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22666124, '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 = 22666582 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': 2791799, 'mtr_portfolio_id': 22666582, 'created_at': datetime.datetime(2025, 5, 5, 10, 9), 'result': '0.03375743636865081', 'result_long': None, 'result_double': None}] Qualite : 0.03375743636865081 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22666582 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22666582_05-05-2025_10_09_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22666582 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_P22666582_05-05-2025_10_09_01.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22666595, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22666596, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22666597, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22666598, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22666599, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22666600, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22666601, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22666602, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22666603, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22666604, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22666605, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22666606, 'pht': 3726}}" where mtr_portfolio_id = 22666582 and dashboard_run_id = 1781549 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`=22666582 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10288233, 0.03375743636865081, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22666582_05-05-2025_10_09_01.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22666595, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22666596, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22666597, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22666598, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22666599, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22666600, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22666601, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22666602, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22666603, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22666604, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22666605, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22666606, '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 (22665500,22666082,22666582) result : ((1355974331,), (1355974334,), (1355974362,), (1355974365,), (1355974368,), (1355974456,), (1355974532,), (1355974536,), (1355974539,), (1355974543,), (1355974616,), (1355974618,), (1355974621,), (1355974625,), (1355974629,), (1355974631,), (1355974651,), (1355974653,), (1355974656,), (1355974682,), (1355974685,), (1355974688,), (1355974691,), (1355974694,), (1355974699,), (1355974719,), (1355974721,), (1355974724,), (1355974729,), (1355974733,), (1355974769,), (1355974774,), (1355974777,), (1355974781,), (1355974788,), (1355974792,), (1355974854,), (1355974858,), (1355974862,), (1355974905,), (1355974910,), (1355974915,), (1355974919,), (1355974924,), (1355974929,), (1355974983,), (1355974986,), (1355974991,), (1355974995,), (1355975008,), (1355975012,), (1355975070,), (1355975082,), (1355975085,), (1355975331,), (1355975334,), (1355975351,), (1355975354,), (1355975359,), (1355975365,), (1355975410,), (1355975412,), (1355975418,), (1355975422,), (1355975429,), (1355975558,), (1355975584,), (1355975612,), (1355975643,), (1355975678,), (1355975709,), (1355975832,), (1355975823,), (1355975826,), (1355975829,), (1355975863,), (1355975868,), (1355975873,), (1355975876,), (1355975881,), (1355975886,), (1355975953,), (1355975960,), (1355975963,), (1355975968,), (1355975973,), (1355976001,), (1355976008,), (1355976012,), (1355976015,), (1355976070,), (1355976075,), (1355976079,), (1355976088,), (1355976097,), (1355976111,), (1355976226,), (1355976246,), (1355976250,), (1355976254,), (1355976422,), (1355976425,), (1355976428,), (1355976465,), (1355976510,), (1355976515,), (1355976544,), (1355976547,), (1355976551,), (1355976554,), (1355976591,), (1355976597,), (1355976599,), (1355976602,), (1355976605,), (1355976610,), (1355976647,), (1355976652,), (1355976656,), (1355976658,), (1355976688,), (1355976697,), (1355976700,), (1355976703,), (1355977206,), (1355978507,), (1355979109,), (1355979172,), (1355979203,), (1355979236,), (1355979494,), (1355979500,), (1355979535,), (1355979539,), (1355979545,), (1355979554,), (1355979763,), (1355979777,), (1355979803,), (1355979931,), (1355979933,), (1355979936,), (1355979939,), (1355979942,), (1355979945,), (1355979983,), (1355979988,), (1355979993,), (1355979998,), (1355980045,), (1355980049,), (1355980053,), (1355980057,), (1355980061,), (1355980065,), (1355980098,), (1355980100,), (1355980103,), (1355980106,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'05052025': {'nb_upload': 33, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22666582]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1355980106, 1355980103, 1355980100, 1355980098, 1355980065, 1355980061, 1355980057, 1355980053, 1355980049, 1355980045] map_info['map_portfolio_photo'] : {22666582: [1355980106, 1355980103, 1355980100, 1355980098, 1355980065, 1355980061, 1355980057, 1355980053, 1355980049, 1355980045, 1355979998, 1355979993, 1355979988, 1355979983, 1355979945, 1355979942, 1355979939, 1355979936, 1355979933, 1355979931, 1355979803, 1355979777, 1355979763, 1355979554, 1355979545, 1355979539, 1355979535, 1355979500, 1355979494, 1355979236, 1355979203, 1355979172, 1355979109]} final : True mtd_id 4302 list_pids : [1355980106, 1355980103, 1355980100, 1355980098, 1355980065, 1355980061, 1355980057, 1355980053, 1355980049, 1355980045] Looping around the photos to save general results len do output : 1 /22666582Didn'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, '2791799') ('4302', '22666582', '1355980106', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980103', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980100', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980098', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980065', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980061', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980057', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980053', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980049', None, None, None, None, None, '2791799') ('4302', None, None, None, None, None, None, None, '2791799') ('4302', '22666582', '1355980045', None, None, None, None, None, '2791799') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 11 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, '22666582', 'None', None, None, None, None, '2791799'), ('4302', '22666582', '1355980106', None, None, None, None, None, '2791799'), ('4302', '22666582', '1355980103', None, None, None, None, None, '2791799'), ('4302', '22666582', '1355980100', None, None, None, None, None, '2791799'), ('4302', '22666582', '1355980098', None, None, None, None, None, '2791799'), ('4302', '22666582', '1355980065', None, None, None, None, None, '2791799'), ('4302', '22666582', '1355980061', None, None, None, None, None, '2791799'), ('4302', '22666582', '1355980057', None, None, None, None, None, '2791799'), ('4302', '22666582', '1355980053', None, None, None, None, None, '2791799'), ('4302', '22666582', '1355980049', None, None, None, None, None, '2791799'), ('4302', '22666582', '1355980045', None, None, None, None, None, '2791799')] time used for this insertion : 0.015284538269042969 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.2834970951080322 time spend to save output : 0.015542030334472656 total time spend for step 5 : 0.2990391254425049 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 (2791799) 1.98user 2.33system 0:07.32elapsed 58%CPU (0avgtext+0avgdata 162008maxresident)k 184inputs+7536outputs (4major+64516minor)pagefaults 0swaps