SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23259123) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23259112) result : ((1360463965,), (1360464329,), (1360464358,), (1360464372,), (1360464376,), (1360464411,), (1360464419,), (1360464420,), (1360464423,), (1360464456,), (1360464483,), (1360464516,), (1360464673,), (1360464676,), (1360464678,), (1360464694,), (1360464723,), (1360464752,), (1360464829,), (1360464831,), (1360464838,), (1360464842,), (1360464845,), (1360464848,), (1360464945,), (1360464972,), (1360465002,), (1360465376,), (1360465404,), (1360465433,), (1360465467,), (1360465554,), (1360466418,), (1360466495,), (1360466566,), (1360466619,), (1360467245,), (1360467376,), (1360467407,), (1360467440,), (1360467478,), (1360467713,), (1360467715,), (1360467721,), (1360467726,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23259124 , 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=23259112 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='papier' 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 (23259124) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23259112) result : ((1360463965,), (1360464329,), (1360464358,), (1360464372,), (1360464376,), (1360464411,), (1360464419,), (1360464420,), (1360464423,), (1360464456,), (1360464483,), (1360464516,), (1360464673,), (1360464676,), (1360464678,), (1360464694,), (1360464723,), (1360464752,), (1360464829,), (1360464831,), (1360464838,), (1360464842,), (1360464845,), (1360464848,), (1360464945,), (1360464972,), (1360465002,), (1360465376,), (1360465404,), (1360465433,), (1360465467,), (1360465554,), (1360466418,), (1360466495,), (1360466566,), (1360466619,), (1360467245,), (1360467376,), (1360467407,), (1360467440,), (1360467478,), (1360467713,), (1360467715,), (1360467721,), (1360467726,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23259125 , 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=23259112 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='Teint_Dans_La_Masse' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23259125) result : ((1360464663,), (1360466205,), (1360467661,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23259112) result : ((1360463965,), (1360464329,), (1360464358,), (1360464372,), (1360464376,), (1360464411,), (1360464419,), (1360464420,), (1360464423,), (1360464456,), (1360464483,), (1360464516,), (1360464673,), (1360464676,), (1360464678,), (1360464694,), (1360464723,), (1360464752,), (1360464829,), (1360464831,), (1360464838,), (1360464842,), (1360464845,), (1360464848,), (1360464945,), (1360464972,), (1360465002,), (1360465376,), (1360465404,), (1360465433,), (1360465467,), (1360465554,), (1360466418,), (1360466495,), (1360466566,), (1360466619,), (1360467245,), (1360467376,), (1360467407,), (1360467440,), (1360467478,), (1360467713,), (1360467715,), (1360467721,), (1360467726,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23259126 , 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=23259112 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='Carton_brun' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23259126) result : ((1360464667,), (1360464668,), (1360464669,), (1360464670,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23259112) result : ((1360463965,), (1360464329,), (1360464358,), (1360464372,), (1360464376,), (1360464411,), (1360464419,), (1360464420,), (1360464423,), (1360464456,), (1360464483,), (1360464516,), (1360464673,), (1360464676,), (1360464678,), (1360464694,), (1360464723,), (1360464752,), (1360464829,), (1360464831,), (1360464838,), (1360464842,), (1360464845,), (1360464848,), (1360464945,), (1360464972,), (1360465002,), (1360465376,), (1360465404,), (1360465433,), (1360465467,), (1360465554,), (1360466418,), (1360466495,), (1360466566,), (1360466619,), (1360467245,), (1360467376,), (1360467407,), (1360467440,), (1360467478,), (1360467713,), (1360467715,), (1360467721,), (1360467726,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23259127 , 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=23259112 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 (23259127) result : ((1360464664,), (1360464665,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23259112) result : ((1360463965,), (1360464329,), (1360464358,), (1360464372,), (1360464376,), (1360464411,), (1360464419,), (1360464420,), (1360464423,), (1360464456,), (1360464483,), (1360464516,), (1360464673,), (1360464676,), (1360464678,), (1360464694,), (1360464723,), (1360464752,), (1360464829,), (1360464831,), (1360464838,), (1360464842,), (1360464845,), (1360464848,), (1360464945,), (1360464972,), (1360465002,), (1360465376,), (1360465404,), (1360465433,), (1360465467,), (1360465554,), (1360466418,), (1360466495,), (1360466566,), (1360466619,), (1360467245,), (1360467376,), (1360467407,), (1360467440,), (1360467478,), (1360467713,), (1360467715,), (1360467721,), (1360467726,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23259128 , 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=23259112 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='metal' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23259128) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23259112) result : ((1360463965,), (1360464329,), (1360464358,), (1360464372,), (1360464376,), (1360464411,), (1360464419,), (1360464420,), (1360464423,), (1360464456,), (1360464483,), (1360464516,), (1360464673,), (1360464676,), (1360464678,), (1360464694,), (1360464723,), (1360464752,), (1360464829,), (1360464831,), (1360464838,), (1360464842,), (1360464845,), (1360464848,), (1360464945,), (1360464972,), (1360465002,), (1360465376,), (1360465404,), (1360465433,), (1360465467,), (1360465554,), (1360466418,), (1360466495,), (1360466566,), (1360466619,), (1360467245,), (1360467376,), (1360467407,), (1360467440,), (1360467478,), (1360467713,), (1360467715,), (1360467721,), (1360467726,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23259129 , 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=23259112 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 (23259129) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23259112) result : ((1360463965,), (1360464329,), (1360464358,), (1360464372,), (1360464376,), (1360464411,), (1360464419,), (1360464420,), (1360464423,), (1360464456,), (1360464483,), (1360464516,), (1360464673,), (1360464676,), (1360464678,), (1360464694,), (1360464723,), (1360464752,), (1360464829,), (1360464831,), (1360464838,), (1360464842,), (1360464845,), (1360464848,), (1360464945,), (1360464972,), (1360465002,), (1360465376,), (1360465404,), (1360465433,), (1360465467,), (1360465554,), (1360466418,), (1360466495,), (1360466566,), (1360466619,), (1360467245,), (1360467376,), (1360467407,), (1360467440,), (1360467478,), (1360467713,), (1360467715,), (1360467721,), (1360467726,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23259130 , 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=23259112 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 (23259130) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23259112) result : ((1360463965,), (1360464329,), (1360464358,), (1360464372,), (1360464376,), (1360464411,), (1360464419,), (1360464420,), (1360464423,), (1360464456,), (1360464483,), (1360464516,), (1360464673,), (1360464676,), (1360464678,), (1360464694,), (1360464723,), (1360464752,), (1360464829,), (1360464831,), (1360464838,), (1360464842,), (1360464845,), (1360464848,), (1360464945,), (1360464972,), (1360465002,), (1360465376,), (1360465404,), (1360465433,), (1360465467,), (1360465554,), (1360466418,), (1360466495,), (1360466566,), (1360466619,), (1360467245,), (1360467376,), (1360467407,), (1360467440,), (1360467478,), (1360467713,), (1360467715,), (1360467721,), (1360467726,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=23259112 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','Carton_gris','Teint_Dans_La_Masse','cartonnette','kraft','flou','mal_croppe','environnement','metal','autre_refus','plastique','Carton_brun')) 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`=23259112 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','Carton_gris','Teint_Dans_La_Masse','cartonnette','kraft','flou','mal_croppe','environnement','metal','autre_refus','plastique','Carton_brun')) AND mptpi.`min_score`=0.5 To do returned map {'flou': {'main_port_id': 23259112, 'sub_port_id': 23259131, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15514735, 'last_updated_at': datetime.datetime(2025, 5, 22, 9, 34, 57), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 9, 34, 57), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 9, 34, 57)}, 'autre_refus': {'main_port_id': 23259112, 'sub_port_id': 23259132, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15514736, 'last_updated_at': datetime.datetime(2025, 5, 22, 9, 34, 57), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 9, 34, 57), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 9, 34, 57)}, 'plastique': {'main_port_id': 23259112, 'sub_port_id': 23259133, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15514737, 'last_updated_at': datetime.datetime(2025, 5, 22, 9, 34, 57), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 9, 34, 57), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 9, 34, 57)}, 'Carton_gris': {'main_port_id': 23259112, 'sub_port_id': 23259134, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15514738, 'last_updated_at': datetime.datetime(2025, 5, 22, 9, 34, 57), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 9, 34, 57), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 9, 34, 57)}, 'environnement': {'main_port_id': 23259112, 'sub_port_id': 23259135, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15514739, 'last_updated_at': datetime.datetime(2025, 5, 22, 9, 34, 57), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 9, 34, 57), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 9, 34, 57)}, 'papier': {'main_port_id': 23259112, 'sub_port_id': 23259136, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15514740, 'last_updated_at': datetime.datetime(2025, 5, 22, 9, 34, 57), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 9, 34, 57), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 9, 34, 57)}, 'Teint_Dans_La_Masse': {'main_port_id': 23259112, 'sub_port_id': 23259137, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15514741, 'last_updated_at': datetime.datetime(2025, 5, 22, 9, 34, 57), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 9, 34, 57), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 9, 34, 57)}, 'Carton_brun': {'main_port_id': 23259112, 'sub_port_id': 23259138, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15514742, 'last_updated_at': datetime.datetime(2025, 5, 22, 9, 34, 57), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 9, 34, 57), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 9, 34, 57)}, 'cartonnette': {'main_port_id': 23259112, 'sub_port_id': 23259139, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15514743, 'last_updated_at': datetime.datetime(2025, 5, 22, 9, 34, 57), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 9, 34, 57), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 9, 34, 57)}, 'metal': {'main_port_id': 23259112, 'sub_port_id': 23259140, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15514744, 'last_updated_at': datetime.datetime(2025, 5, 22, 9, 34, 57), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 9, 34, 57), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 9, 34, 57)}, 'kraft': {'main_port_id': 23259112, 'sub_port_id': 23259141, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15514745, 'last_updated_at': datetime.datetime(2025, 5, 22, 9, 34, 57), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 9, 34, 57), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 9, 34, 57)}, 'mal_croppe': {'main_port_id': 23259112, 'sub_port_id': 23259142, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15514746, 'last_updated_at': datetime.datetime(2025, 5, 22, 9, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 9, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 9, 34, 57)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23259131,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23259119 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23259132,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23259120 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23259133,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23259121 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23259134,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23259122 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23259135,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23259123 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23259136,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23259124 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23259137,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23259125 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23259138,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23259126 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23259139,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23259127 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23259140,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23259128 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23259141,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23259129 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23259142,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23259130 lien utilise dans velours : https://www.fotonower.com/velours/23259131,23259132,23259133,23259134,23259135,23259136,23259137,23259138,23259139,23259140,23259141,23259142?tags=flou,autre_refus,plastique,Carton_gris,environnement,papier,Teint_Dans_La_Masse,Carton_brun,cartonnette,metal,kraft,mal_croppe After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([23259112]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1360467726, 1360467721, 1360467715, 1360467713, 1360467478, 1360467440, 1360467407, 1360467376, 1360467245] map_info['map_portfolio_photo'] : {23259112: [1360467726, 1360467721, 1360467715, 1360467713, 1360467478, 1360467440, 1360467407, 1360467376, 1360467245, 1360466619, 1360466566, 1360466495, 1360466418, 1360465554, 1360465467, 1360465433, 1360465404, 1360465376, 1360465002, 1360464972, 1360464945, 1360464848, 1360464845, 1360464842, 1360464838, 1360464831, 1360464829, 1360464752, 1360464723, 1360464694, 1360464678, 1360464676, 1360464673, 1360464516, 1360464483, 1360464456, 1360464423, 1360464420, 1360464419, 1360464411, 1360464376, 1360464372, 1360464358, 1360464329, 1360463965]} final : False mtd_id 4302 list_pids : [1360467726, 1360467721, 1360467715, 1360467713, 1360467478, 1360467440, 1360467407, 1360467376, 1360467245] Looping around the photos to save general results len do output : 1 /23259112. 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, '2934592') ('4302', '23259112', '1360467726', None, None, None, None, None, '2934592') ('4302', None, None, None, None, None, None, None, '2934592') ('4302', '23259112', '1360467721', None, None, None, None, None, '2934592') ('4302', None, None, None, None, None, None, None, '2934592') ('4302', '23259112', '1360467715', None, None, None, None, None, '2934592') ('4302', None, None, None, None, None, None, None, '2934592') ('4302', '23259112', '1360467713', None, None, None, None, None, '2934592') ('4302', None, None, None, None, None, None, None, '2934592') ('4302', '23259112', '1360467478', None, None, None, None, None, '2934592') ('4302', None, None, None, None, None, None, None, '2934592') ('4302', '23259112', '1360467440', None, None, None, None, None, '2934592') ('4302', None, None, None, None, None, None, None, '2934592') ('4302', '23259112', '1360467407', None, None, None, None, None, '2934592') ('4302', None, None, None, None, None, None, None, '2934592') ('4302', '23259112', '1360467376', None, None, None, None, None, '2934592') ('4302', None, None, None, None, None, None, None, '2934592') ('4302', '23259112', '1360467245', None, None, None, None, None, '2934592') 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', None, '23259112', "{'flou': 23259119, 'autre_refus': 23259120, 'plastique': 23259121, 'Carton_gris': 23259122, 'environnement': 23259123, 'papier': 23259124, 'Teint_Dans_La_Masse': 23259125, 'Carton_brun': 23259126, 'cartonnette': 23259127, 'metal': 23259128, 'kraft': 23259129, 'mal_croppe': 23259130}", None, None, None, None, '2934592'), ('4302', '23259112', '1360467726', None, None, None, None, None, '2934592'), ('4302', '23259112', '1360467721', None, None, None, None, None, '2934592'), ('4302', '23259112', '1360467715', None, None, None, None, None, '2934592'), ('4302', '23259112', '1360467713', None, None, None, None, None, '2934592'), ('4302', '23259112', '1360467478', None, None, None, None, None, '2934592'), ('4302', '23259112', '1360467440', None, None, None, None, None, '2934592'), ('4302', '23259112', '1360467407', None, None, None, None, None, '2934592'), ('4302', '23259112', '1360467376', None, None, None, None, None, '2934592'), ('4302', '23259112', '1360467245', None, None, None, None, None, '2934592')] time used for this insertion : 0.04644656181335449 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5974960327148438 time spend to save output : 0.04678058624267578 total time spend for step 1 : 1.6442766189575195 step2:final Thu May 22 09:43:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! 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 (23259112) 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 23259112 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1360463965,1360464376,1360464372,1360464358,1360464329,1360464423,1360464420,1360464419,1360464411,1360464516,1360464483,1360464456,1360464752,1360464723,1360464694,1360464678,1360464676,1360464673,1360464848,1360464845,1360464842,1360464838,1360464831,1360464829,1360465002,1360464972,1360464945,1360465554,1360465467,1360465433,1360465404,1360465376,1360466619,1360466566,1360466495,1360466418,1360467478,1360467440,1360467407,1360467245,1360467376,1360467726,1360467721,1360467715,1360467713); 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([23259112]) Inside saveOutput : final : False verbose : True original output for save of step final : {1360467726: ('0.05997788343495214',), 1360467721: ('0.05997788343495214',), 1360467715: ('0.05997788343495214',), 1360467713: ('0.05997788343495214',), 1360467478: ('0.05997788343495214',), 1360467440: ('0.05997788343495214',), 1360467407: ('0.05997788343495214',), 1360467376: ('0.05997788343495214',), 1360467245: ('0.05997788343495214',)} new output for save of step final : {1360467726: ('0.05997788343495214',), 1360467721: ('0.05997788343495214',), 1360467715: ('0.05997788343495214',), 1360467713: ('0.05997788343495214',), 1360467478: ('0.05997788343495214',), 1360467440: ('0.05997788343495214',), 1360467407: ('0.05997788343495214',), 1360467376: ('0.05997788343495214',), 1360467245: ('0.05997788343495214',)} [1360467726, 1360467721, 1360467715, 1360467713, 1360467478, 1360467440, 1360467407, 1360467376, 1360467245] map_info['map_portfolio_photo'] : {23259112: [1360467726, 1360467721, 1360467715, 1360467713, 1360467478, 1360467440, 1360467407, 1360467376, 1360467245, 1360466619, 1360466566, 1360466495, 1360466418, 1360465554, 1360465467, 1360465433, 1360465404, 1360465376, 1360465002, 1360464972, 1360464945, 1360464848, 1360464845, 1360464842, 1360464838, 1360464831, 1360464829, 1360464752, 1360464723, 1360464694, 1360464678, 1360464676, 1360464673, 1360464516, 1360464483, 1360464456, 1360464423, 1360464420, 1360464419, 1360464411, 1360464376, 1360464372, 1360464358, 1360464329, 1360463965]} final : False mtd_id 4302 list_pids : [1360467726, 1360467721, 1360467715, 1360467713, 1360467478, 1360467440, 1360467407, 1360467376, 1360467245] Looping around the photos to save general results len do output : 9 /1360467726.Didn't retrieve data . /1360467721.Didn't retrieve data . /1360467715.Didn't retrieve data . /1360467713.Didn't retrieve data . /1360467478.Didn't retrieve data . /1360467440.Didn't retrieve data . /1360467407.Didn't retrieve data . /1360467376.Didn't retrieve data . /1360467245.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, '2934592') ('4302', '23259112', '1360467726', None, None, None, None, None, '2934592') ('4302', None, None, None, None, None, None, None, '2934592') ('4302', '23259112', '1360467721', None, None, None, None, None, '2934592') ('4302', None, None, None, None, None, None, None, '2934592') ('4302', '23259112', '1360467715', None, None, None, None, None, '2934592') ('4302', None, None, None, None, None, None, None, '2934592') ('4302', '23259112', '1360467713', None, None, None, None, None, '2934592') ('4302', None, None, None, None, None, None, None, '2934592') ('4302', '23259112', '1360467478', None, None, None, None, None, '2934592') ('4302', None, None, None, None, None, None, None, '2934592') ('4302', '23259112', '1360467440', None, None, None, None, None, '2934592') ('4302', None, None, None, None, None, None, None, '2934592') ('4302', '23259112', '1360467407', None, None, None, None, None, '2934592') ('4302', None, None, None, None, None, None, None, '2934592') ('4302', '23259112', '1360467376', None, None, None, None, None, '2934592') ('4302', None, None, None, None, None, None, None, '2934592') ('4302', '23259112', '1360467245', None, None, None, None, None, '2934592') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 27 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', '23259112', '1360467726', '0.05997788343495214', None, None, None, None, '2934592'), ('4302', '23259112', '1360467721', '0.05997788343495214', None, None, None, None, '2934592'), ('4302', '23259112', '1360467715', '0.05997788343495214', None, None, None, None, '2934592'), ('4302', '23259112', '1360467713', '0.05997788343495214', None, None, None, None, '2934592'), ('4302', '23259112', '1360467478', '0.05997788343495214', None, None, None, None, '2934592'), ('4302', '23259112', '1360467440', '0.05997788343495214', None, None, None, None, '2934592'), ('4302', '23259112', '1360467407', '0.05997788343495214', None, None, None, None, '2934592'), ('4302', '23259112', '1360467376', '0.05997788343495214', None, None, None, None, '2934592'), ('4302', '23259112', '1360467245', '0.05997788343495214', None, None, None, None, '2934592')] time used for this insertion : 0.03803396224975586 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.12296414375305176 time spend to save output : 0.038542985916137695 total time spend for step 2 : 0.16150712966918945 step3:velours_tree Thu May 22 09:43:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {23259112: [{'flou': 23259119, 'autre_refus': 23259120, 'plastique': 23259121, 'Carton_gris': 23259122, 'environnement': 23259123, 'papier': 23259124, 'Teint_Dans_La_Masse': 23259125, 'Carton_brun': 23259126, 'cartonnette': 23259127, 'metal': 23259128, 'kraft': 23259129, 'mal_croppe': 23259130}]} input_args_next_step : {23259112: ()} output_args : {23259112: [{'flou': 23259119, 'autre_refus': 23259120, 'plastique': 23259121, 'Carton_gris': 23259122, 'environnement': 23259123, 'papier': 23259124, 'Teint_Dans_La_Masse': 23259125, 'Carton_brun': 23259126, 'cartonnette': 23259127, 'metal': 23259128, 'kraft': 23259129, 'mal_croppe': 23259130}]} args : 23259112 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 : ({'flou': 23259119, 'autre_refus': 23259120, 'plastique': 23259121, 'Carton_gris': 23259122, 'environnement': 23259123, 'papier': 23259124, 'Teint_Dans_La_Masse': 23259125, 'Carton_brun': 23259126, 'cartonnette': 23259127, 'metal': 23259128, 'kraft': 23259129, 'mal_croppe': 23259130},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (23259112) 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([23259112]) 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.369387149810791 time spend to save output : 7.104873657226562e-05 total time spend for step 3 : 0.3694581985473633 step4:send_mail_cod Thu May 22 09:43: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 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 : {1360467726: ('0.05997788343495214',), 1360467721: ('0.05997788343495214',), 1360467715: ('0.05997788343495214',), 1360467713: ('0.05997788343495214',), 1360467478: ('0.05997788343495214',), 1360467440: ('0.05997788343495214',), 1360467407: ('0.05997788343495214',), 1360467376: ('0.05997788343495214',), 1360467245: ('0.05997788343495214',)} input_args_next_step : {1360467726: ()} output_args : {1360467726: ('0.05997788343495214',), 1360467721: ('0.05997788343495214',), 1360467715: ('0.05997788343495214',), 1360467713: ('0.05997788343495214',), 1360467478: ('0.05997788343495214',), 1360467440: ('0.05997788343495214',), 1360467407: ('0.05997788343495214',), 1360467376: ('0.05997788343495214',), 1360467245: ('0.05997788343495214',)} args : 1360467726 depend.output_id : 0 input_args_next_step : {1360467726: ('0.05997788343495214',), 1360467721: ()} output_args : {1360467726: ('0.05997788343495214',), 1360467721: ('0.05997788343495214',), 1360467715: ('0.05997788343495214',), 1360467713: ('0.05997788343495214',), 1360467478: ('0.05997788343495214',), 1360467440: ('0.05997788343495214',), 1360467407: ('0.05997788343495214',), 1360467376: ('0.05997788343495214',), 1360467245: ('0.05997788343495214',)} args : 1360467721 depend.output_id : 0 input_args_next_step : {1360467726: ('0.05997788343495214',), 1360467721: ('0.05997788343495214',), 1360467715: ()} output_args : {1360467726: ('0.05997788343495214',), 1360467721: ('0.05997788343495214',), 1360467715: ('0.05997788343495214',), 1360467713: ('0.05997788343495214',), 1360467478: ('0.05997788343495214',), 1360467440: ('0.05997788343495214',), 1360467407: ('0.05997788343495214',), 1360467376: ('0.05997788343495214',), 1360467245: ('0.05997788343495214',)} args : 1360467715 depend.output_id : 0 input_args_next_step : {1360467726: ('0.05997788343495214',), 1360467721: ('0.05997788343495214',), 1360467715: ('0.05997788343495214',), 1360467713: ()} output_args : {1360467726: ('0.05997788343495214',), 1360467721: ('0.05997788343495214',), 1360467715: ('0.05997788343495214',), 1360467713: ('0.05997788343495214',), 1360467478: ('0.05997788343495214',), 1360467440: ('0.05997788343495214',), 1360467407: ('0.05997788343495214',), 1360467376: ('0.05997788343495214',), 1360467245: ('0.05997788343495214',)} args : 1360467713 depend.output_id : 0 input_args_next_step : {1360467726: ('0.05997788343495214',), 1360467721: ('0.05997788343495214',), 1360467715: ('0.05997788343495214',), 1360467713: ('0.05997788343495214',), 1360467478: ()} output_args : {1360467726: ('0.05997788343495214',), 1360467721: ('0.05997788343495214',), 1360467715: ('0.05997788343495214',), 1360467713: ('0.05997788343495214',), 1360467478: ('0.05997788343495214',), 1360467440: ('0.05997788343495214',), 1360467407: ('0.05997788343495214',), 1360467376: ('0.05997788343495214',), 1360467245: ('0.05997788343495214',)} args : 1360467478 depend.output_id : 0 input_args_next_step : {1360467726: ('0.05997788343495214',), 1360467721: ('0.05997788343495214',), 1360467715: ('0.05997788343495214',), 1360467713: ('0.05997788343495214',), 1360467478: ('0.05997788343495214',), 1360467440: ()} output_args : {1360467726: ('0.05997788343495214',), 1360467721: ('0.05997788343495214',), 1360467715: ('0.05997788343495214',), 1360467713: ('0.05997788343495214',), 1360467478: ('0.05997788343495214',), 1360467440: ('0.05997788343495214',), 1360467407: ('0.05997788343495214',), 1360467376: ('0.05997788343495214',), 1360467245: ('0.05997788343495214',)} args : 1360467440 depend.output_id : 0 input_args_next_step : {1360467726: ('0.05997788343495214',), 1360467721: ('0.05997788343495214',), 1360467715: ('0.05997788343495214',), 1360467713: ('0.05997788343495214',), 1360467478: ('0.05997788343495214',), 1360467440: ('0.05997788343495214',), 1360467407: ()} output_args : {1360467726: ('0.05997788343495214',), 1360467721: ('0.05997788343495214',), 1360467715: ('0.05997788343495214',), 1360467713: ('0.05997788343495214',), 1360467478: ('0.05997788343495214',), 1360467440: ('0.05997788343495214',), 1360467407: ('0.05997788343495214',), 1360467376: ('0.05997788343495214',), 1360467245: ('0.05997788343495214',)} args : 1360467407 depend.output_id : 0 input_args_next_step : {1360467726: ('0.05997788343495214',), 1360467721: ('0.05997788343495214',), 1360467715: ('0.05997788343495214',), 1360467713: ('0.05997788343495214',), 1360467478: ('0.05997788343495214',), 1360467440: ('0.05997788343495214',), 1360467407: ('0.05997788343495214',), 1360467376: ()} output_args : {1360467726: ('0.05997788343495214',), 1360467721: ('0.05997788343495214',), 1360467715: ('0.05997788343495214',), 1360467713: ('0.05997788343495214',), 1360467478: ('0.05997788343495214',), 1360467440: ('0.05997788343495214',), 1360467407: ('0.05997788343495214',), 1360467376: ('0.05997788343495214',), 1360467245: ('0.05997788343495214',)} args : 1360467376 depend.output_id : 0 input_args_next_step : {1360467726: ('0.05997788343495214',), 1360467721: ('0.05997788343495214',), 1360467715: ('0.05997788343495214',), 1360467713: ('0.05997788343495214',), 1360467478: ('0.05997788343495214',), 1360467440: ('0.05997788343495214',), 1360467407: ('0.05997788343495214',), 1360467376: ('0.05997788343495214',), 1360467245: ()} output_args : {1360467726: ('0.05997788343495214',), 1360467721: ('0.05997788343495214',), 1360467715: ('0.05997788343495214',), 1360467713: ('0.05997788343495214',), 1360467478: ('0.05997788343495214',), 1360467440: ('0.05997788343495214',), 1360467407: ('0.05997788343495214',), 1360467376: ('0.05997788343495214',), 1360467245: ('0.05997788343495214',)} args : 1360467245 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 : {23259112: [{'flou': 23259119, 'autre_refus': 23259120, 'plastique': 23259121, 'Carton_gris': 23259122, 'environnement': 23259123, 'papier': 23259124, 'Teint_Dans_La_Masse': 23259125, 'Carton_brun': 23259126, 'cartonnette': 23259127, 'metal': 23259128, 'kraft': 23259129, 'mal_croppe': 23259130}]} input_args_next_step : {1360467726: ('0.05997788343495214',), 1360467721: ('0.05997788343495214',), 1360467715: ('0.05997788343495214',), 1360467713: ('0.05997788343495214',), 1360467478: ('0.05997788343495214',), 1360467440: ('0.05997788343495214',), 1360467407: ('0.05997788343495214',), 1360467376: ('0.05997788343495214',), 1360467245: ('0.05997788343495214',), 23259112: ()} output_args : {23259112: [{'flou': 23259119, 'autre_refus': 23259120, 'plastique': 23259121, 'Carton_gris': 23259122, 'environnement': 23259123, 'papier': 23259124, 'Teint_Dans_La_Masse': 23259125, 'Carton_brun': 23259126, 'cartonnette': 23259127, 'metal': 23259128, 'kraft': 23259129, 'mal_croppe': 23259130}]} args : 23259112 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 :10, first value : ('0.05997788343495214',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (23259112) 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 (1360467726,1360467721,1360467715,1360467713,1360467478,1360467440,1360467407,1360467376,1360467245) Found this number of photos: 9 ##### Call download_photos : nb_thread : 5 begin to download photo : 1360467245 begin to download photo : 1360467407 begin to download photo : 1360467478 begin to download photo : 1360467715 begin to download photo : 1360467726 download finish for photo 1360467726 download finish for photo 1360467245 begin to download photo : 1360467376 download finish for photo 1360467407 begin to download photo : 1360467440 download finish for photo 1360467715 begin to download photo : 1360467721 download finish for photo 1360467478 begin to download photo : 1360467713 download finish for photo 1360467440 download finish for photo 1360467721 download finish for photo 1360467713 download finish for photo 1360467376 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette232591191747899782/ length of list_filenames : 9 ; length of list_pids : 9 ; length of list_args : 9 results_Auto_P23259112_22-05-2025_09_43_02.pdf 23259119 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=23259119 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette232591191747899782 23259120 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=23259120 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1360466214: '1747899567_1692389_1360464972_ccdf78f2eb7e773d54cc98aae67f4b02_rle_crop_3809862971_0.png', 1360466216: '1747899567_1692389_1360464945_58cd3557f617bb60a7f9c263d7d9886a_rle_crop_3809863203_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/517982a960b4e7c040e1038637db5b2e_99775057.png change filename to text .imagette232591201747899782/ imagette232591201747899782/1747899567_1692389_1360464945_58cd3557f617bb60a7f9c263d7d9886a_rle_crop_3809863203_0.png.png imagette232591201747899782/1747899567_1692389_1360464972_ccdf78f2eb7e773d54cc98aae67f4b02_rle_crop_3809862971_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/078144009197e64e3ad500e30da44276_27758989.png imagette232591201747899782 23259121 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=23259121 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1360464672: '1747899325_1689010_1360464423_6afcce811ee830e99cb97dbb6ced850f_rle_crop_3809854301_0.png', 1360466239: '1747899567_1692389_1360464945_58cd3557f617bb60a7f9c263d7d9886a_rle_crop_3809863207_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/fc125efeb1bf780b7a4162430affe446_85199247.png change filename to text .imagette232591211747899782/ imagette232591211747899782/1747899567_1692389_1360464945_58cd3557f617bb60a7f9c263d7d9886a_rle_crop_3809863207_0.png.png imagette232591211747899782/1747899325_1689010_1360464423_6afcce811ee830e99cb97dbb6ced850f_rle_crop_3809854301_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/10786788a64faa6d0b7121f0fe69e1d6_93152369.png imagette232591211747899782 23259127 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=23259127 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1360464664: '1747899325_1689010_1360464423_6afcce811ee830e99cb97dbb6ced850f_rle_crop_3809854302_0.png', 1360464665: '1747899325_1689010_1360464423_6afcce811ee830e99cb97dbb6ced850f_rle_crop_3809854306_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/1c3471f140c7e4913687330109400fcf_963551.png change filename to text .imagette232591271747899782/ imagette232591271747899782/1747899325_1689010_1360464423_6afcce811ee830e99cb97dbb6ced850f_rle_crop_3809854306_0.png.png imagette232591271747899782/1747899325_1689010_1360464423_6afcce811ee830e99cb97dbb6ced850f_rle_crop_3809854302_0.png.png imagette232591281747899782/ imagette232591291747899782/ imagette232591301747899782/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/370e5dcdaded2b6374a52d4b0cf3d4ef_61986657.png imagette232591271747899782 23259128 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=23259128 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette232591281747899782 23259129 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=23259129 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette232591291747899782 23259130 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=23259130 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette232591301747899782 23259122 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=23259122 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1360466225: '1747899567_1692389_1360464972_ccdf78f2eb7e773d54cc98aae67f4b02_rle_crop_3809862968_0.png'} change filename to text .imagette232591221747899782/ imagette232591221747899782/1747899567_1692389_1360464972_ccdf78f2eb7e773d54cc98aae67f4b02_rle_crop_3809862968_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/a408a8e139a95fcf12a5bf641a4b3738_2161898.png imagette232591221747899782 23259125 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=23259125 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1360464663: '1747899325_1689010_1360464423_6afcce811ee830e99cb97dbb6ced850f_rle_crop_3809854310_0.png', 1360466205: '1747899567_1692389_1360464945_58cd3557f617bb60a7f9c263d7d9886a_rle_crop_3809863208_0.png', 1360467661: '1747899687_1696040_1360466418_9ec1a6799d827cbfcbff44f427dfdf0d_rle_crop_3809873320_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/39b1602814b0f4eab46416d95a358e44_3529263.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/04b5147ca0dd197a20dd0a4b48eaf668_42305428.png change filename to text .imagette232591251747899782/ imagette232591251747899782/1747899687_1696040_1360466418_9ec1a6799d827cbfcbff44f427dfdf0d_rle_crop_3809873320_0.png.png imagette232591251747899782/1747899567_1692389_1360464945_58cd3557f617bb60a7f9c263d7d9886a_rle_crop_3809863208_0.png.png imagette232591251747899782/1747899325_1689010_1360464423_6afcce811ee830e99cb97dbb6ced850f_rle_crop_3809854310_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/e5c25a9cda405720d5f08f80cbe2eabf_36695957.png imagette232591251747899782 23259126 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=23259126 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1360464667: '1747899325_1689010_1360464376_9865a248cef56ac2b69b8e6178e834ab_rle_crop_3809854319_0.png', 1360464668: '1747899325_1689010_1360464376_9865a248cef56ac2b69b8e6178e834ab_rle_crop_3809854321_0.png', 1360464669: '1747899325_1689010_1360464372_785e1267f461c6d15d561094a3ef0ffe_rle_crop_3809854331_0.png', 1360464670: '1747899325_1689010_1360464358_2074393541955e0b2e435cff99b09259_rle_crop_3809854342_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/3b87b1f832bd367b4015682e9a0847e3_74470004.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/dbc311968a601d80a8b3e7b01b024c6e_71164047.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/a3802db186859af71562bf6fb98554df_75860152.png change filename to text .imagette232591261747899782/ imagette232591261747899782/1747899325_1689010_1360464376_9865a248cef56ac2b69b8e6178e834ab_rle_crop_3809854321_0.png.png imagette232591261747899782/1747899325_1689010_1360464358_2074393541955e0b2e435cff99b09259_rle_crop_3809854342_0.png.png imagette232591261747899782/1747899325_1689010_1360464372_785e1267f461c6d15d561094a3ef0ffe_rle_crop_3809854331_0.png.png imagette232591261747899782/1747899325_1689010_1360464376_9865a248cef56ac2b69b8e6178e834ab_rle_crop_3809854319_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/a417be9bbb7e3da6a9f474bd7e833f34_33656801.png imagette232591261747899782 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=23259112 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/23259131,23259132,23259133,23259134,23259135,23259136,23259137,23259138,23259139,23259140,23259141,23259142?tags=flou,autre_refus,plastique,Carton_gris,environnement,papier,Teint_Dans_La_Masse,Carton_brun,cartonnette,metal,kraft,mal_croppe your option no_mail is active, we will not send the real mail to your client args[1360467726] : ('0.05997788343495214',) no score found for photo 1360467726 We are sending mail with results at report@fotonower.com args[1360467721] : ('0.05997788343495214',) no score found for photo 1360467721 We are sending mail with results at report@fotonower.com args[1360467715] : ('0.05997788343495214',) no score found for photo 1360467715 We are sending mail with results at report@fotonower.com args[1360467713] : ('0.05997788343495214',) no score found for photo 1360467713 We are sending mail with results at report@fotonower.com args[1360467478] : ('0.05997788343495214',) no score found for photo 1360467478 We are sending mail with results at report@fotonower.com args[1360467440] : ('0.05997788343495214',) no score found for photo 1360467440 We are sending mail with results at report@fotonower.com args[1360467407] : ('0.05997788343495214',) no score found for photo 1360467407 We are sending mail with results at report@fotonower.com args[1360467376] : ('0.05997788343495214',) no score found for photo 1360467376 We are sending mail with results at report@fotonower.com args[1360467245] : ('0.05997788343495214',) no score found for photo 1360467245 We are sending mail with results at report@fotonower.com refus_total : 0.05997788343495214 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=23259112 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_P23259112_22-05-2025_09_43_02.pdf results_Auto_P23259112_22-05-2025_09_43_02.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23259112_22-05-2025_09_43_02.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','23259112','results_Auto_P23259112_22-05-2025_09_43_02.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23259112_22-05-2025_09_43_02.pdf','pdf','','0.13','0.05997788343495214') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([23259112]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1360467726, 1360467721, 1360467715, 1360467713, 1360467478, 1360467440, 1360467407, 1360467376, 1360467245] map_info['map_portfolio_photo'] : {23259112: [1360467726, 1360467721, 1360467715, 1360467713, 1360467478, 1360467440, 1360467407, 1360467376, 1360467245, 1360466619, 1360466566, 1360466495, 1360466418, 1360465554, 1360465467, 1360465433, 1360465404, 1360465376, 1360465002, 1360464972, 1360464945, 1360464848, 1360464845, 1360464842, 1360464838, 1360464831, 1360464829, 1360464752, 1360464723, 1360464694, 1360464678, 1360464676, 1360464673, 1360464516, 1360464483, 1360464456, 1360464423, 1360464420, 1360464419, 1360464411, 1360464376, 1360464372, 1360464358, 1360464329, 1360463965]} final : False mtd_id 4302 list_pids : [1360467726, 1360467721, 1360467715, 1360467713, 1360467478, 1360467440, 1360467407, 1360467376, 1360467245] 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, '2934592') ('4302', '23259112', '1360467726', None, None, None, None, None, '2934592') ('4302', None, None, None, None, None, None, None, '2934592') ('4302', '23259112', '1360467721', None, None, None, None, None, '2934592') ('4302', None, None, None, None, None, None, None, '2934592') ('4302', '23259112', '1360467715', None, None, None, None, None, '2934592') ('4302', None, None, None, None, None, None, None, '2934592') ('4302', '23259112', '1360467713', None, None, None, None, None, '2934592') ('4302', None, None, None, None, None, None, None, '2934592') ('4302', '23259112', '1360467478', None, None, None, None, None, '2934592') ('4302', None, None, None, None, None, None, None, '2934592') ('4302', '23259112', '1360467440', None, None, None, None, None, '2934592') ('4302', None, None, None, None, None, None, None, '2934592') ('4302', '23259112', '1360467407', None, None, None, None, None, '2934592') ('4302', None, None, None, None, None, None, None, '2934592') ('4302', '23259112', '1360467376', None, None, None, None, None, '2934592') ('4302', None, None, None, None, None, None, None, '2934592') ('4302', '23259112', '1360467245', None, None, None, None, None, '2934592') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 9 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', '23259112', '1360467726', None, None, None, None, None, '2934592'), ('4302', '23259112', '1360467721', None, None, None, None, None, '2934592'), ('4302', '23259112', '1360467715', None, None, None, None, None, '2934592'), ('4302', '23259112', '1360467713', None, None, None, None, None, '2934592'), ('4302', '23259112', '1360467478', None, None, None, None, None, '2934592'), ('4302', '23259112', '1360467440', None, None, None, None, None, '2934592'), ('4302', '23259112', '1360467407', None, None, None, None, None, '2934592'), ('4302', '23259112', '1360467376', None, None, None, None, None, '2934592'), ('4302', '23259112', '1360467245', None, None, None, None, None, '2934592')] time used for this insertion : 0.03724980354309082 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.059504985809326 time spend to save output : 0.037465810775756836 total time spend for step 4 : 2.096970796585083 step5:split_time_score Thu May 22 09:43:04 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 : ['23259112'] 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 : [('23259112',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (23259112) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1360467726: {'path': 'temp/1747899782_2221939_1360467726_cff4f3015331794da46a7a4aec0ff5f8.jpg', 'extension': 'jpg'}, 1360467407: {'path': 'temp/1747899782_2221939_1360467407_b03d7aa5b8904ac907c462a27a0eb666.jpg', 'extension': 'jpg'}, 1360467440: {'path': 'temp/1747899782_2221939_1360467440_0c8b32c3c520678c801e590e97e55b05.jpg', 'extension': 'jpg'}, 1360467715: {'path': 'temp/1747899782_2221939_1360467715_d32225df3d1b69e4ae164894af53280f.jpg', 'extension': 'jpg'}, 1360467721: {'path': 'temp/1747899782_2221939_1360467721_d3e86588d16cc10cc3da0f2559502e8e.jpg', 'extension': 'jpg'}, 1360467478: {'path': 'temp/1747899782_2221939_1360467478_f9f59fa3ca5655bc383b335bb3a1755a.jpg', 'extension': 'jpg'}, 1360467713: {'path': 'temp/1747899782_2221939_1360467713_0a6f53a77c37fc6267e1faf73f90ef9c.jpg', 'extension': 'jpg'}, 1360467245: {'path': 'temp/1747899782_2221939_1360467245_0a417ae8cc05605a03086bc23df8fa8c.jpg', 'extension': 'jpg'}, 1360467376: {'path': 'temp/1747899782_2221939_1360467376_fde8a2a46940b4aa10c5432976c9ff91.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 = 23259112; (('arc_en_ciel_jrm_live',), ('arc_en_ciel_jrm',)) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 23259112 group by h (('09', 45),) 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=23259112 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 (23259112) 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 (23259112) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 22052025 23259112 Nombre de photos uploadées : 45 / 23040 (0%) 22052025 23259112 Nombre de photos taguées (types de déchets): 0 / 45 (0%) 22052025 23259112 Nombre de photos taguées (volume) : 0 / 45 (0%) [{'photo_id': 1360463965, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/ed818193ce9e24fd2752786b4cf591e0.jpg', 'username': None, 'uploaded_at': 1747899123, 'text': 'image_22052025_09_31_14_10139.jpg'}, {'photo_id': 1360464376, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/9865a248cef56ac2b69b8e6178e834ab.jpg', 'username': None, 'uploaded_at': 1747899187, 'text': 'image_22052025_09_32_05_010141m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1360464372, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/785e1267f461c6d15d561094a3ef0ffe.jpg', 'username': None, 'uploaded_at': 1747899187, 'text': 'image_22052025_09_32_14_009146m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1360464358, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/2074393541955e0b2e435cff99b09259.jpg', 'username': None, 'uploaded_at': 1747899187, 'text': 'image_22052025_09_32_24_010140m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 5.7220458984375e-06 elapsed_time : order_list_meta_photo_and_scores 2.002716064453125e-05 ????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.004241228103637695 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 23259112, '2025-05-22' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1828582,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.030431270599365234 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= 1828582 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1828582, 'dashboard_run_id': 1837630, 'mtr_portfolio_id': 23245647, 'dashboard_result_id': 10831926, '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_P23245647_22-05-2025_06_10_29.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23245667, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23245668, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23245669, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23245670, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23245671, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23245672, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23245673, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23245674, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23245675, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23245676, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23245677, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23245678, 'pht': 3726}}"}, {'dashboat_entry_day': 1828582, 'dashboard_run_id': 1837630, 'mtr_portfolio_id': 23246295, 'dashboard_result_id': 10831927, '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_P23246295_22-05-2025_06_11_28.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23246336, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23246337, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23246338, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23246339, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23246340, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23246341, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23246342, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23246343, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23246344, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23246345, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23246346, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23246347, 'pht': 3726}}"}, {'dashboat_entry_day': 1828582, 'dashboard_run_id': 1837630, 'mtr_portfolio_id': 23246834, 'dashboard_result_id': 10831928, '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_P23246834_22-05-2025_05_46_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23246877, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23246878, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23246879, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23246880, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23246881, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23246882, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23246883, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23246884, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23246885, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23246886, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23246887, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23246888, 'pht': 3726}}"}, {'dashboat_entry_day': 1828582, 'dashboard_run_id': 1837630, 'mtr_portfolio_id': 23247440, 'dashboard_result_id': 10831929, '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_P23247440_22-05-2025_06_03_28.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23247486, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23247487, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23247488, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23247489, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23247490, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23247491, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23247492, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23247493, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23247494, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23247495, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23247496, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23247497, 'pht': 3726}}"}, {'dashboat_entry_day': 1828582, 'dashboard_run_id': 1837630, 'mtr_portfolio_id': 23248080, 'dashboard_result_id': 10831930, '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_P23248080_22-05-2025_06_18_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23248123, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23248124, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23248125, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23248126, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23248127, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23248128, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23248129, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23248130, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23248131, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23248132, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23248133, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23248134, 'pht': 3726}}"}, {'dashboat_entry_day': 1828582, 'dashboard_run_id': 1837630, 'mtr_portfolio_id': 23249066, 'dashboard_result_id': 10831931, '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_P23249066_22-05-2025_06_32_57.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23249098, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23249099, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23249100, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23249101, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23249102, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23249103, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23249104, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23249105, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23249106, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23249107, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23249108, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23249109, 'pht': 3726}}"}, {'dashboat_entry_day': 1828582, 'dashboard_run_id': 1837630, 'mtr_portfolio_id': 23249917, 'dashboard_result_id': 10831932, '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_P23249917_22-05-2025_06_48_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 23249931, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23249932, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23249933, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23249934, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23249935, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23249936, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23249937, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23249938, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23249939, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23249940, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23249941, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23249942, 'pht': 3726}}"}, {'dashboat_entry_day': 1828582, 'dashboard_run_id': 1837630, 'mtr_portfolio_id': 23250582, 'dashboard_result_id': 10831933, '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_P23250582_22-05-2025_06_59_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23250655, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23250656, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23250657, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23250658, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23250659, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23250660, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23250661, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23250662, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23250663, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23250664, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23250665, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23250666, 'pht': 3726}}"}, {'dashboat_entry_day': 1828582, 'dashboard_run_id': 1837630, 'mtr_portfolio_id': 23256653, 'dashboard_result_id': 10831934, '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_P23256653_22-05-2025_08_50_32.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23256735, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23256736, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23256737, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23256738, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23256739, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23256740, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23256741, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23256742, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23256743, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23256744, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23256745, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23256746, 'pht': 3726}}"}, {'dashboat_entry_day': 1828582, 'dashboard_run_id': 1837630, 'mtr_portfolio_id': 23259112, 'dashboard_result_id': 10831935, '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_P23259112_22-05-2025_09_40_59.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 23259119, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23259120, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23259121, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23259122, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23259123, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23259124, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23259125, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23259126, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23259127, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23259128, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23259129, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23259130, '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 = 23245647 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': 2931120, 'mtr_portfolio_id': 23245647, 'created_at': datetime.datetime(2025, 5, 22, 6, 10, 28), 'result': '0.10100379997966319', 'result_long': None, 'result_double': None}] Qualite : 0.10100379997966319 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23245647 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23245647_22-05-2025_06_10_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23245647 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_P23245647_22-05-2025_06_10_29.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23245667, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23245668, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23245669, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23245670, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23245671, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23245672, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23245673, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23245674, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23245675, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23245676, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23245677, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23245678, 'pht': 3726}}" where mtr_portfolio_id = 23245647 and dashboard_run_id = 1837630 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`=23245647 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10831926, 0.10100379997966319, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23245647_22-05-2025_06_10_29.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23245667, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23245668, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23245669, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23245670, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23245671, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23245672, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23245673, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23245674, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23245675, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23245676, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23245677, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23245678, '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 = 23246295 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': 2931121, 'mtr_portfolio_id': 23246295, 'created_at': datetime.datetime(2025, 5, 22, 6, 11, 26), 'result': '0.054239532515861555', 'result_long': None, 'result_double': None}] Qualite : 0.054239532515861555 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23246295 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23246295_22-05-2025_06_11_28.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23246295 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_P23246295_22-05-2025_06_11_28.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23246336, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23246337, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23246338, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23246339, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23246340, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23246341, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23246342, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23246343, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23246344, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23246345, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23246346, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23246347, 'pht': 3726}}" where mtr_portfolio_id = 23246295 and dashboard_run_id = 1837630 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`=23246295 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10831927, 0.054239532515861555, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23246295_22-05-2025_06_11_28.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23246336, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23246337, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23246338, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23246339, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23246340, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23246341, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23246342, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23246343, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23246344, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23246345, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23246346, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23246347, '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 = 23246834 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': 2931049, 'mtr_portfolio_id': 23246834, 'created_at': datetime.datetime(2025, 5, 22, 5, 46, 59), 'result': '0.038235238211983144', 'result_long': None, 'result_double': None}] Qualite : 0.038235238211983144 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23246834 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23246834_22-05-2025_05_46_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23246834 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_P23246834_22-05-2025_05_46_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23246877, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23246878, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23246879, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23246880, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23246881, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23246882, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23246883, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23246884, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23246885, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23246886, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23246887, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23246888, 'pht': 3726}}" where mtr_portfolio_id = 23246834 and dashboard_run_id = 1837630 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`=23246834 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10831928, 0.038235238211983144, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23246834_22-05-2025_05_46_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23246877, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23246878, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23246879, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23246880, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23246881, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23246882, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23246883, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23246884, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23246885, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23246886, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23246887, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23246888, '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 = 23247440 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': 2931225, 'mtr_portfolio_id': 23247440, 'created_at': datetime.datetime(2025, 5, 22, 6, 3, 28), 'result': '0.0800093332737387', 'result_long': None, 'result_double': None}] Qualite : 0.0800093332737387 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23247440 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23247440_22-05-2025_06_03_28.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23247440 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_P23247440_22-05-2025_06_03_28.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23247486, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23247487, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23247488, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23247489, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23247490, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23247491, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23247492, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23247493, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23247494, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23247495, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23247496, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23247497, 'pht': 3726}}" where mtr_portfolio_id = 23247440 and dashboard_run_id = 1837630 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`=23247440 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10831929, 0.0800093332737387, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23247440_22-05-2025_06_03_28.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23247486, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23247487, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23247488, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23247489, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23247490, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23247491, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23247492, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23247493, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23247494, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23247495, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23247496, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23247497, '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 = 23248080 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': 2931334, 'mtr_portfolio_id': 23248080, 'created_at': datetime.datetime(2025, 5, 22, 6, 18, 58), 'result': '0.05135937319949131', 'result_long': None, 'result_double': None}] Qualite : 0.05135937319949131 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23248080 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23248080_22-05-2025_06_18_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23248080 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_P23248080_22-05-2025_06_18_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23248123, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23248124, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23248125, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23248126, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23248127, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23248128, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23248129, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23248130, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23248131, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23248132, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23248133, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23248134, 'pht': 3726}}" where mtr_portfolio_id = 23248080 and dashboard_run_id = 1837630 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`=23248080 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10831930, 0.05135937319949131, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23248080_22-05-2025_06_18_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23248123, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23248124, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23248125, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23248126, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23248127, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23248128, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23248129, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23248130, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23248131, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23248132, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23248133, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23248134, '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 = 23249066 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': 2931511, 'mtr_portfolio_id': 23249066, 'created_at': datetime.datetime(2025, 5, 22, 6, 32, 57), 'result': '0.05290047862984647', 'result_long': None, 'result_double': None}] Qualite : 0.05290047862984647 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23249066 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23249066_22-05-2025_06_32_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23249066 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_P23249066_22-05-2025_06_32_57.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23249098, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23249099, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23249100, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23249101, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23249102, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23249103, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23249104, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23249105, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23249106, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23249107, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23249108, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23249109, 'pht': 3726}}" where mtr_portfolio_id = 23249066 and dashboard_run_id = 1837630 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`=23249066 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10831931, 0.05290047862984647, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23249066_22-05-2025_06_32_57.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23249098, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23249099, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23249100, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23249101, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23249102, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23249103, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23249104, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23249105, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23249106, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23249107, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23249108, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23249109, '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 = 23249917 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': 2931629, 'mtr_portfolio_id': 23249917, 'created_at': datetime.datetime(2025, 5, 22, 6, 48, 59), 'result': '0.038229498046543076', 'result_long': None, 'result_double': None}] Qualite : 0.038229498046543076 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23249917 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23249917_22-05-2025_06_48_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23249917 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_P23249917_22-05-2025_06_48_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 23249931, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23249932, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23249933, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23249934, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23249935, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23249936, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23249937, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23249938, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23249939, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23249940, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23249941, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23249942, 'pht': 3726}}" where mtr_portfolio_id = 23249917 and dashboard_run_id = 1837630 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`=23249917 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10831932, 0.038229498046543076, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23249917_22-05-2025_06_48_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 23249931, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23249932, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23249933, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23249934, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23249935, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23249936, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23249937, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23249938, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23249939, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23249940, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23249941, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23249942, '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 = 23250582 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': 2931744, 'mtr_portfolio_id': 23250582, 'created_at': datetime.datetime(2025, 5, 22, 7, 2, 59), 'result': '0.05328962431632753', 'result_long': None, 'result_double': None}] Qualite : 0.05328962431632753 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23250582 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23250582_22-05-2025_07_03_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23250582 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_P23250582_22-05-2025_07_03_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23250655, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23250656, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23250657, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23250658, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23250659, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23250660, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23250661, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23250662, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23250663, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23250664, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23250665, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23250666, 'pht': 3726}}" where mtr_portfolio_id = 23250582 and dashboard_run_id = 1837630 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`=23250582 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10831933, 0.05328962431632753, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23250582_22-05-2025_07_03_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23250655, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23250656, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23250657, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23250658, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23250659, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23250660, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23250661, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23250662, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23250663, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23250664, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23250665, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23250666, '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 = 23256653 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 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 = 23256653 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 23256653 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 23256653 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 23256653 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23256653 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23256653_22-05-2025_08_50_32.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23256653 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_P23256653_22-05-2025_08_50_32.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23256735, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23256736, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23256737, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23256738, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23256739, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23256740, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23256741, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23256742, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23256743, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23256744, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23256745, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23256746, 'pht': 3726}}" where mtr_portfolio_id = 23256653 and dashboard_run_id = 1837632 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 = 23259112 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': 2934592, 'mtr_portfolio_id': 23259112, 'created_at': datetime.datetime(2025, 5, 22, 9, 43, 1), 'result': '0.05997788343495214', 'result_long': None, 'result_double': None}] Qualite : 0.05997788343495214 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23259112 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23259112_22-05-2025_09_43_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23259112 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_P23259112_22-05-2025_09_43_02.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 23259119, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23259120, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23259121, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23259122, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23259123, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23259124, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23259125, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23259126, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23259127, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23259128, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23259129, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23259130, 'pht': 3726}}" where mtr_portfolio_id = 23259112 and dashboard_run_id = 1837632 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`=23259112 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10831935, 0.05997788343495214, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23259112_22-05-2025_09_43_02.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 23259119, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23259120, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23259121, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23259122, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23259123, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23259124, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23259125, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23259126, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23259127, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23259128, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23259129, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23259130, '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 (23245647,23246295,23246834,23247440,23248080,23249066,23249917,23250582,23256653,23259112) result : ((1360388548,), (1360388617,), (1360389081,), (1360389201,), (1360389524,), (1360389555,), (1360389591,), (1360389641,), (1360389643,), (1360389740,), (1360389747,), (1360389907,), (1360389909,), (1360389975,), (1360390055,), (1360390069,), (1360390089,), (1360390097,), (1360390098,), (1360390469,), (1360390332,), (1360390366,), (1360390393,), (1360390418,), (1360390445,), (1360390842,), (1360390845,), (1360390861,), (1360391098,), (1360391122,), (1360391154,), (1360391182,), (1360391211,), (1360391235,), (1360391363,), (1360391365,), (1360391387,), (1360391392,), (1360391421,), (1360391448,), (1360391473,), (1360391715,), (1360391718,), (1360391720,), (1360391722,), (1360391724,), (1360391750,), (1360392022,), (1360392048,), (1360392112,), (1360392232,), (1360392250,), (1360392278,), (1360392286,), (1360392288,), (1360392294,), (1360392339,), (1360392346,), (1360392350,), (1360392354,), (1360392358,), (1360392597,), (1360392620,), (1360392644,), (1360392691,), (1360392734,), (1360392779,), (1360393197,), (1360393238,), (1360393257,), (1360393259,), (1360393283,), (1360393307,), (1360393600,), (1360393608,), (1360393610,), (1360393774,), (1360393777,), (1360393801,), (1360393817,), (1360393894,), (1360393906,), (1360393910,), (1360393927,), (1360393929,), (1360393930,), (1360393947,), (1360393950,), (1360393953,), (1360393956,), (1360393958,), (1360394024,), (1360393974,), (1360393976,), (1360393982,), (1360393987,), (1360394085,), (1360394091,), (1360394094,), (1360394097,), (1360394099,), (1360394218,), (1360394245,), (1360394250,), (1360394335,), (1360394338,), (1360394350,), (1360394352,), (1360394353,), (1360394355,), (1360394357,), (1360394508,), (1360394518,), (1360394543,), (1360394550,), (1360394755,), (1360394757,), (1360394760,), (1360394762,), (1360394854,), (1360394865,), (1360394867,), (1360394869,), (1360394871,), (1360394872,), (1360394882,), (1360394884,), (1360394886,), (1360394888,), (1360394890,), (1360394891,), (1360394901,), (1360394902,), (1360394904,), (1360394969,), (1360394994,), (1360395020,), (1360395044,), (1360395094,), (1360395154,), (1360395691,), (1360395723,), (1360395774,), (1360395799,), (1360395861,), (1360395863,), (1360395865,), (1360396116,), (1360396139,), (1360396146,), (1360396148,), (1360396155,), (1360396201,), (1360396372,), (1360396404,), (1360396407,), (1360396411,), (1360396563,), (1360396504,), (1360396529,), (1360396965,), (1360397034,), (1360397067,), (1360397099,), (1360397116,), (1360397241,), (1360397244,), (1360397247,), (1360397249,), (1360397251,), (1360397253,), (1360397270,), (1360397272,), (1360397275,), (1360397289,), (1360397297,), (1360397300,), (1360397328,), (1360397357,), (1360397382,), (1360397701,), (1360397730,), (1360397733,), (1360397744,), (1360397774,), (1360397786,), (1360397813,), (1360397850,), (1360397875,), (1360397904,), (1360397935,), (1360398132,), (1360398173,), (1360398206,), (1360398223,), (1360398397,), (1360398399,), (1360398402,), (1360398405,), (1360398407,), (1360398409,), (1360398425,), (1360398428,), (1360398431,), (1360398434,), (1360398588,), (1360398606,), (1360398849,), (1360398864,), (1360398869,), (1360398871,), (1360398874,), (1360398875,), (1360398926,), (1360398961,), (1360399020,), (1360399754,), (1360399560,), (1360399616,), (1360399680,), (1360399726,), (1360400195,), (1360400209,), (1360400210,), (1360400239,), (1360400314,), (1360400511,), (1360400559,), (1360400605,), (1360400916,), (1360400950,), (1360400974,), (1360401000,), (1360401036,), (1360401059,), (1360401080,), (1360401082,), (1360401085,), (1360401087,), (1360401089,), (1360401090,), (1360401209,), (1360401794,), (1360402025,), (1360402050,), (1360402055,), (1360402058,), (1360402083,), (1360402106,), (1360402122,), (1360402128,), (1360402131,), (1360402134,), (1360402135,), (1360402136,), (1360402151,), (1360402158,), (1360402278,), (1360403178,), (1360403033,), (1360403058,), (1360403122,), (1360403600,), (1360403679,), (1360403781,), (1360403806,), (1360403941,), (1360403947,), (1360403970,), (1360403976,), (1360404000,), (1360404478,), (1360404526,), (1360404581,), (1360404633,), (1360404687,), (1360404735,), (1360405141,), (1360405143,), (1360405154,), (1360405459,), (1360405461,), (1360405463,), (1360405465,), (1360405467,), (1360405472,), (1360405636,), (1360405655,), (1360405681,), (1360405713,), (1360405736,), (1360405760,), (1360406249,), (1360406294,), (1360406319,), (1360406663,), (1360406667,), (1360406670,), (1360406686,), (1360407048,), (1360407060,), (1360407123,), (1360407125,), (1360407127,), (1360407199,), (1360407233,), (1360407306,), (1360407318,), (1360407344,), (1360407471,), (1360407474,), (1360407476,), (1360407478,), (1360407479,), (1360407480,), (1360407620,), (1360407653,), (1360407685,), (1360408160,), (1360408177,), (1360408201,), (1360408224,), (1360408253,), (1360408279,), (1360408537,), (1360408554,), (1360408572,), (1360408579,), (1360408678,), (1360408690,), (1360408715,), (1360408707,), (1360408709,), (1360408712,), (1360408736,), (1360408740,), (1360408742,), (1360408744,), (1360408746,), (1360408757,), (1360408910,), (1360408928,), (1360408942,), (1360408948,), (1360408979,), (1360408994,), (1360409016,), (1360409019,), (1360409021,), (1360409046,), (1360409048,), (1360409050,), (1360409070,), (1360409587,), (1360409846,), (1360409900,), (1360410094,), (1360410119,), (1360410145,), (1360410903,), (1360410978,), (1360411032,), (1360411084,), (1360411140,), (1360411422,), (1360411426,), (1360411450,), (1360411480,), (1360411509,), (1360411938,), (1360411942,), (1360411944,), (1360411946,), (1360411949,), (1360412173,), (1360412175,), (1360412177,), (1360412179,), (1360412200,), (1360412368,), (1360412396,), (1360412424,), (1360412448,), (1360412804,), (1360412807,), (1360412821,), (1360412846,), (1360413101,), (1360413097,), (1360413098,), (1360413099,), (1360413100,), (1360413109,), (1360413516,), (1360413603,), (1360413690,), (1360414174,), (1360414187,), (1360414189,), (1360414215,), (1360414237,), (1360414477,), (1360414478,), (1360414480,), (1360414483,), (1360414710,), (1360414724,), (1360414739,), (1360414756,), (1360414759,), (1360414761,), (1360414763,), (1360414765,), (1360414769,), (1360414973,), (1360414992,), (1360414997,), (1360415319,), (1360415347,), (1360415378,), (1360415406,), (1360415432,), (1360415456,), (1360415723,), (1360415748,), (1360415772,), (1360415797,), (1360416108,), (1360416142,), (1360416190,), (1360416217,), (1360416233,), (1360416234,), (1360416246,), (1360416248,), (1360416249,), (1360416250,), (1360416251,), (1360416252,), (1360416377,), (1360416388,), (1360416398,), (1360416413,), (1360417044,), (1360417092,), (1360417152,), (1360417198,), (1360417276,), (1360417327,), (1360418450,), (1360418547,), (1360418930,), (1360419006,), (1360419064,), (1360419116,), (1360419591,), (1360448235,), (1360448258,), (1360448261,), (1360448264,), (1360448265,), (1360448284,), (1360448302,), (1360448307,), (1360448711,), (1360448757,), (1360448790,), (1360448819,), (1360448826,), (1360448850,), (1360449032,), (1360449063,), (1360449093,), (1360449123,), (1360449275,), (1360449285,), (1360449310,), (1360449366,), (1360449370,), (1360449374,), (1360449379,), (1360449384,), (1360449387,), (1360449426,), (1360449430,), (1360449435,), (1360449448,), (1360449725,), (1360449729,), (1360449734,), (1360449739,), (1360449759,), (1360449793,), (1360450123,), (1360450181,), (1360450232,), (1360450899,), (1360450953,), (1360451569,), (1360451596,), (1360451622,), (1360451956,), (1360451968,), (1360451978,), (1360452009,), (1360452060,), (1360452578,), (1360452615,), (1360452736,), (1360452766,), (1360453987,), (1360453993,), (1360454354,), (1360463965,), (1360464329,), (1360464358,), (1360464372,), (1360464376,), (1360464411,), (1360464419,), (1360464420,), (1360464423,), (1360464456,), (1360464483,), (1360464516,), (1360464673,), (1360464676,), (1360464678,), (1360464694,), (1360464723,), (1360464752,), (1360464829,), (1360464831,), (1360464838,), (1360464842,), (1360464845,), (1360464848,), (1360464945,), (1360464972,), (1360465002,), (1360465376,), (1360465404,), (1360465433,), (1360465467,), (1360465554,), (1360466418,), (1360466495,), (1360466566,), (1360466619,), (1360467245,), (1360467376,), (1360467407,), (1360467440,), (1360467478,), (1360467713,), (1360467715,), (1360467721,), (1360467726,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'22052025': {'nb_upload': 45, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([23259112]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1360467726, 1360467721, 1360467715, 1360467713, 1360467478, 1360467440, 1360467407, 1360467376, 1360467245] map_info['map_portfolio_photo'] : {23259112: [1360467726, 1360467721, 1360467715, 1360467713, 1360467478, 1360467440, 1360467407, 1360467376, 1360467245, 1360466619, 1360466566, 1360466495, 1360466418, 1360465554, 1360465467, 1360465433, 1360465404, 1360465376, 1360465002, 1360464972, 1360464945, 1360464848, 1360464845, 1360464842, 1360464838, 1360464831, 1360464829, 1360464752, 1360464723, 1360464694, 1360464678, 1360464676, 1360464673, 1360464516, 1360464483, 1360464456, 1360464423, 1360464420, 1360464419, 1360464411, 1360464376, 1360464372, 1360464358, 1360464329, 1360463965]} final : True mtd_id 4302 list_pids : [1360467726, 1360467721, 1360467715, 1360467713, 1360467478, 1360467440, 1360467407, 1360467376, 1360467245] Looping around the photos to save general results len do output : 1 /23259112Didn'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, '2934592') ('4302', '23259112', '1360467726', None, None, None, None, None, '2934592') ('4302', None, None, None, None, None, None, None, '2934592') ('4302', '23259112', '1360467721', None, None, None, None, None, '2934592') ('4302', None, None, None, None, None, None, None, '2934592') ('4302', '23259112', '1360467715', None, None, None, None, None, '2934592') ('4302', None, None, None, None, None, None, None, '2934592') ('4302', '23259112', '1360467713', None, None, None, None, None, '2934592') ('4302', None, None, None, None, None, None, None, '2934592') ('4302', '23259112', '1360467478', None, None, None, None, None, '2934592') ('4302', None, None, None, None, None, None, None, '2934592') ('4302', '23259112', '1360467440', None, None, None, None, None, '2934592') ('4302', None, None, None, None, None, None, None, '2934592') ('4302', '23259112', '1360467407', None, None, None, None, None, '2934592') ('4302', None, None, None, None, None, None, None, '2934592') ('4302', '23259112', '1360467376', None, None, None, None, None, '2934592') ('4302', None, None, None, None, None, None, None, '2934592') ('4302', '23259112', '1360467245', None, None, None, None, None, '2934592') 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', None, '23259112', 'None', None, None, None, None, '2934592'), ('4302', '23259112', '1360467726', None, None, None, None, None, '2934592'), ('4302', '23259112', '1360467721', None, None, None, None, None, '2934592'), ('4302', '23259112', '1360467715', None, None, None, None, None, '2934592'), ('4302', '23259112', '1360467713', None, None, None, None, None, '2934592'), ('4302', '23259112', '1360467478', None, None, None, None, None, '2934592'), ('4302', '23259112', '1360467440', None, None, None, None, None, '2934592'), ('4302', '23259112', '1360467407', None, None, None, None, None, '2934592'), ('4302', '23259112', '1360467376', None, None, None, None, None, '2934592'), ('4302', '23259112', '1360467245', None, None, None, None, None, '2934592')] time used for this insertion : 0.03470754623413086 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.8304095268249512 time spend to save output : 0.03484749794006348 total time spend for step 5 : 0.8652570247650146 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 (2934592) 2.14user 2.20system 0:08.67elapsed 50%CPU (0avgtext+0avgdata 160180maxresident)k 28280inputs+7248outputs (112major+64743minor)pagefaults 0swaps