SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22141823) result : ((1350747710,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22141820) result : ((1350747468,), (1350747472,), (1350747517,), (1350747521,), (1350747524,), (1350747526,), (1350747577,), (1350747584,), (1350747592,), (1350747631,), (1350747634,), (1350747637,), (1350747697,), (1350747705,), (1350747716,), (1350747720,)) 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 22141824 , 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=22141820 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 (22141824) result : ((1350747718,), (1350747719,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22141820) result : ((1350747468,), (1350747472,), (1350747517,), (1350747521,), (1350747524,), (1350747526,), (1350747577,), (1350747584,), (1350747592,), (1350747631,), (1350747634,), (1350747637,), (1350747697,), (1350747705,), (1350747716,), (1350747720,)) 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 22141825 , 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=22141820 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 (22141825) result : ((1350747610,), (1350747699,), (1350747700,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22141820) result : ((1350747468,), (1350747472,), (1350747517,), (1350747521,), (1350747524,), (1350747526,), (1350747577,), (1350747584,), (1350747592,), (1350747631,), (1350747634,), (1350747637,), (1350747697,), (1350747705,), (1350747716,), (1350747720,)) 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 22141826 , 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=22141820 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 (22141826) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22141820) result : ((1350747468,), (1350747472,), (1350747517,), (1350747521,), (1350747524,), (1350747526,), (1350747577,), (1350747584,), (1350747592,), (1350747631,), (1350747634,), (1350747637,), (1350747697,), (1350747705,), (1350747716,), (1350747720,)) 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 22141827 , 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=22141820 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_gris' 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 (22141827) result : ((1350747611,), (1350747701,), (1350747702,), (1350747703,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22141820) result : ((1350747468,), (1350747472,), (1350747517,), (1350747521,), (1350747524,), (1350747526,), (1350747577,), (1350747584,), (1350747592,), (1350747631,), (1350747634,), (1350747637,), (1350747697,), (1350747705,), (1350747716,), (1350747720,)) 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 22141828 , 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=22141820 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 (22141828) result : ((1350747708,), (1350747709,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22141820) result : ((1350747468,), (1350747472,), (1350747517,), (1350747521,), (1350747524,), (1350747526,), (1350747577,), (1350747584,), (1350747592,), (1350747631,), (1350747634,), (1350747637,), (1350747697,), (1350747705,), (1350747716,), (1350747720,)) 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 22141829 , 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=22141820 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 (22141829) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22141820) result : ((1350747468,), (1350747472,), (1350747517,), (1350747521,), (1350747524,), (1350747526,), (1350747577,), (1350747584,), (1350747592,), (1350747631,), (1350747634,), (1350747637,), (1350747697,), (1350747705,), (1350747716,), (1350747720,)) 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 22141830 , 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=22141820 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='flou' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22141830) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22141820) result : ((1350747468,), (1350747472,), (1350747517,), (1350747521,), (1350747524,), (1350747526,), (1350747577,), (1350747584,), (1350747592,), (1350747631,), (1350747634,), (1350747637,), (1350747697,), (1350747705,), (1350747716,), (1350747720,)) 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 22141831 , 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=22141820 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='autre_refus' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22141831) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22141820) result : ((1350747468,), (1350747472,), (1350747517,), (1350747521,), (1350747524,), (1350747526,), (1350747577,), (1350747584,), (1350747592,), (1350747631,), (1350747634,), (1350747637,), (1350747697,), (1350747705,), (1350747716,), (1350747720,)) 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 22141832 , 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=22141820 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='plastique' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22141832) result : ((1350747612,), (1350747711,), (1350747712,), (1350747713,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22141820) result : ((1350747468,), (1350747472,), (1350747517,), (1350747521,), (1350747524,), (1350747526,), (1350747577,), (1350747584,), (1350747592,), (1350747631,), (1350747634,), (1350747637,), (1350747697,), (1350747705,), (1350747716,), (1350747720,)) 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 22141833 , 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=22141820 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 (22141833) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22141820) result : ((1350747468,), (1350747472,), (1350747517,), (1350747521,), (1350747524,), (1350747526,), (1350747577,), (1350747584,), (1350747592,), (1350747631,), (1350747634,), (1350747637,), (1350747697,), (1350747705,), (1350747716,), (1350747720,)) 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 22141834 , 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=22141820 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='environnement' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22141834) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22141820) result : ((1350747468,), (1350747472,), (1350747517,), (1350747521,), (1350747524,), (1350747526,), (1350747577,), (1350747584,), (1350747592,), (1350747631,), (1350747634,), (1350747637,), (1350747697,), (1350747705,), (1350747716,), (1350747720,)) 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`=22141820 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','Carton_brun','environnement','metal','mal_croppe','autre_refus','Carton_gris','kraft','papier','cartonnette','plastique','Teint_Dans_La_Masse')) 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`=22141820 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','Carton_brun','environnement','metal','mal_croppe','autre_refus','Carton_gris','kraft','papier','cartonnette','plastique','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_brun': {'main_port_id': 22141820, 'sub_port_id': 22141835, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14622184, 'last_updated_at': datetime.datetime(2025, 4, 17, 16, 48, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 16, 48, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 16, 48, 59)}, 'kraft': {'main_port_id': 22141820, 'sub_port_id': 22141836, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14622185, 'last_updated_at': datetime.datetime(2025, 4, 17, 16, 48, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 16, 48, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 16, 48, 59)}, 'Teint_Dans_La_Masse': {'main_port_id': 22141820, 'sub_port_id': 22141837, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14622186, 'last_updated_at': datetime.datetime(2025, 4, 17, 16, 48, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 16, 48, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 16, 48, 59)}, 'papier': {'main_port_id': 22141820, 'sub_port_id': 22141838, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14622187, 'last_updated_at': datetime.datetime(2025, 4, 17, 16, 48, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 16, 48, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 16, 48, 59)}, 'Carton_gris': {'main_port_id': 22141820, 'sub_port_id': 22141839, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14622188, 'last_updated_at': datetime.datetime(2025, 4, 17, 16, 48, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 16, 48, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 16, 48, 59)}, 'cartonnette': {'main_port_id': 22141820, 'sub_port_id': 22141840, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14622189, 'last_updated_at': datetime.datetime(2025, 4, 17, 16, 48, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 16, 48, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 16, 48, 59)}, 'metal': {'main_port_id': 22141820, 'sub_port_id': 22141841, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14622190, 'last_updated_at': datetime.datetime(2025, 4, 17, 16, 48, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 16, 48, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 16, 48, 59)}, 'flou': {'main_port_id': 22141820, 'sub_port_id': 22141842, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14622191, 'last_updated_at': datetime.datetime(2025, 4, 17, 16, 48, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 16, 48, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 16, 48, 59)}, 'autre_refus': {'main_port_id': 22141820, 'sub_port_id': 22141843, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14622192, 'last_updated_at': datetime.datetime(2025, 4, 17, 16, 48, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 16, 48, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 16, 48, 59)}, 'plastique': {'main_port_id': 22141820, 'sub_port_id': 22141844, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14622193, 'last_updated_at': datetime.datetime(2025, 4, 17, 16, 48, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 16, 48, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 16, 48, 59)}, 'mal_croppe': {'main_port_id': 22141820, 'sub_port_id': 22141845, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14622194, 'last_updated_at': datetime.datetime(2025, 4, 17, 16, 48, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 16, 48, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 16, 48, 59)}, 'environnement': {'main_port_id': 22141820, 'sub_port_id': 22141846, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14622195, 'last_updated_at': datetime.datetime(2025, 4, 17, 16, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 16, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 16, 48, 59)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22141835,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22141823 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22141836,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22141824 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22141837,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22141825 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22141838,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22141826 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22141839,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22141827 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22141840,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22141828 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22141841,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22141829 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22141842,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22141830 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22141843,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22141831 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22141844,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22141832 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22141845,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22141833 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22141846,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22141834 lien utilise dans velours : https://www.fotonower.com/velours/22141835,22141836,22141837,22141838,22141839,22141840,22141841,22141842,22141843,22141844,22141845,22141846?tags=Carton_brun,kraft,Teint_Dans_La_Masse,papier,Carton_gris,cartonnette,metal,flou,autre_refus,plastique,mal_croppe,environnement After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22141820]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1350747720, 1350747716, 1350747705, 1350747697, 1350747637, 1350747634, 1350747631] map_info['map_portfolio_photo'] : {22141820: [1350747720, 1350747716, 1350747705, 1350747697, 1350747637, 1350747634, 1350747631, 1350747592, 1350747584, 1350747577, 1350747526, 1350747524, 1350747521, 1350747517, 1350747472, 1350747468]} final : False mtd_id 4302 list_pids : [1350747720, 1350747716, 1350747705, 1350747697, 1350747637, 1350747634, 1350747631] Looping around the photos to save general results len do output : 1 /22141820. 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, '2731585') ('4302', '22141820', '1350747720', None, None, None, None, None, '2731585') ('4302', None, None, None, None, None, None, None, '2731585') ('4302', '22141820', '1350747716', None, None, None, None, None, '2731585') ('4302', None, None, None, None, None, None, None, '2731585') ('4302', '22141820', '1350747705', None, None, None, None, None, '2731585') ('4302', None, None, None, None, None, None, None, '2731585') ('4302', '22141820', '1350747697', None, None, None, None, None, '2731585') ('4302', None, None, None, None, None, None, None, '2731585') ('4302', '22141820', '1350747637', None, None, None, None, None, '2731585') ('4302', None, None, None, None, None, None, None, '2731585') ('4302', '22141820', '1350747634', None, None, None, None, None, '2731585') ('4302', None, None, None, None, None, None, None, '2731585') ('4302', '22141820', '1350747631', None, None, None, None, None, '2731585') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 8 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, '22141820', "{'Carton_brun': 22141823, 'kraft': 22141824, 'Teint_Dans_La_Masse': 22141825, 'papier': 22141826, 'Carton_gris': 22141827, 'cartonnette': 22141828, 'metal': 22141829, 'flou': 22141830, 'autre_refus': 22141831, 'plastique': 22141832, 'mal_croppe': 22141833, 'environnement': 22141834}", None, None, None, None, '2731585'), ('4302', '22141820', '1350747720', None, None, None, None, None, '2731585'), ('4302', '22141820', '1350747716', None, None, None, None, None, '2731585'), ('4302', '22141820', '1350747705', None, None, None, None, None, '2731585'), ('4302', '22141820', '1350747697', None, None, None, None, None, '2731585'), ('4302', '22141820', '1350747637', None, None, None, None, None, '2731585'), ('4302', '22141820', '1350747634', None, None, None, None, None, '2731585'), ('4302', '22141820', '1350747631', None, None, None, None, None, '2731585')] time used for this insertion : 0.01619577407836914 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.504439115524292 time spend to save output : 0.016451358795166016 total time spend for step 1 : 1.520890474319458 step2:final Thu Apr 17 16:50:59 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 (22141820) 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 22141820 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1350747472,1350747468,1350747526,1350747524,1350747521,1350747517,1350747592,1350747584,1350747577,1350747637,1350747634,1350747631,1350747720,1350747716,1350747705,1350747697); 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([22141820]) Inside saveOutput : final : False verbose : True original output for save of step final : {1350747720: ('0.029527022872986558',), 1350747716: ('0.029527022872986558',), 1350747705: ('0.029527022872986558',), 1350747697: ('0.029527022872986558',), 1350747637: ('0.029527022872986558',), 1350747634: ('0.029527022872986558',), 1350747631: ('0.029527022872986558',)} new output for save of step final : {1350747720: ('0.029527022872986558',), 1350747716: ('0.029527022872986558',), 1350747705: ('0.029527022872986558',), 1350747697: ('0.029527022872986558',), 1350747637: ('0.029527022872986558',), 1350747634: ('0.029527022872986558',), 1350747631: ('0.029527022872986558',)} [1350747720, 1350747716, 1350747705, 1350747697, 1350747637, 1350747634, 1350747631] map_info['map_portfolio_photo'] : {22141820: [1350747720, 1350747716, 1350747705, 1350747697, 1350747637, 1350747634, 1350747631, 1350747592, 1350747584, 1350747577, 1350747526, 1350747524, 1350747521, 1350747517, 1350747472, 1350747468]} final : False mtd_id 4302 list_pids : [1350747720, 1350747716, 1350747705, 1350747697, 1350747637, 1350747634, 1350747631] Looping around the photos to save general results len do output : 7 /1350747720.Didn't retrieve data . /1350747716.Didn't retrieve data . /1350747705.Didn't retrieve data . /1350747697.Didn't retrieve data . /1350747637.Didn't retrieve data . /1350747634.Didn't retrieve data . /1350747631.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, '2731585') ('4302', '22141820', '1350747720', None, None, None, None, None, '2731585') ('4302', None, None, None, None, None, None, None, '2731585') ('4302', '22141820', '1350747716', None, None, None, None, None, '2731585') ('4302', None, None, None, None, None, None, None, '2731585') ('4302', '22141820', '1350747705', None, None, None, None, None, '2731585') ('4302', None, None, None, None, None, None, None, '2731585') ('4302', '22141820', '1350747697', None, None, None, None, None, '2731585') ('4302', None, None, None, None, None, None, None, '2731585') ('4302', '22141820', '1350747637', None, None, None, None, None, '2731585') ('4302', None, None, None, None, None, None, None, '2731585') ('4302', '22141820', '1350747634', None, None, None, None, None, '2731585') ('4302', None, None, None, None, None, None, None, '2731585') ('4302', '22141820', '1350747631', None, None, None, None, None, '2731585') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 21 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', '22141820', '1350747720', '0.029527022872986558', None, None, None, None, '2731585'), ('4302', '22141820', '1350747716', '0.029527022872986558', None, None, None, None, '2731585'), ('4302', '22141820', '1350747705', '0.029527022872986558', None, None, None, None, '2731585'), ('4302', '22141820', '1350747697', '0.029527022872986558', None, None, None, None, '2731585'), ('4302', '22141820', '1350747637', '0.029527022872986558', None, None, None, None, '2731585'), ('4302', '22141820', '1350747634', '0.029527022872986558', None, None, None, None, '2731585'), ('4302', '22141820', '1350747631', '0.029527022872986558', None, None, None, None, '2731585')] time used for this insertion : 0.01766347885131836 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06687569618225098 time spend to save output : 0.018082618713378906 total time spend for step 2 : 0.08495831489562988 step3:velours_tree Thu Apr 17 16:50:59 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 : {22141820: [{'Carton_brun': 22141823, 'kraft': 22141824, 'Teint_Dans_La_Masse': 22141825, 'papier': 22141826, 'Carton_gris': 22141827, 'cartonnette': 22141828, 'metal': 22141829, 'flou': 22141830, 'autre_refus': 22141831, 'plastique': 22141832, 'mal_croppe': 22141833, 'environnement': 22141834}]} input_args_next_step : {22141820: ()} output_args : {22141820: [{'Carton_brun': 22141823, 'kraft': 22141824, 'Teint_Dans_La_Masse': 22141825, 'papier': 22141826, 'Carton_gris': 22141827, 'cartonnette': 22141828, 'metal': 22141829, 'flou': 22141830, 'autre_refus': 22141831, 'plastique': 22141832, 'mal_croppe': 22141833, 'environnement': 22141834}]} args : 22141820 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'Carton_brun': 22141823, 'kraft': 22141824, 'Teint_Dans_La_Masse': 22141825, 'papier': 22141826, 'Carton_gris': 22141827, 'cartonnette': 22141828, 'metal': 22141829, 'flou': 22141830, 'autre_refus': 22141831, 'plastique': 22141832, 'mal_croppe': 22141833, 'environnement': 22141834},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22141820) 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([22141820]) 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.29836535453796387 time spend to save output : 5.1975250244140625e-05 total time spend for step 3 : 0.298417329788208 step4:send_mail_cod Thu Apr 17 16:50:59 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 : {1350747720: ('0.029527022872986558',), 1350747716: ('0.029527022872986558',), 1350747705: ('0.029527022872986558',), 1350747697: ('0.029527022872986558',), 1350747637: ('0.029527022872986558',), 1350747634: ('0.029527022872986558',), 1350747631: ('0.029527022872986558',)} input_args_next_step : {1350747720: ()} output_args : {1350747720: ('0.029527022872986558',), 1350747716: ('0.029527022872986558',), 1350747705: ('0.029527022872986558',), 1350747697: ('0.029527022872986558',), 1350747637: ('0.029527022872986558',), 1350747634: ('0.029527022872986558',), 1350747631: ('0.029527022872986558',)} args : 1350747720 depend.output_id : 0 input_args_next_step : {1350747720: ('0.029527022872986558',), 1350747716: ()} output_args : {1350747720: ('0.029527022872986558',), 1350747716: ('0.029527022872986558',), 1350747705: ('0.029527022872986558',), 1350747697: ('0.029527022872986558',), 1350747637: ('0.029527022872986558',), 1350747634: ('0.029527022872986558',), 1350747631: ('0.029527022872986558',)} args : 1350747716 depend.output_id : 0 input_args_next_step : {1350747720: ('0.029527022872986558',), 1350747716: ('0.029527022872986558',), 1350747705: ()} output_args : {1350747720: ('0.029527022872986558',), 1350747716: ('0.029527022872986558',), 1350747705: ('0.029527022872986558',), 1350747697: ('0.029527022872986558',), 1350747637: ('0.029527022872986558',), 1350747634: ('0.029527022872986558',), 1350747631: ('0.029527022872986558',)} args : 1350747705 depend.output_id : 0 input_args_next_step : {1350747720: ('0.029527022872986558',), 1350747716: ('0.029527022872986558',), 1350747705: ('0.029527022872986558',), 1350747697: ()} output_args : {1350747720: ('0.029527022872986558',), 1350747716: ('0.029527022872986558',), 1350747705: ('0.029527022872986558',), 1350747697: ('0.029527022872986558',), 1350747637: ('0.029527022872986558',), 1350747634: ('0.029527022872986558',), 1350747631: ('0.029527022872986558',)} args : 1350747697 depend.output_id : 0 input_args_next_step : {1350747720: ('0.029527022872986558',), 1350747716: ('0.029527022872986558',), 1350747705: ('0.029527022872986558',), 1350747697: ('0.029527022872986558',), 1350747637: ()} output_args : {1350747720: ('0.029527022872986558',), 1350747716: ('0.029527022872986558',), 1350747705: ('0.029527022872986558',), 1350747697: ('0.029527022872986558',), 1350747637: ('0.029527022872986558',), 1350747634: ('0.029527022872986558',), 1350747631: ('0.029527022872986558',)} args : 1350747637 depend.output_id : 0 input_args_next_step : {1350747720: ('0.029527022872986558',), 1350747716: ('0.029527022872986558',), 1350747705: ('0.029527022872986558',), 1350747697: ('0.029527022872986558',), 1350747637: ('0.029527022872986558',), 1350747634: ()} output_args : {1350747720: ('0.029527022872986558',), 1350747716: ('0.029527022872986558',), 1350747705: ('0.029527022872986558',), 1350747697: ('0.029527022872986558',), 1350747637: ('0.029527022872986558',), 1350747634: ('0.029527022872986558',), 1350747631: ('0.029527022872986558',)} args : 1350747634 depend.output_id : 0 input_args_next_step : {1350747720: ('0.029527022872986558',), 1350747716: ('0.029527022872986558',), 1350747705: ('0.029527022872986558',), 1350747697: ('0.029527022872986558',), 1350747637: ('0.029527022872986558',), 1350747634: ('0.029527022872986558',), 1350747631: ()} output_args : {1350747720: ('0.029527022872986558',), 1350747716: ('0.029527022872986558',), 1350747705: ('0.029527022872986558',), 1350747697: ('0.029527022872986558',), 1350747637: ('0.029527022872986558',), 1350747634: ('0.029527022872986558',), 1350747631: ('0.029527022872986558',)} args : 1350747631 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 : {22141820: [{'Carton_brun': 22141823, 'kraft': 22141824, 'Teint_Dans_La_Masse': 22141825, 'papier': 22141826, 'Carton_gris': 22141827, 'cartonnette': 22141828, 'metal': 22141829, 'flou': 22141830, 'autre_refus': 22141831, 'plastique': 22141832, 'mal_croppe': 22141833, 'environnement': 22141834}]} input_args_next_step : {1350747720: ('0.029527022872986558',), 1350747716: ('0.029527022872986558',), 1350747705: ('0.029527022872986558',), 1350747697: ('0.029527022872986558',), 1350747637: ('0.029527022872986558',), 1350747634: ('0.029527022872986558',), 1350747631: ('0.029527022872986558',), 22141820: ()} output_args : {22141820: [{'Carton_brun': 22141823, 'kraft': 22141824, 'Teint_Dans_La_Masse': 22141825, 'papier': 22141826, 'Carton_gris': 22141827, 'cartonnette': 22141828, 'metal': 22141829, 'flou': 22141830, 'autre_refus': 22141831, 'plastique': 22141832, 'mal_croppe': 22141833, 'environnement': 22141834}]} args : 22141820 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 :8, first value : ('0.029527022872986558',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22141820) 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 (1350747720,1350747716,1350747705,1350747697,1350747637,1350747634,1350747631) Found this number of photos: 7 ##### Call download_photos : nb_thread : 5 begin to download photo : 1350747631 begin to download photo : 1350747637 begin to download photo : 1350747705 begin to download photo : 1350747720 download finish for photo 1350747631 begin to download photo : 1350747634 download finish for photo 1350747705 begin to download photo : 1350747716 download finish for photo 1350747720 download finish for photo 1350747637 begin to download photo : 1350747697 download finish for photo 1350747716 download finish for photo 1350747634 download finish for photo 1350747697 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos length of list_filenames : 7 ; length of list_pids : 7 ; length of list_args : 7 results_Auto_P22141820_17-04-2025_16_50_59.pdf 22141824 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=22141824 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350747718: '1744901383_909526_1350747524_17e5f42f98967cacaea8b030ef63fe1f_rle_crop_3751915040_0.png', 1350747719: '1744901383_909526_1350747521_7e24a257faa90f7101210f275877386e_rle_crop_3751915065_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/c449b697dd2d2fe141a9c9fdd887fac1_68147996.png change filename to text .imagette221418241744901459/ imagette221418241744901459/1744901383_909526_1350747521_7e24a257faa90f7101210f275877386e_rle_crop_3751915065_0.png.png imagette221418241744901459/1744901383_909526_1350747524_17e5f42f98967cacaea8b030ef63fe1f_rle_crop_3751915040_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/2189769ce6ab6b02eeb871034de78e39_16292759.png imagette221418241744901459 22141828 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=22141828 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350747708: '1744901383_909526_1350747524_17e5f42f98967cacaea8b030ef63fe1f_rle_crop_3751915036_0.png', 1350747709: '1744901383_909526_1350747521_7e24a257faa90f7101210f275877386e_rle_crop_3751915061_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/3769dbf652a188e948fcb68ccb7564ea_5060112.png change filename to text .imagette221418281744901459/ imagette221418281744901459/1744901383_909526_1350747521_7e24a257faa90f7101210f275877386e_rle_crop_3751915061_0.png.png imagette221418281744901459/1744901383_909526_1350747524_17e5f42f98967cacaea8b030ef63fe1f_rle_crop_3751915036_0.png.png imagette221418291744901460/ imagette221418301744901460/ imagette221418311744901460/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/f4e09585e01897a9ba856ca720f3586e_26257382.png imagette221418281744901459 22141829 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=22141829 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221418291744901460 22141830 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=22141830 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221418301744901460 22141831 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=22141831 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221418311744901460 22141832 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=22141832 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350747612: '1744901292_3093682_1350747468_326741c793a53e0cac04375928605f4d_rle_crop_3751914394_0.png', 1350747711: '1744901383_909526_1350747521_7e24a257faa90f7101210f275877386e_rle_crop_3751915062_0.png', 1350747712: '1744901383_909526_1350747521_7e24a257faa90f7101210f275877386e_rle_crop_3751915054_0.png', 1350747713: '1744901383_909526_1350747521_7e24a257faa90f7101210f275877386e_rle_crop_3751915064_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/67fe244ba5e5d1eadf4fd8693420e131_27809911.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/b9453f3451f71995fd150503bb53bcae_92773124.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/867283c506f3af1e0d00af0600e8fe4e_597629.png change filename to text .imagette221418321744901460/ imagette221418321744901460/1744901383_909526_1350747521_7e24a257faa90f7101210f275877386e_rle_crop_3751915064_0.png.png imagette221418321744901460/1744901292_3093682_1350747468_326741c793a53e0cac04375928605f4d_rle_crop_3751914394_0.png.png imagette221418321744901460/1744901383_909526_1350747521_7e24a257faa90f7101210f275877386e_rle_crop_3751915062_0.png.png imagette221418321744901460/1744901383_909526_1350747521_7e24a257faa90f7101210f275877386e_rle_crop_3751915054_0.png.png imagette221418331744901460/ wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/da17b50106a3690974a8ed4a9f8206be_95945453.png imagette221418321744901460 22141833 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=22141833 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221418331744901460 22141823 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=22141823 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350747710: '1744901383_909526_1350747524_17e5f42f98967cacaea8b030ef63fe1f_rle_crop_3751915046_0.png'} change filename to text .imagette221418231744901460/ imagette221418231744901460/1744901383_909526_1350747524_17e5f42f98967cacaea8b030ef63fe1f_rle_crop_3751915046_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/f1fb03e03f059e798123d72dd7077080_11836204.png imagette221418231744901460 22141825 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=22141825 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350747610: '1744901292_3093682_1350747468_326741c793a53e0cac04375928605f4d_rle_crop_3751914393_0.png', 1350747699: '1744901383_909526_1350747592_d5625be693c9c2105493dfd07cbd7f31_rle_crop_3751915020_0.png', 1350747700: '1744901383_909526_1350747521_7e24a257faa90f7101210f275877386e_rle_crop_3751915059_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/2f221521dcf42e26e3eff54a740a94a3_92682637.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/a1d411b27f7d84d113631e7f3e944298_4019605.png change filename to text .imagette221418251744901460/ imagette221418251744901460/1744901292_3093682_1350747468_326741c793a53e0cac04375928605f4d_rle_crop_3751914393_0.png.png imagette221418251744901460/1744901383_909526_1350747592_d5625be693c9c2105493dfd07cbd7f31_rle_crop_3751915020_0.png.png imagette221418251744901460/1744901383_909526_1350747521_7e24a257faa90f7101210f275877386e_rle_crop_3751915059_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/cc1757d329a1c0fb36df9f2c5d1b91b6_58113617.png imagette221418251744901460 22141827 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=22141827 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350747611: '1744901292_3093682_1350747468_326741c793a53e0cac04375928605f4d_rle_crop_3751914398_0.png', 1350747701: '1744901383_909526_1350747592_d5625be693c9c2105493dfd07cbd7f31_rle_crop_3751915024_0.png', 1350747702: '1744901383_909526_1350747524_17e5f42f98967cacaea8b030ef63fe1f_rle_crop_3751915035_0.png', 1350747703: '1744901383_909526_1350747517_ca54584a8668c2a6b510fd07053ef91d_rle_crop_3751915075_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/a470365cbad4486eebf0399d367630d5_2046234.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/feae8c1663b2b76cabd80dd5d2cc2191_98832950.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/93c7aa9205a6a3d0397fdff2e764a549_53695482.png change filename to text .imagette221418271744901460/ imagette221418271744901460/1744901383_909526_1350747592_d5625be693c9c2105493dfd07cbd7f31_rle_crop_3751915024_0.png.png imagette221418271744901460/1744901383_909526_1350747524_17e5f42f98967cacaea8b030ef63fe1f_rle_crop_3751915035_0.png.png imagette221418271744901460/1744901292_3093682_1350747468_326741c793a53e0cac04375928605f4d_rle_crop_3751914398_0.png.png imagette221418271744901460/1744901383_909526_1350747517_ca54584a8668c2a6b510fd07053ef91d_rle_crop_3751915075_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/48b53a6680ea05a3156444d1a6d470ad_88181032.png imagette221418271744901460 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=22141820 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/22141835,22141836,22141837,22141838,22141839,22141840,22141841,22141842,22141843,22141844,22141845,22141846?tags=Carton_brun,kraft,Teint_Dans_La_Masse,papier,Carton_gris,cartonnette,metal,flou,autre_refus,plastique,mal_croppe,environnement your option no_mail is active, we will not send the real mail to your client args[1350747720] : ('0.029527022872986558',) no score found for photo 1350747720 We are sending mail with results at report@fotonower.com args[1350747716] : ('0.029527022872986558',) no score found for photo 1350747716 We are sending mail with results at report@fotonower.com args[1350747705] : ('0.029527022872986558',) no score found for photo 1350747705 We are sending mail with results at report@fotonower.com args[1350747697] : ('0.029527022872986558',) no score found for photo 1350747697 We are sending mail with results at report@fotonower.com args[1350747637] : ('0.029527022872986558',) no score found for photo 1350747637 We are sending mail with results at report@fotonower.com args[1350747634] : ('0.029527022872986558',) no score found for photo 1350747634 We are sending mail with results at report@fotonower.com args[1350747631] : ('0.029527022872986558',) no score found for photo 1350747631 We are sending mail with results at report@fotonower.com refus_total : 0.029527022872986558 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=22141820 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_P22141820_17-04-2025_16_50_59.pdf results_Auto_P22141820_17-04-2025_16_50_59.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22141820_17-04-2025_16_50_59.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','22141820','results_Auto_P22141820_17-04-2025_16_50_59.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22141820_17-04-2025_16_50_59.pdf','pdf','','0.11','0.029527022872986558') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22141820]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1350747720, 1350747716, 1350747705, 1350747697, 1350747637, 1350747634, 1350747631] map_info['map_portfolio_photo'] : {22141820: [1350747720, 1350747716, 1350747705, 1350747697, 1350747637, 1350747634, 1350747631, 1350747592, 1350747584, 1350747577, 1350747526, 1350747524, 1350747521, 1350747517, 1350747472, 1350747468]} final : False mtd_id 4302 list_pids : [1350747720, 1350747716, 1350747705, 1350747697, 1350747637, 1350747634, 1350747631] 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, '2731585') ('4302', '22141820', '1350747720', None, None, None, None, None, '2731585') ('4302', None, None, None, None, None, None, None, '2731585') ('4302', '22141820', '1350747716', None, None, None, None, None, '2731585') ('4302', None, None, None, None, None, None, None, '2731585') ('4302', '22141820', '1350747705', None, None, None, None, None, '2731585') ('4302', None, None, None, None, None, None, None, '2731585') ('4302', '22141820', '1350747697', None, None, None, None, None, '2731585') ('4302', None, None, None, None, None, None, None, '2731585') ('4302', '22141820', '1350747637', None, None, None, None, None, '2731585') ('4302', None, None, None, None, None, None, None, '2731585') ('4302', '22141820', '1350747634', None, None, None, None, None, '2731585') ('4302', None, None, None, None, None, None, None, '2731585') ('4302', '22141820', '1350747631', None, None, None, None, None, '2731585') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 7 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '22141820', '1350747720', None, None, None, None, None, '2731585'), ('4302', '22141820', '1350747716', None, None, None, None, None, '2731585'), ('4302', '22141820', '1350747705', None, None, None, None, None, '2731585'), ('4302', '22141820', '1350747697', None, None, None, None, None, '2731585'), ('4302', '22141820', '1350747637', None, None, None, None, None, '2731585'), ('4302', '22141820', '1350747634', None, None, None, None, None, '2731585'), ('4302', '22141820', '1350747631', None, None, None, None, None, '2731585')] time used for this insertion : 0.019350528717041016 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.1364235877990723 time spend to save output : 0.019551515579223633 total time spend for step 4 : 2.155975103378296 step5:split_time_score Thu Apr 17 16:51: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 : ['22141820'] 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 : [('22141820',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22141820) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1350747720: {'path': 'temp/1744901459_1340108_1350747720_f6fa7dd0cdf1459ed2cf05854b57a613.jpg', 'extension': 'jpg'}, 1350747705: {'path': 'temp/1744901459_1340108_1350747705_d31e398dbc1ffe478b8af9af2c111c33.jpg', 'extension': 'jpg'}, 1350747716: {'path': 'temp/1744901459_1340108_1350747716_5d581104859a02da35f9fabc8b706f19.jpg', 'extension': 'jpg'}, 1350747631: {'path': 'temp/1744901459_1340108_1350747631_be306d0b4261533d85680dcb670108a6.jpg', 'extension': 'jpg'}, 1350747634: {'path': 'temp/1744901459_1340108_1350747634_b822dbf238ed227920bca848f275cb44.jpg', 'extension': 'jpg'}, 1350747637: {'path': 'temp/1744901459_1340108_1350747637_6cc928aaedd182f51c4ccba87390b235.jpg', 'extension': 'jpg'}, 1350747697: {'path': 'temp/1744901459_1340108_1350747697_34ee859d37ed31873eec18809f11b574.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 = 22141820; (('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 = 22141820 group by h (('16', 16),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22141820 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 (22141820) 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 (22141820) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 17042025 22141820 Nombre de photos uploadées : 16 / 23040 (0%) 17042025 22141820 Nombre de photos taguées (types de déchets): 0 / 16 (0%) 17042025 22141820 Nombre de photos taguées (volume) : 0 / 16 (0%) [{'photo_id': 1350747472, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/1b90dc8abff667eba6fe860b3de9ed0f.jpg', 'username': None, 'uploaded_at': 1744901167, 'text': 'image_17042025_16_45_24_10140.jpg'}, {'photo_id': 1350747468, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/326741c793a53e0cac04375928605f4d.jpg', 'username': None, 'uploaded_at': 1744901167, 'text': 'image_17042025_16_45_34_10140.jpg'}, {'photo_id': 1350747526, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/dff8244e2107cf1100f6e7370ea8572b.jpg', 'username': None, 'uploaded_at': 1744901227, 'text': 'image_17042025_16_45_44_10140.jpg'}, {'photo_id': 1350747524, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/17e5f42f98967cacaea8b030ef63fe1f.jpg', 'username': None, 'uploaded_at': 1744901227, 'text': 'image_17042025_16_46_04_10142.jpg'}] 0 [] elapsed_time : load_data_split_time_score 2.86102294921875e-06 elapsed_time : order_list_meta_photo_and_scores 8.344650268554688e-06 ???????????????? elapsed_time : fill_and_build_computed_from_old_data 0.001081228256225586 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 22141820, '2025-04-17' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1721208,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.022768735885620117 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= 1721208 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1721208, 'dashboard_run_id': 1731379, 'mtr_portfolio_id': 22140073, 'dashboard_result_id': 9938935, '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_P22140073_17-04-2025_16_18_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22140080, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22140081, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22140082, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22140083, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22140084, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22140085, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22140086, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22140087, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22140088, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22140089, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22140090, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22140091, 'pht': 3726}}"}, {'dashboat_entry_day': 1721208, 'dashboard_run_id': 1731379, 'mtr_portfolio_id': 22140760, 'dashboard_result_id': 9938936, '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_P22140760_17-04-2025_16_32_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22140763, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22140764, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22140765, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22140766, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22140767, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22140768, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22140769, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22140770, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22140771, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22140772, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22140773, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22140774, 'pht': 3726}}"}, {'dashboat_entry_day': 1721208, 'dashboard_run_id': 1731379, 'mtr_portfolio_id': 22141160, 'dashboard_result_id': 9938937, '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_P22141160_17-04-2025_16_46_30.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22141180, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22141181, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22141182, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22141183, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22141184, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22141185, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22141186, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22141187, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22141188, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22141189, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22141190, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22141191, 'pht': 3726}}"}, {'dashboat_entry_day': 1721208, 'dashboard_run_id': 1731379, 'mtr_portfolio_id': 22141820, 'dashboard_result_id': 9938938, '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_P22141820_17-04-2025_16_49_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22141823, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22141824, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22141825, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22141826, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22141827, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22141828, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22141829, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22141830, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22141831, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22141832, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22141833, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22141834, '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 = 22140073 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': 2731395, 'mtr_portfolio_id': 22140073, 'created_at': datetime.datetime(2025, 4, 17, 16, 18, 59), 'result': '0.04270722225547444', 'result_long': None, 'result_double': None}] Qualite : 0.04270722225547444 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22140073 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22140073_17-04-2025_16_18_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22140073 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_P22140073_17-04-2025_16_18_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22140080, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22140081, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22140082, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22140083, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22140084, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22140085, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22140086, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22140087, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22140088, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22140089, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22140090, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22140091, 'pht': 3726}}" where mtr_portfolio_id = 22140073 and dashboard_run_id = 1731379 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`=22140073 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9938935, 0.04270722225547444, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22140073_17-04-2025_16_18_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22140080, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22140081, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22140082, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22140083, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22140084, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22140085, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22140086, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22140087, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22140088, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22140089, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22140090, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22140091, '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 = 22140760 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': 2731462, 'mtr_portfolio_id': 22140760, 'created_at': datetime.datetime(2025, 4, 17, 16, 32, 58), 'result': '0.04958894470237618', 'result_long': None, 'result_double': None}] Qualite : 0.04958894470237618 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22140760 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22140760_17-04-2025_16_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22140760 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_P22140760_17-04-2025_16_32_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22140763, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22140764, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22140765, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22140766, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22140767, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22140768, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22140769, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22140770, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22140771, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22140772, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22140773, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22140774, 'pht': 3726}}" where mtr_portfolio_id = 22140760 and dashboard_run_id = 1731379 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`=22140760 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9938936, 0.04958894470237618, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22140760_17-04-2025_16_32_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22140763, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22140764, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22140765, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22140766, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22140767, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22140768, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22140769, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22140770, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22140771, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22140772, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22140773, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22140774, '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 = 22141160 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': 2731502, 'mtr_portfolio_id': 22141160, 'created_at': datetime.datetime(2025, 4, 17, 16, 46, 30), 'result': '0.05199023035237896', 'result_long': None, 'result_double': None}] Qualite : 0.05199023035237896 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22141160 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22141160_17-04-2025_16_46_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22141160 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_P22141160_17-04-2025_16_46_30.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22141180, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22141181, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22141182, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22141183, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22141184, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22141185, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22141186, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22141187, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22141188, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22141189, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22141190, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22141191, 'pht': 3726}}" where mtr_portfolio_id = 22141160 and dashboard_run_id = 1731379 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`=22141160 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9938937, 0.05199023035237896, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22141160_17-04-2025_16_46_30.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22141180, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22141181, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22141182, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22141183, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22141184, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22141185, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22141186, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22141187, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22141188, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22141189, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22141190, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22141191, '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 = 22141820 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': 2731585, 'mtr_portfolio_id': 22141820, 'created_at': datetime.datetime(2025, 4, 17, 16, 50, 59), 'result': '0.029527022872986558', 'result_long': None, 'result_double': None}] Qualite : 0.029527022872986558 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22141820 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22141820_17-04-2025_16_50_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22141820 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_P22141820_17-04-2025_16_50_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22141823, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22141824, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22141825, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22141826, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22141827, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22141828, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22141829, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22141830, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22141831, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22141832, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22141833, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22141834, 'pht': 3726}}" where mtr_portfolio_id = 22141820 and dashboard_run_id = 1731379 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`=22141820 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9938938, 0.029527022872986558, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22141820_17-04-2025_16_50_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22141823, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22141824, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22141825, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22141826, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22141827, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22141828, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22141829, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22141830, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22141831, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22141832, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22141833, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22141834, '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 (22140073,22140760,22141160,22141820) result : ((1350740410,), (1350741145,), (1350741199,), (1350741254,), (1350741309,), (1350741364,), (1350741924,), (1350741974,), (1350742027,), (1350742109,), (1350742348,), (1350742351,), (1350742355,), (1350742357,), (1350742396,), (1350742399,), (1350743121,), (1350743171,), (1350743221,), (1350743269,), (1350743320,), (1350743581,), (1350743629,), (1350743679,), (1350743708,), (1350743803,), (1350743807,), (1350743812,), (1350743815,), (1350743820,), (1350743844,), (1350743847,), (1350743851,), (1350743855,), (1350743889,), (1350743893,), (1350743898,), (1350743902,), (1350743906,), (1350744017,), (1350744035,), (1350744039,), (1350744084,), (1350744091,), (1350744179,), (1350744187,), (1350744190,), (1350744193,), (1350744250,), (1350744255,), (1350744258,), (1350744260,), (1350744261,), (1350744311,), (1350744301,), (1350744303,), (1350744305,), (1350744306,), (1350744308,), (1350744487,), (1350744499,), (1350744501,), (1350744507,), (1350744562,), (1350744567,), (1350744569,), (1350744613,), (1350744617,), (1350744621,), (1350744624,), (1350744627,), (1350744630,), (1350744673,), (1350744676,), (1350744678,), (1350744679,), (1350744767,), (1350744769,), (1350744773,), (1350744775,), (1350744782,), (1350744821,), (1350744825,), (1350744833,), (1350744843,), (1350744854,), (1350744859,), (1350744897,), (1350744900,), (1350744902,), (1350744905,), (1350744906,), (1350744958,), (1350744961,), (1350744965,), (1350745011,), (1350745016,), (1350745019,), (1350745022,), (1350745025,), (1350745030,), (1350745077,), (1350745083,), (1350745088,), (1350745090,), (1350745095,), (1350745137,), (1350745141,), (1350745145,), (1350745149,), (1350745154,), (1350745204,), (1350745209,), (1350745220,), (1350745228,), (1350745233,), (1350745238,), (1350745281,), (1350745285,), (1350745289,), (1350745339,), (1350745345,), (1350745351,), (1350745486,), (1350745455,), (1350745474,), (1350745478,), (1350745481,), (1350745537,), (1350745546,), (1350745550,), (1350745553,), (1350745602,), (1350745605,), (1350745609,), (1350745675,), (1350745679,), (1350745683,), (1350745736,), (1350745887,), (1350745891,), (1350745948,), (1350745952,), (1350745955,), (1350745958,), (1350746015,), (1350746063,), (1350746068,), (1350746151,), (1350746154,), (1350746169,), (1350746254,), (1350746262,), (1350746265,), (1350746281,), (1350746400,), (1350746407,), (1350746417,), (1350746531,), (1350746534,), (1350746537,), (1350746601,), (1350746604,), (1350746608,), (1350746613,), (1350746664,), (1350746715,), (1350747047,), (1350747166,), (1350747192,), (1350747201,), (1350747203,), (1350747306,), (1350747312,), (1350747332,), (1350747361,), (1350747392,), (1350747475,), (1350747468,), (1350747472,), (1350747517,), (1350747521,), (1350747524,), (1350747526,), (1350747577,), (1350747584,), (1350747592,), (1350747631,), (1350747634,), (1350747637,), (1350747697,), (1350747705,), (1350747716,), (1350747720,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'17042025': {'nb_upload': 16, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22141820]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1350747720, 1350747716, 1350747705, 1350747697, 1350747637, 1350747634, 1350747631] map_info['map_portfolio_photo'] : {22141820: [1350747720, 1350747716, 1350747705, 1350747697, 1350747637, 1350747634, 1350747631, 1350747592, 1350747584, 1350747577, 1350747526, 1350747524, 1350747521, 1350747517, 1350747472, 1350747468]} final : True mtd_id 4302 list_pids : [1350747720, 1350747716, 1350747705, 1350747697, 1350747637, 1350747634, 1350747631] Looping around the photos to save general results len do output : 1 /22141820Didn'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, '2731585') ('4302', '22141820', '1350747720', None, None, None, None, None, '2731585') ('4302', None, None, None, None, None, None, None, '2731585') ('4302', '22141820', '1350747716', None, None, None, None, None, '2731585') ('4302', None, None, None, None, None, None, None, '2731585') ('4302', '22141820', '1350747705', None, None, None, None, None, '2731585') ('4302', None, None, None, None, None, None, None, '2731585') ('4302', '22141820', '1350747697', None, None, None, None, None, '2731585') ('4302', None, None, None, None, None, None, None, '2731585') ('4302', '22141820', '1350747637', None, None, None, None, None, '2731585') ('4302', None, None, None, None, None, None, None, '2731585') ('4302', '22141820', '1350747634', None, None, None, None, None, '2731585') ('4302', None, None, None, None, None, None, None, '2731585') ('4302', '22141820', '1350747631', None, None, None, None, None, '2731585') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 8 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, '22141820', 'None', None, None, None, None, '2731585'), ('4302', '22141820', '1350747720', None, None, None, None, None, '2731585'), ('4302', '22141820', '1350747716', None, None, None, None, None, '2731585'), ('4302', '22141820', '1350747705', None, None, None, None, None, '2731585'), ('4302', '22141820', '1350747697', None, None, None, None, None, '2731585'), ('4302', '22141820', '1350747637', None, None, None, None, None, '2731585'), ('4302', '22141820', '1350747634', None, None, None, None, None, '2731585'), ('4302', '22141820', '1350747631', None, None, None, None, None, '2731585')] time used for this insertion : 0.0191342830657959 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.3354475498199463 time spend to save output : 0.01933145523071289 total time spend for step 5 : 0.3547790050506592 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 (2731585) 1.96user 2.56system 0:06.61elapsed 68%CPU (0avgtext+0avgdata 159792maxresident)k 16inputs+4960outputs (0major+63932minor)pagefaults 0swaps