SELECT id, mtr_user_id, name, pb_hashtag_id, hashtag_id_list, button_legend_list, portfolio_id_lists, photo_hashtag_type, photo_desc_type, svm_limit, limit_tagging, is_public, live, created_at, updated_at, type_classification FROM MTRDatou.classification_theme WHERE `id` IN (2725) thcls : [{'id': 2725, 'mtr_user_id': 31, 'name': 'learn_qualipapia_rle_210302_2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Carton_brun,Carton_gris,Teint_Dans_La_Masse,autre_refus,cartonnette,environnement,kraft,metal,papier,plastique', 'svm_portfolios_learning': '3460440,3460441,3460446,3460434,3460439,3467416,3460442,3460443,3486028,3460445', 'photo_hashtag_type': 3410, 'photo_desc_type': 5186, 'type_classification': 'caffe', 'hashtag_id_list': '2107753024,2107753020,2107752385,2107752406,702398920,493012381,493202403,492628673,492668766,492725882'}] thcl {'id': 2725, 'mtr_user_id': 31, 'name': 'learn_qualipapia_rle_210302_2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Carton_brun,Carton_gris,Teint_Dans_La_Masse,autre_refus,cartonnette,environnement,kraft,metal,papier,plastique', 'svm_portfolios_learning': '3460440,3460441,3460446,3460434,3460439,3467416,3460442,3460443,3486028,3460445', 'photo_hashtag_type': 3410, 'photo_desc_type': 5186, 'type_classification': 'caffe', 'hashtag_id_list': '2107753024,2107753020,2107752385,2107752406,702398920,493012381,493202403,492628673,492668766,492725882'} Update svm_hashtag_type_desc : 5186 remove imagettes from duplicated photo Iterating over portfolio : 22043288 get user id for portfolio 22043288 get sub ptf for main ptf 22043288, type 3726 and hashtags ['Carton_brun', 'papier', 'mal_croppe', 'autre_refus', 'cartonnette', 'Teint_Dans_La_Masse', 'Carton_gris', 'metal', 'kraft', 'flou', 'environnement', 'plastique'] 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`=22043288 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','papier','mal_croppe','autre_refus','cartonnette','Teint_Dans_La_Masse','Carton_gris','metal','kraft','flou','environnement','plastique')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=22043288 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','papier','mal_croppe','autre_refus','cartonnette','Teint_Dans_La_Masse','Carton_gris','metal','kraft','flou','environnement','plastique')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__15042025_19_00_14_10203_3726_Carton_brun_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__15042025_19_00_14_10203_3726_papier_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__15042025_19_00_14_10203_3726_mal_croppe_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__15042025_19_00_14_10203_3726_autre_refus_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__15042025_19_00_14_10203_3726_cartonnette_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__15042025_19_00_14_10203_3726_Teint_Dans_La_Masse_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__15042025_19_00_14_10203_3726_Carton_gris_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__15042025_19_00_14_10203_3726_metal_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__15042025_19_00_14_10203_3726_kraft_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__15042025_19_00_14_10203_3726_flou_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__15042025_19_00_14_10203_3726_environnement_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__15042025_19_00_14_10203_3726_plastique_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio INSERT IGNORE INTO MTRPhoto.mtr_port_to_port_ids (`mtr_portfolio_id_1`, `mtr_portfolio_id_2`, `type`, `min_score`, `hashtag_id`, `mtr_user_id`) VALUES (%s,%s,%s,%s,%s,%s)[[22043288, 22043297, 3726, 0.5, 2107753024, 979], [22043288, 22043298, 3726, 0.5, 492668766, 979], [22043288, 22043299, 3726, 0.5, 2107755527, 979], [22043288, 22043300, 3726, 0.5, 2107752406, 979], [22043288, 22043301, 3726, 0.5, 702398920, 979], [22043288, 22043302, 3726, 0.5, 2107752385, 979], [22043288, 22043303, 3726, 0.5, 2107753020, 979], [22043288, 22043304, 3726, 0.5, 492628673, 979], [22043288, 22043305, 3726, 0.5, 493202403, 979], [22043288, 22043306, 3726, 0.5, 492777938, 979], [22043288, 22043307, 3726, 0.5, 493012381, 979], [22043288, 22043308, 3726, 0.5, 492725882, 979]] 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`=22043288 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','papier','mal_croppe','autre_refus','cartonnette','Teint_Dans_La_Masse','Carton_gris','metal','kraft','flou','environnement','plastique')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=22043288 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','papier','mal_croppe','autre_refus','cartonnette','Teint_Dans_La_Masse','Carton_gris','metal','kraft','flou','environnement','plastique')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_brun': {'main_port_id': 22043288, 'sub_port_id': 22043297, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534816, 'last_updated_at': datetime.datetime(2025, 4, 15, 19, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 15, 19, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 15, 19, 4, 59)}, 'papier': {'main_port_id': 22043288, 'sub_port_id': 22043298, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534817, 'last_updated_at': datetime.datetime(2025, 4, 15, 19, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 15, 19, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 15, 19, 4, 59)}, 'mal_croppe': {'main_port_id': 22043288, 'sub_port_id': 22043299, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534818, 'last_updated_at': datetime.datetime(2025, 4, 15, 19, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 15, 19, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 15, 19, 4, 59)}, 'autre_refus': {'main_port_id': 22043288, 'sub_port_id': 22043300, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534819, 'last_updated_at': datetime.datetime(2025, 4, 15, 19, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 15, 19, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 15, 19, 4, 59)}, 'cartonnette': {'main_port_id': 22043288, 'sub_port_id': 22043301, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534820, 'last_updated_at': datetime.datetime(2025, 4, 15, 19, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 15, 19, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 15, 19, 4, 59)}, 'Teint_Dans_La_Masse': {'main_port_id': 22043288, 'sub_port_id': 22043302, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534821, 'last_updated_at': datetime.datetime(2025, 4, 15, 19, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 15, 19, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 15, 19, 4, 59)}, 'Carton_gris': {'main_port_id': 22043288, 'sub_port_id': 22043303, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534822, 'last_updated_at': datetime.datetime(2025, 4, 15, 19, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 15, 19, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 15, 19, 4, 59)}, 'metal': {'main_port_id': 22043288, 'sub_port_id': 22043304, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534823, 'last_updated_at': datetime.datetime(2025, 4, 15, 19, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 15, 19, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 15, 19, 4, 59)}, 'kraft': {'main_port_id': 22043288, 'sub_port_id': 22043305, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534824, 'last_updated_at': datetime.datetime(2025, 4, 15, 19, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 15, 19, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 15, 19, 4, 59)}, 'flou': {'main_port_id': 22043288, 'sub_port_id': 22043306, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534825, 'last_updated_at': datetime.datetime(2025, 4, 15, 19, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 15, 19, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 15, 19, 4, 59)}, 'environnement': {'main_port_id': 22043288, 'sub_port_id': 22043307, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534826, 'last_updated_at': datetime.datetime(2025, 4, 15, 19, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 15, 19, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 15, 19, 4, 59)}, 'plastique': {'main_port_id': 22043288, 'sub_port_id': 22043308, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534827, 'last_updated_at': datetime.datetime(2025, 4, 15, 19, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 15, 19, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 15, 19, 4, 59)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22043297 , 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=22043288 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='Carton_brun' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22043297) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22043288) result : ((1349955759,), (1349955829,), (1349955896,), (1349956684,), (1349956719,), (1349956754,), (1349956786,), (1349956821,), (1349956861,), (1349956869,), (1349956872,), (1349956875,), (1349956877,)) 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 22043298 , 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=22043288 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 (22043298) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22043288) result : ((1349955759,), (1349955829,), (1349955896,), (1349956684,), (1349956719,), (1349956754,), (1349956786,), (1349956821,), (1349956861,), (1349956869,), (1349956872,), (1349956875,), (1349956877,)) 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 22043299 , 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=22043288 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 (22043299) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22043288) result : ((1349955759,), (1349955829,), (1349955896,), (1349956684,), (1349956719,), (1349956754,), (1349956786,), (1349956821,), (1349956861,), (1349956869,), (1349956872,), (1349956875,), (1349956877,)) 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 22043300 , 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=22043288 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 (22043300) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22043288) result : ((1349955759,), (1349955829,), (1349955896,), (1349956684,), (1349956719,), (1349956754,), (1349956786,), (1349956821,), (1349956861,), (1349956869,), (1349956872,), (1349956875,), (1349956877,)) 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 22043301 , 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=22043288 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 (22043301) result : ((1349957387,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22043288) result : ((1349955759,), (1349955829,), (1349955896,), (1349956684,), (1349956719,), (1349956754,), (1349956786,), (1349956821,), (1349956861,), (1349956869,), (1349956872,), (1349956875,), (1349956877,)) 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 22043302 , 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=22043288 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 (22043302) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22043288) result : ((1349955759,), (1349955829,), (1349955896,), (1349956684,), (1349956719,), (1349956754,), (1349956786,), (1349956821,), (1349956861,), (1349956869,), (1349956872,), (1349956875,), (1349956877,)) 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 22043303 , 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=22043288 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 (22043303) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22043288) result : ((1349955759,), (1349955829,), (1349955896,), (1349956684,), (1349956719,), (1349956754,), (1349956786,), (1349956821,), (1349956861,), (1349956869,), (1349956872,), (1349956875,), (1349956877,)) 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 22043304 , 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=22043288 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 (22043304) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22043288) result : ((1349955759,), (1349955829,), (1349955896,), (1349956684,), (1349956719,), (1349956754,), (1349956786,), (1349956821,), (1349956861,), (1349956869,), (1349956872,), (1349956875,), (1349956877,)) 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 22043305 , 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=22043288 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 (22043305) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22043288) result : ((1349955759,), (1349955829,), (1349955896,), (1349956684,), (1349956719,), (1349956754,), (1349956786,), (1349956821,), (1349956861,), (1349956869,), (1349956872,), (1349956875,), (1349956877,)) 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 22043306 , 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=22043288 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 (22043306) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22043288) result : ((1349955759,), (1349955829,), (1349955896,), (1349956684,), (1349956719,), (1349956754,), (1349956786,), (1349956821,), (1349956861,), (1349956869,), (1349956872,), (1349956875,), (1349956877,)) 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 22043307 , 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=22043288 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 (22043307) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22043288) result : ((1349955759,), (1349955829,), (1349955896,), (1349956684,), (1349956719,), (1349956754,), (1349956786,), (1349956821,), (1349956861,), (1349956869,), (1349956872,), (1349956875,), (1349956877,)) 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 22043308 , 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=22043288 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 (22043308) result : ((1349957407,), (1349957410,), (1349957413,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22043288) result : ((1349955759,), (1349955829,), (1349955896,), (1349956684,), (1349956719,), (1349956754,), (1349956786,), (1349956821,), (1349956861,), (1349956869,), (1349956872,), (1349956875,), (1349956877,)) 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`=22043288 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','papier','mal_croppe','autre_refus','cartonnette','Teint_Dans_La_Masse','Carton_gris','metal','kraft','flou','environnement','plastique')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=22043288 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','papier','mal_croppe','autre_refus','cartonnette','Teint_Dans_La_Masse','Carton_gris','metal','kraft','flou','environnement','plastique')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__15042025_19_00_14_10203_4417_Carton_brun_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__15042025_19_00_14_10203_4417_papier_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__15042025_19_00_14_10203_4417_mal_croppe_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__15042025_19_00_14_10203_4417_autre_refus_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__15042025_19_00_14_10203_4417_cartonnette_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__15042025_19_00_14_10203_4417_Teint_Dans_La_Masse_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__15042025_19_00_14_10203_4417_Carton_gris_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__15042025_19_00_14_10203_4417_metal_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__15042025_19_00_14_10203_4417_kraft_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__15042025_19_00_14_10203_4417_flou_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__15042025_19_00_14_10203_4417_environnement_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__15042025_19_00_14_10203_4417_plastique_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio INSERT IGNORE INTO MTRPhoto.mtr_port_to_port_ids (`mtr_portfolio_id_1`, `mtr_portfolio_id_2`, `type`, `min_score`, `hashtag_id`, `mtr_user_id`) VALUES (%s,%s,%s,%s,%s,%s)[[22043288, 22043309, 4417, 0.5, 2107753024, 979], [22043288, 22043310, 4417, 0.5, 492668766, 979], [22043288, 22043311, 4417, 0.5, 2107755527, 979], [22043288, 22043312, 4417, 0.5, 2107752406, 979], [22043288, 22043313, 4417, 0.5, 702398920, 979], [22043288, 22043314, 4417, 0.5, 2107752385, 979], [22043288, 22043315, 4417, 0.5, 2107753020, 979], [22043288, 22043316, 4417, 0.5, 492628673, 979], [22043288, 22043317, 4417, 0.5, 493202403, 979], [22043288, 22043318, 4417, 0.5, 492777938, 979], [22043288, 22043319, 4417, 0.5, 493012381, 979], [22043288, 22043320, 4417, 0.5, 492725882, 979]] 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`=22043288 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','papier','mal_croppe','autre_refus','cartonnette','Teint_Dans_La_Masse','Carton_gris','metal','kraft','flou','environnement','plastique')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=22043288 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','papier','mal_croppe','autre_refus','cartonnette','Teint_Dans_La_Masse','Carton_gris','metal','kraft','flou','environnement','plastique')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_brun': {'main_port_id': 22043288, 'sub_port_id': 22043309, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534828, 'last_updated_at': datetime.datetime(2025, 4, 15, 19, 5), 'last_updated_at_desc': datetime.datetime(2025, 4, 15, 19, 5), 'last_updated_at_asc': datetime.datetime(2025, 4, 15, 19, 5)}, 'papier': {'main_port_id': 22043288, 'sub_port_id': 22043310, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534829, 'last_updated_at': datetime.datetime(2025, 4, 15, 19, 5), 'last_updated_at_desc': datetime.datetime(2025, 4, 15, 19, 5), 'last_updated_at_asc': datetime.datetime(2025, 4, 15, 19, 5)}, 'mal_croppe': {'main_port_id': 22043288, 'sub_port_id': 22043311, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534830, 'last_updated_at': datetime.datetime(2025, 4, 15, 19, 5), 'last_updated_at_desc': datetime.datetime(2025, 4, 15, 19, 5), 'last_updated_at_asc': datetime.datetime(2025, 4, 15, 19, 5)}, 'autre_refus': {'main_port_id': 22043288, 'sub_port_id': 22043312, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534831, 'last_updated_at': datetime.datetime(2025, 4, 15, 19, 5), 'last_updated_at_desc': datetime.datetime(2025, 4, 15, 19, 5), 'last_updated_at_asc': datetime.datetime(2025, 4, 15, 19, 5)}, 'cartonnette': {'main_port_id': 22043288, 'sub_port_id': 22043313, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534832, 'last_updated_at': datetime.datetime(2025, 4, 15, 19, 5), 'last_updated_at_desc': datetime.datetime(2025, 4, 15, 19, 5), 'last_updated_at_asc': datetime.datetime(2025, 4, 15, 19, 5)}, 'Teint_Dans_La_Masse': {'main_port_id': 22043288, 'sub_port_id': 22043314, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534833, 'last_updated_at': datetime.datetime(2025, 4, 15, 19, 5), 'last_updated_at_desc': datetime.datetime(2025, 4, 15, 19, 5), 'last_updated_at_asc': datetime.datetime(2025, 4, 15, 19, 5)}, 'Carton_gris': {'main_port_id': 22043288, 'sub_port_id': 22043315, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534834, 'last_updated_at': datetime.datetime(2025, 4, 15, 19, 5), 'last_updated_at_desc': datetime.datetime(2025, 4, 15, 19, 5), 'last_updated_at_asc': datetime.datetime(2025, 4, 15, 19, 5)}, 'metal': {'main_port_id': 22043288, 'sub_port_id': 22043316, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534835, 'last_updated_at': datetime.datetime(2025, 4, 15, 19, 5), 'last_updated_at_desc': datetime.datetime(2025, 4, 15, 19, 5), 'last_updated_at_asc': datetime.datetime(2025, 4, 15, 19, 5)}, 'kraft': {'main_port_id': 22043288, 'sub_port_id': 22043317, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534836, 'last_updated_at': datetime.datetime(2025, 4, 15, 19, 5), 'last_updated_at_desc': datetime.datetime(2025, 4, 15, 19, 5), 'last_updated_at_asc': datetime.datetime(2025, 4, 15, 19, 5)}, 'flou': {'main_port_id': 22043288, 'sub_port_id': 22043318, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534837, 'last_updated_at': datetime.datetime(2025, 4, 15, 19, 5), 'last_updated_at_desc': datetime.datetime(2025, 4, 15, 19, 5), 'last_updated_at_asc': datetime.datetime(2025, 4, 15, 19, 5)}, 'environnement': {'main_port_id': 22043288, 'sub_port_id': 22043319, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534838, 'last_updated_at': datetime.datetime(2025, 4, 15, 19, 5), 'last_updated_at_desc': datetime.datetime(2025, 4, 15, 19, 5), 'last_updated_at_asc': datetime.datetime(2025, 4, 15, 19, 5)}, 'plastique': {'main_port_id': 22043288, 'sub_port_id': 22043320, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14534839, 'last_updated_at': datetime.datetime(2025, 4, 15, 19, 5), 'last_updated_at_desc': datetime.datetime(2025, 4, 15, 19, 5), 'last_updated_at_asc': datetime.datetime(2025, 4, 15, 19, 5)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22043309,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22043297 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22043310,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22043298 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22043311,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22043299 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22043312,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22043300 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22043313,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22043301 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22043314,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22043302 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22043315,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22043303 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22043316,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22043304 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22043317,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22043305 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22043318,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22043306 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22043319,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22043307 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22043320,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22043308 lien utilise dans velours : https://www.fotonower.com/velours/22043309,22043310,22043311,22043312,22043313,22043314,22043315,22043316,22043317,22043318,22043319,22043320?tags=Carton_brun,papier,mal_croppe,autre_refus,cartonnette,Teint_Dans_La_Masse,Carton_gris,metal,kraft,flou,environnement,plastique After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22043288]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1349956877, 1349956875, 1349956872, 1349956869, 1349956861, 1349956821, 1349956786, 1349956754, 1349956719, 1349956684, 1349955896, 1349955829, 1349955759] map_info['map_portfolio_photo'] : {22043288: [1349956877, 1349956875, 1349956872, 1349956869, 1349956861, 1349956821, 1349956786, 1349956754, 1349956719, 1349956684, 1349955896, 1349955829, 1349955759]} final : False mtd_id 4302 list_pids : [1349956877, 1349956875, 1349956872, 1349956869, 1349956861, 1349956821, 1349956786, 1349956754, 1349956719, 1349956684, 1349955896, 1349955829, 1349955759] Looping around the photos to save general results len do output : 1 /22043288. 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, '2722921') ('4302', '22043288', '1349956877', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956875', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956872', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956869', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956861', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956821', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956786', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956754', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956719', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956684', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349955896', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349955829', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349955759', None, None, None, None, None, '2722921') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 14 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, '22043288', "{'Carton_brun': 22043297, 'papier': 22043298, 'mal_croppe': 22043299, 'autre_refus': 22043300, 'cartonnette': 22043301, 'Teint_Dans_La_Masse': 22043302, 'Carton_gris': 22043303, 'metal': 22043304, 'kraft': 22043305, 'flou': 22043306, 'environnement': 22043307, 'plastique': 22043308}", None, None, None, None, '2722921'), ('4302', '22043288', '1349956877', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349956875', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349956872', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349956869', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349956861', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349956821', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349956786', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349956754', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349956719', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349956684', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349955896', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349955829', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349955759', None, None, None, None, None, '2722921')] time used for this insertion : 0.017264127731323242 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.9684224128723145 time spend to save output : 0.019022703170776367 total time spend for step 1 : 1.9874451160430908 step2:final Tue Apr 15 19:05:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22043288) 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 22043288 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1349955896,1349955829,1349955759,1349956821,1349956786,1349956754,1349956719,1349956684,1349956877,1349956875,1349956872,1349956869,1349956861); 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([22043288]) Inside saveOutput : final : False verbose : True original output for save of step final : {1349956877: ('0.05528112217317988',), 1349956875: ('0.05528112217317988',), 1349956872: ('0.05528112217317988',), 1349956869: ('0.05528112217317988',), 1349956861: ('0.05528112217317988',), 1349956821: ('0.05528112217317988',), 1349956786: ('0.05528112217317988',), 1349956754: ('0.05528112217317988',), 1349956719: ('0.05528112217317988',), 1349956684: ('0.05528112217317988',), 1349955896: ('0.05528112217317988',), 1349955829: ('0.05528112217317988',), 1349955759: ('0.05528112217317988',)} new output for save of step final : {1349956877: ('0.05528112217317988',), 1349956875: ('0.05528112217317988',), 1349956872: ('0.05528112217317988',), 1349956869: ('0.05528112217317988',), 1349956861: ('0.05528112217317988',), 1349956821: ('0.05528112217317988',), 1349956786: ('0.05528112217317988',), 1349956754: ('0.05528112217317988',), 1349956719: ('0.05528112217317988',), 1349956684: ('0.05528112217317988',), 1349955896: ('0.05528112217317988',), 1349955829: ('0.05528112217317988',), 1349955759: ('0.05528112217317988',)} [1349956877, 1349956875, 1349956872, 1349956869, 1349956861, 1349956821, 1349956786, 1349956754, 1349956719, 1349956684, 1349955896, 1349955829, 1349955759] map_info['map_portfolio_photo'] : {22043288: [1349956877, 1349956875, 1349956872, 1349956869, 1349956861, 1349956821, 1349956786, 1349956754, 1349956719, 1349956684, 1349955896, 1349955829, 1349955759]} final : False mtd_id 4302 list_pids : [1349956877, 1349956875, 1349956872, 1349956869, 1349956861, 1349956821, 1349956786, 1349956754, 1349956719, 1349956684, 1349955896, 1349955829, 1349955759] Looping around the photos to save general results len do output : 13 /1349956877.Didn't retrieve data . /1349956875.Didn't retrieve data . /1349956872.Didn't retrieve data . /1349956869.Didn't retrieve data . /1349956861.Didn't retrieve data . /1349956821.Didn't retrieve data . /1349956786.Didn't retrieve data . /1349956754.Didn't retrieve data . /1349956719.Didn't retrieve data . /1349956684.Didn't retrieve data . /1349955896.Didn't retrieve data . /1349955829.Didn't retrieve data . /1349955759.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, '2722921') ('4302', '22043288', '1349956877', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956875', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956872', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956869', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956861', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956821', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956786', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956754', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956719', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956684', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349955896', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349955829', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349955759', None, None, None, None, None, '2722921') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 39 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', '22043288', '1349956877', '0.05528112217317988', None, None, None, None, '2722921'), ('4302', '22043288', '1349956875', '0.05528112217317988', None, None, None, None, '2722921'), ('4302', '22043288', '1349956872', '0.05528112217317988', None, None, None, None, '2722921'), ('4302', '22043288', '1349956869', '0.05528112217317988', None, None, None, None, '2722921'), ('4302', '22043288', '1349956861', '0.05528112217317988', None, None, None, None, '2722921'), ('4302', '22043288', '1349956821', '0.05528112217317988', None, None, None, None, '2722921'), ('4302', '22043288', '1349956786', '0.05528112217317988', None, None, None, None, '2722921'), ('4302', '22043288', '1349956754', '0.05528112217317988', None, None, None, None, '2722921'), ('4302', '22043288', '1349956719', '0.05528112217317988', None, None, None, None, '2722921'), ('4302', '22043288', '1349956684', '0.05528112217317988', None, None, None, None, '2722921'), ('4302', '22043288', '1349955896', '0.05528112217317988', None, None, None, None, '2722921'), ('4302', '22043288', '1349955829', '0.05528112217317988', None, None, None, None, '2722921'), ('4302', '22043288', '1349955759', '0.05528112217317988', None, None, None, None, '2722921')] time used for this insertion : 0.017283201217651367 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.03947019577026367 time spend to save output : 0.017902135848999023 total time spend for step 2 : 0.057372331619262695 step3:velours_tree Tue Apr 15 19:05:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {22043288: [{'Carton_brun': 22043297, 'papier': 22043298, 'mal_croppe': 22043299, 'autre_refus': 22043300, 'cartonnette': 22043301, 'Teint_Dans_La_Masse': 22043302, 'Carton_gris': 22043303, 'metal': 22043304, 'kraft': 22043305, 'flou': 22043306, 'environnement': 22043307, 'plastique': 22043308}]} input_args_next_step : {22043288: ()} output_args : {22043288: [{'Carton_brun': 22043297, 'papier': 22043298, 'mal_croppe': 22043299, 'autre_refus': 22043300, 'cartonnette': 22043301, 'Teint_Dans_La_Masse': 22043302, 'Carton_gris': 22043303, 'metal': 22043304, 'kraft': 22043305, 'flou': 22043306, 'environnement': 22043307, 'plastique': 22043308}]} args : 22043288 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': 22043297, 'papier': 22043298, 'mal_croppe': 22043299, 'autre_refus': 22043300, 'cartonnette': 22043301, 'Teint_Dans_La_Masse': 22043302, 'Carton_gris': 22043303, 'metal': 22043304, 'kraft': 22043305, 'flou': 22043306, 'environnement': 22043307, 'plastique': 22043308},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22043288) 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([22043288]) 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.9316613674163818 time spend to save output : 0.00011301040649414062 total time spend for step 3 : 0.931774377822876 step4:send_mail_cod Tue Apr 15 19:05:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1349956877: ('0.05528112217317988',), 1349956875: ('0.05528112217317988',), 1349956872: ('0.05528112217317988',), 1349956869: ('0.05528112217317988',), 1349956861: ('0.05528112217317988',), 1349956821: ('0.05528112217317988',), 1349956786: ('0.05528112217317988',), 1349956754: ('0.05528112217317988',), 1349956719: ('0.05528112217317988',), 1349956684: ('0.05528112217317988',), 1349955896: ('0.05528112217317988',), 1349955829: ('0.05528112217317988',), 1349955759: ('0.05528112217317988',)} input_args_next_step : {1349956877: ()} output_args : {1349956877: ('0.05528112217317988',), 1349956875: ('0.05528112217317988',), 1349956872: ('0.05528112217317988',), 1349956869: ('0.05528112217317988',), 1349956861: ('0.05528112217317988',), 1349956821: ('0.05528112217317988',), 1349956786: ('0.05528112217317988',), 1349956754: ('0.05528112217317988',), 1349956719: ('0.05528112217317988',), 1349956684: ('0.05528112217317988',), 1349955896: ('0.05528112217317988',), 1349955829: ('0.05528112217317988',), 1349955759: ('0.05528112217317988',)} args : 1349956877 depend.output_id : 0 input_args_next_step : {1349956877: ('0.05528112217317988',), 1349956875: ()} output_args : {1349956877: ('0.05528112217317988',), 1349956875: ('0.05528112217317988',), 1349956872: ('0.05528112217317988',), 1349956869: ('0.05528112217317988',), 1349956861: ('0.05528112217317988',), 1349956821: ('0.05528112217317988',), 1349956786: ('0.05528112217317988',), 1349956754: ('0.05528112217317988',), 1349956719: ('0.05528112217317988',), 1349956684: ('0.05528112217317988',), 1349955896: ('0.05528112217317988',), 1349955829: ('0.05528112217317988',), 1349955759: ('0.05528112217317988',)} args : 1349956875 depend.output_id : 0 input_args_next_step : {1349956877: ('0.05528112217317988',), 1349956875: ('0.05528112217317988',), 1349956872: ()} output_args : {1349956877: ('0.05528112217317988',), 1349956875: ('0.05528112217317988',), 1349956872: ('0.05528112217317988',), 1349956869: ('0.05528112217317988',), 1349956861: ('0.05528112217317988',), 1349956821: ('0.05528112217317988',), 1349956786: ('0.05528112217317988',), 1349956754: ('0.05528112217317988',), 1349956719: ('0.05528112217317988',), 1349956684: ('0.05528112217317988',), 1349955896: ('0.05528112217317988',), 1349955829: ('0.05528112217317988',), 1349955759: ('0.05528112217317988',)} args : 1349956872 depend.output_id : 0 input_args_next_step : {1349956877: ('0.05528112217317988',), 1349956875: ('0.05528112217317988',), 1349956872: ('0.05528112217317988',), 1349956869: ()} output_args : {1349956877: ('0.05528112217317988',), 1349956875: ('0.05528112217317988',), 1349956872: ('0.05528112217317988',), 1349956869: ('0.05528112217317988',), 1349956861: ('0.05528112217317988',), 1349956821: ('0.05528112217317988',), 1349956786: ('0.05528112217317988',), 1349956754: ('0.05528112217317988',), 1349956719: ('0.05528112217317988',), 1349956684: ('0.05528112217317988',), 1349955896: ('0.05528112217317988',), 1349955829: ('0.05528112217317988',), 1349955759: ('0.05528112217317988',)} args : 1349956869 depend.output_id : 0 input_args_next_step : {1349956877: ('0.05528112217317988',), 1349956875: ('0.05528112217317988',), 1349956872: ('0.05528112217317988',), 1349956869: ('0.05528112217317988',), 1349956861: ()} output_args : {1349956877: ('0.05528112217317988',), 1349956875: ('0.05528112217317988',), 1349956872: ('0.05528112217317988',), 1349956869: ('0.05528112217317988',), 1349956861: ('0.05528112217317988',), 1349956821: ('0.05528112217317988',), 1349956786: ('0.05528112217317988',), 1349956754: ('0.05528112217317988',), 1349956719: ('0.05528112217317988',), 1349956684: ('0.05528112217317988',), 1349955896: ('0.05528112217317988',), 1349955829: ('0.05528112217317988',), 1349955759: ('0.05528112217317988',)} args : 1349956861 depend.output_id : 0 input_args_next_step : {1349956877: ('0.05528112217317988',), 1349956875: ('0.05528112217317988',), 1349956872: ('0.05528112217317988',), 1349956869: ('0.05528112217317988',), 1349956861: ('0.05528112217317988',), 1349956821: ()} output_args : {1349956877: ('0.05528112217317988',), 1349956875: ('0.05528112217317988',), 1349956872: ('0.05528112217317988',), 1349956869: ('0.05528112217317988',), 1349956861: ('0.05528112217317988',), 1349956821: ('0.05528112217317988',), 1349956786: ('0.05528112217317988',), 1349956754: ('0.05528112217317988',), 1349956719: ('0.05528112217317988',), 1349956684: ('0.05528112217317988',), 1349955896: ('0.05528112217317988',), 1349955829: ('0.05528112217317988',), 1349955759: ('0.05528112217317988',)} args : 1349956821 depend.output_id : 0 input_args_next_step : {1349956877: ('0.05528112217317988',), 1349956875: ('0.05528112217317988',), 1349956872: ('0.05528112217317988',), 1349956869: ('0.05528112217317988',), 1349956861: ('0.05528112217317988',), 1349956821: ('0.05528112217317988',), 1349956786: ()} output_args : {1349956877: ('0.05528112217317988',), 1349956875: ('0.05528112217317988',), 1349956872: ('0.05528112217317988',), 1349956869: ('0.05528112217317988',), 1349956861: ('0.05528112217317988',), 1349956821: ('0.05528112217317988',), 1349956786: ('0.05528112217317988',), 1349956754: ('0.05528112217317988',), 1349956719: ('0.05528112217317988',), 1349956684: ('0.05528112217317988',), 1349955896: ('0.05528112217317988',), 1349955829: ('0.05528112217317988',), 1349955759: ('0.05528112217317988',)} args : 1349956786 depend.output_id : 0 input_args_next_step : {1349956877: ('0.05528112217317988',), 1349956875: ('0.05528112217317988',), 1349956872: ('0.05528112217317988',), 1349956869: ('0.05528112217317988',), 1349956861: ('0.05528112217317988',), 1349956821: ('0.05528112217317988',), 1349956786: ('0.05528112217317988',), 1349956754: ()} output_args : {1349956877: ('0.05528112217317988',), 1349956875: ('0.05528112217317988',), 1349956872: ('0.05528112217317988',), 1349956869: ('0.05528112217317988',), 1349956861: ('0.05528112217317988',), 1349956821: ('0.05528112217317988',), 1349956786: ('0.05528112217317988',), 1349956754: ('0.05528112217317988',), 1349956719: ('0.05528112217317988',), 1349956684: ('0.05528112217317988',), 1349955896: ('0.05528112217317988',), 1349955829: ('0.05528112217317988',), 1349955759: ('0.05528112217317988',)} args : 1349956754 depend.output_id : 0 input_args_next_step : {1349956877: ('0.05528112217317988',), 1349956875: ('0.05528112217317988',), 1349956872: ('0.05528112217317988',), 1349956869: ('0.05528112217317988',), 1349956861: ('0.05528112217317988',), 1349956821: ('0.05528112217317988',), 1349956786: ('0.05528112217317988',), 1349956754: ('0.05528112217317988',), 1349956719: ()} output_args : {1349956877: ('0.05528112217317988',), 1349956875: ('0.05528112217317988',), 1349956872: ('0.05528112217317988',), 1349956869: ('0.05528112217317988',), 1349956861: ('0.05528112217317988',), 1349956821: ('0.05528112217317988',), 1349956786: ('0.05528112217317988',), 1349956754: ('0.05528112217317988',), 1349956719: ('0.05528112217317988',), 1349956684: ('0.05528112217317988',), 1349955896: ('0.05528112217317988',), 1349955829: ('0.05528112217317988',), 1349955759: ('0.05528112217317988',)} args : 1349956719 depend.output_id : 0 input_args_next_step : {1349956877: ('0.05528112217317988',), 1349956875: ('0.05528112217317988',), 1349956872: ('0.05528112217317988',), 1349956869: ('0.05528112217317988',), 1349956861: ('0.05528112217317988',), 1349956821: ('0.05528112217317988',), 1349956786: ('0.05528112217317988',), 1349956754: ('0.05528112217317988',), 1349956719: ('0.05528112217317988',), 1349956684: ()} output_args : {1349956877: ('0.05528112217317988',), 1349956875: ('0.05528112217317988',), 1349956872: ('0.05528112217317988',), 1349956869: ('0.05528112217317988',), 1349956861: ('0.05528112217317988',), 1349956821: ('0.05528112217317988',), 1349956786: ('0.05528112217317988',), 1349956754: ('0.05528112217317988',), 1349956719: ('0.05528112217317988',), 1349956684: ('0.05528112217317988',), 1349955896: ('0.05528112217317988',), 1349955829: ('0.05528112217317988',), 1349955759: ('0.05528112217317988',)} args : 1349956684 depend.output_id : 0 input_args_next_step : {1349956877: ('0.05528112217317988',), 1349956875: ('0.05528112217317988',), 1349956872: ('0.05528112217317988',), 1349956869: ('0.05528112217317988',), 1349956861: ('0.05528112217317988',), 1349956821: ('0.05528112217317988',), 1349956786: ('0.05528112217317988',), 1349956754: ('0.05528112217317988',), 1349956719: ('0.05528112217317988',), 1349956684: ('0.05528112217317988',), 1349955896: ()} output_args : {1349956877: ('0.05528112217317988',), 1349956875: ('0.05528112217317988',), 1349956872: ('0.05528112217317988',), 1349956869: ('0.05528112217317988',), 1349956861: ('0.05528112217317988',), 1349956821: ('0.05528112217317988',), 1349956786: ('0.05528112217317988',), 1349956754: ('0.05528112217317988',), 1349956719: ('0.05528112217317988',), 1349956684: ('0.05528112217317988',), 1349955896: ('0.05528112217317988',), 1349955829: ('0.05528112217317988',), 1349955759: ('0.05528112217317988',)} args : 1349955896 depend.output_id : 0 input_args_next_step : {1349956877: ('0.05528112217317988',), 1349956875: ('0.05528112217317988',), 1349956872: ('0.05528112217317988',), 1349956869: ('0.05528112217317988',), 1349956861: ('0.05528112217317988',), 1349956821: ('0.05528112217317988',), 1349956786: ('0.05528112217317988',), 1349956754: ('0.05528112217317988',), 1349956719: ('0.05528112217317988',), 1349956684: ('0.05528112217317988',), 1349955896: ('0.05528112217317988',), 1349955829: ()} output_args : {1349956877: ('0.05528112217317988',), 1349956875: ('0.05528112217317988',), 1349956872: ('0.05528112217317988',), 1349956869: ('0.05528112217317988',), 1349956861: ('0.05528112217317988',), 1349956821: ('0.05528112217317988',), 1349956786: ('0.05528112217317988',), 1349956754: ('0.05528112217317988',), 1349956719: ('0.05528112217317988',), 1349956684: ('0.05528112217317988',), 1349955896: ('0.05528112217317988',), 1349955829: ('0.05528112217317988',), 1349955759: ('0.05528112217317988',)} args : 1349955829 depend.output_id : 0 input_args_next_step : {1349956877: ('0.05528112217317988',), 1349956875: ('0.05528112217317988',), 1349956872: ('0.05528112217317988',), 1349956869: ('0.05528112217317988',), 1349956861: ('0.05528112217317988',), 1349956821: ('0.05528112217317988',), 1349956786: ('0.05528112217317988',), 1349956754: ('0.05528112217317988',), 1349956719: ('0.05528112217317988',), 1349956684: ('0.05528112217317988',), 1349955896: ('0.05528112217317988',), 1349955829: ('0.05528112217317988',), 1349955759: ()} output_args : {1349956877: ('0.05528112217317988',), 1349956875: ('0.05528112217317988',), 1349956872: ('0.05528112217317988',), 1349956869: ('0.05528112217317988',), 1349956861: ('0.05528112217317988',), 1349956821: ('0.05528112217317988',), 1349956786: ('0.05528112217317988',), 1349956754: ('0.05528112217317988',), 1349956719: ('0.05528112217317988',), 1349956684: ('0.05528112217317988',), 1349955896: ('0.05528112217317988',), 1349955829: ('0.05528112217317988',), 1349955759: ('0.05528112217317988',)} args : 1349955759 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 : {22043288: [{'Carton_brun': 22043297, 'papier': 22043298, 'mal_croppe': 22043299, 'autre_refus': 22043300, 'cartonnette': 22043301, 'Teint_Dans_La_Masse': 22043302, 'Carton_gris': 22043303, 'metal': 22043304, 'kraft': 22043305, 'flou': 22043306, 'environnement': 22043307, 'plastique': 22043308}]} input_args_next_step : {1349956877: ('0.05528112217317988',), 1349956875: ('0.05528112217317988',), 1349956872: ('0.05528112217317988',), 1349956869: ('0.05528112217317988',), 1349956861: ('0.05528112217317988',), 1349956821: ('0.05528112217317988',), 1349956786: ('0.05528112217317988',), 1349956754: ('0.05528112217317988',), 1349956719: ('0.05528112217317988',), 1349956684: ('0.05528112217317988',), 1349955896: ('0.05528112217317988',), 1349955829: ('0.05528112217317988',), 1349955759: ('0.05528112217317988',), 22043288: ()} output_args : {22043288: [{'Carton_brun': 22043297, 'papier': 22043298, 'mal_croppe': 22043299, 'autre_refus': 22043300, 'cartonnette': 22043301, 'Teint_Dans_La_Masse': 22043302, 'Carton_gris': 22043303, 'metal': 22043304, 'kraft': 22043305, 'flou': 22043306, 'environnement': 22043307, 'plastique': 22043308}]} args : 22043288 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 :14, first value : ('0.05528112217317988',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22043288) 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 (1349956877,1349956875,1349956872,1349956869,1349956861,1349956821,1349956786,1349956754,1349956719,1349956684,1349955896,1349955829,1349955759) Found this number of photos: 13 ##### Call download_photos : nb_thread : 5 begin to download photo : 1349955759 begin to download photo : 1349956684 begin to download photo : 1349956786 begin to download photo : 1349956869 begin to download photo : 1349956877 download finish for photo 1349956869 begin to download photo : 1349956872 download finish for photo 1349956684 begin to download photo : 1349956719 download finish for photo 1349956877 download finish for photo 1349955759 begin to download photo : 1349955829 download finish for photo 1349956786 begin to download photo : 1349956821 download finish for photo 1349956872 begin to download photo : 1349956875 download finish for photo 1349956719 begin to download photo : 1349956754 download finish for photo 1349955829 begin to download photo : 1349955896 download finish for photo 1349956821 begin to download photo : 1349956861 download finish for photo 1349956875 download finish for photo 1349956754 download finish for photo 1349955896 download finish for photo 1349956861 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette220432991744736702/ imagette220433001744736702/ length of list_filenames : 13 ; length of list_pids : 13 ; length of list_args : 13 results_Auto_P22043288_15-04-2025_19_05_02.pdf 22043299 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=22043299 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220432991744736702 22043300 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=22043300 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220433001744736702 22043301 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=22043301 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349957387: '1744736622_1221539_1349955829_2bb3bad83734036937823c5f64a5d853_rle_crop_3747052263_0.png'} change filename to text .imagette220433011744736702/ imagette220433011744736702/1744736622_1221539_1349955829_2bb3bad83734036937823c5f64a5d853_rle_crop_3747052263_0.png.png imagette220433041744736702/ imagette220433051744736702/ imagette220433061744736702/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/15/7fc0664d5f55d2dacdb2e8607e9ae918_45171526.png imagette220433011744736702 22043304 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=22043304 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220433041744736702 22043305 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=22043305 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220433051744736702 22043306 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=22043306 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220433061744736702 22043308 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=22043308 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349957407: '1744736622_1221539_1349955896_39b35d875aa53c7a5d09bc466f00d6db_rle_crop_3747052250_0.png', 1349957410: '1744736622_1221539_1349955829_2bb3bad83734036937823c5f64a5d853_rle_crop_3747052270_0.png', 1349957413: '1744736622_1221539_1349955759_864458c94695f2fde49a2099e2c5f034_rle_crop_3747052281_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/15/01fd3feceb17d191f91836a28eebdc5e_1163842.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/15/63ba3ad0f276d5b96654409af0d43756_79600005.png change filename to text .imagette220433081744736702/ imagette220433081744736702/1744736622_1221539_1349955829_2bb3bad83734036937823c5f64a5d853_rle_crop_3747052270_0.png.png imagette220433081744736702/1744736622_1221539_1349955759_864458c94695f2fde49a2099e2c5f034_rle_crop_3747052281_0.png.png imagette220433081744736702/1744736622_1221539_1349955896_39b35d875aa53c7a5d09bc466f00d6db_rle_crop_3747052250_0.png.png imagette220432971744736702/ imagette220433021744736702/ imagette220433031744736702/ wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/15/e4f5cb34cf6d3589764d24fba722900f_49010684.png imagette220433081744736702 22043297 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=22043297 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220432971744736702 22043302 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=22043302 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220433021744736702 22043303 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=22043303 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220433031744736702 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=22043288 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/22043309,22043310,22043311,22043312,22043313,22043314,22043315,22043316,22043317,22043318,22043319,22043320?tags=Carton_brun,papier,mal_croppe,autre_refus,cartonnette,Teint_Dans_La_Masse,Carton_gris,metal,kraft,flou,environnement,plastique your option no_mail is active, we will not send the real mail to your client args[1349956877] : ('0.05528112217317988',) no score found for photo 1349956877 We are sending mail with results at report@fotonower.com args[1349956875] : ('0.05528112217317988',) no score found for photo 1349956875 We are sending mail with results at report@fotonower.com args[1349956872] : ('0.05528112217317988',) no score found for photo 1349956872 We are sending mail with results at report@fotonower.com args[1349956869] : ('0.05528112217317988',) no score found for photo 1349956869 We are sending mail with results at report@fotonower.com args[1349956861] : ('0.05528112217317988',) no score found for photo 1349956861 We are sending mail with results at report@fotonower.com args[1349956821] : ('0.05528112217317988',) no score found for photo 1349956821 We are sending mail with results at report@fotonower.com args[1349956786] : ('0.05528112217317988',) no score found for photo 1349956786 We are sending mail with results at report@fotonower.com args[1349956754] : ('0.05528112217317988',) no score found for photo 1349956754 We are sending mail with results at report@fotonower.com args[1349956719] : ('0.05528112217317988',) no score found for photo 1349956719 We are sending mail with results at report@fotonower.com args[1349956684] : ('0.05528112217317988',) no score found for photo 1349956684 We are sending mail with results at report@fotonower.com args[1349955896] : ('0.05528112217317988',) no score found for photo 1349955896 We are sending mail with results at report@fotonower.com args[1349955829] : ('0.05528112217317988',) no score found for photo 1349955829 We are sending mail with results at report@fotonower.com args[1349955759] : ('0.05528112217317988',) no score found for photo 1349955759 We are sending mail with results at report@fotonower.com refus_total : 0.05528112217317988 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=22043288 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_P22043288_15-04-2025_19_05_02.pdf results_Auto_P22043288_15-04-2025_19_05_02.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22043288_15-04-2025_19_05_02.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','22043288','results_Auto_P22043288_15-04-2025_19_05_02.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22043288_15-04-2025_19_05_02.pdf','pdf','','0.14','0.05528112217317988') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22043288]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1349956877, 1349956875, 1349956872, 1349956869, 1349956861, 1349956821, 1349956786, 1349956754, 1349956719, 1349956684, 1349955896, 1349955829, 1349955759] map_info['map_portfolio_photo'] : {22043288: [1349956877, 1349956875, 1349956872, 1349956869, 1349956861, 1349956821, 1349956786, 1349956754, 1349956719, 1349956684, 1349955896, 1349955829, 1349955759]} final : False mtd_id 4302 list_pids : [1349956877, 1349956875, 1349956872, 1349956869, 1349956861, 1349956821, 1349956786, 1349956754, 1349956719, 1349956684, 1349955896, 1349955829, 1349955759] 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, '2722921') ('4302', '22043288', '1349956877', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956875', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956872', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956869', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956861', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956821', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956786', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956754', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956719', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956684', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349955896', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349955829', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349955759', None, None, None, None, None, '2722921') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 13 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', '22043288', '1349956877', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349956875', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349956872', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349956869', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349956861', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349956821', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349956786', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349956754', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349956719', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349956684', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349955896', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349955829', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349955759', None, None, None, None, None, '2722921')] time used for this insertion : 0.016243934631347656 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.069429636001587 time spend to save output : 0.016544103622436523 total time spend for step 4 : 2.0859737396240234 step5:split_time_score Tue Apr 15 19:05:03 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['22043288'] 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 : [('22043288',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22043288) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1349956877: {'path': 'temp/1744736701_673217_1349956877_dd11fb3cb318a29de871012cf38cfb28.jpg', 'extension': 'jpg'}, 1349956869: {'path': 'temp/1744736701_673217_1349956869_d74be007edc9141d37e32b47e649e942.jpg', 'extension': 'jpg'}, 1349956872: {'path': 'temp/1744736701_673217_1349956872_a2413ef66012eb8d8b57f36a4a586e5a.jpg', 'extension': 'jpg'}, 1349956875: {'path': 'temp/1744736701_673217_1349956875_2a75dd416f89847a790474dc14afacc1.jpg', 'extension': 'jpg'}, 1349956684: {'path': 'temp/1744736701_673217_1349956684_c0932312350e83bade588979ff3abdba.jpg', 'extension': 'jpg'}, 1349956719: {'path': 'temp/1744736701_673217_1349956719_7881ca2b16ed565fbd2d60a58d267459.jpg', 'extension': 'jpg'}, 1349956754: {'path': 'temp/1744736701_673217_1349956754_3021ad12763bf5d02a9de3df059b2916.jpg', 'extension': 'jpg'}, 1349955759: {'path': 'temp/1744736701_673217_1349955759_864458c94695f2fde49a2099e2c5f034.jpg', 'extension': 'jpg'}, 1349955829: {'path': 'temp/1744736701_673217_1349955829_2bb3bad83734036937823c5f64a5d853.jpg', 'extension': 'jpg'}, 1349955896: {'path': 'temp/1744736701_673217_1349955896_39b35d875aa53c7a5d09bc466f00d6db.jpg', 'extension': 'jpg'}, 1349956786: {'path': 'temp/1744736701_673217_1349956786_9a66e8128ff8285fb4ef85d16af5c6a0.jpg', 'extension': 'jpg'}, 1349956821: {'path': 'temp/1744736701_673217_1349956821_6fa5696757a32b1cbe8876371dc2666e.jpg', 'extension': 'jpg'}, 1349956861: {'path': 'temp/1744736701_673217_1349956861_e56c4ac05d6cca1b0fb7f09dda020349.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 = 22043288; (('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 = 22043288 group by h (('19', 13),) 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=22043288 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 (22043288) 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 (22043288) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 15042025 22043288 Nombre de photos uploadées : 13 / 23040 (0%) 15042025 22043288 Nombre de photos taguées (types de déchets): 0 / 13 (0%) 15042025 22043288 Nombre de photos taguées (volume) : 0 / 13 (0%) [{'photo_id': 1349955896, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/15/39b35d875aa53c7a5d09bc466f00d6db.jpg', 'username': None, 'uploaded_at': 1744736498, 'text': 'image_15042025_19_00_14_10202.jpg'}, {'photo_id': 1349955829, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/15/2bb3bad83734036937823c5f64a5d853.jpg', 'username': None, 'uploaded_at': 1744736498, 'text': 'image_15042025_19_00_24_10140.jpg'}, {'photo_id': 1349955759, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/15/864458c94695f2fde49a2099e2c5f034.jpg', 'username': None, 'uploaded_at': 1744736498, 'text': 'image_15042025_19_00_34_10141.jpg'}, {'photo_id': 1349956821, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/15/6fa5696757a32b1cbe8876371dc2666e.jpg', 'username': None, 'uploaded_at': 1744736558, 'text': 'image_15042025_19_00_55_10135.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.9073486328125e-06 elapsed_time : order_list_meta_photo_and_scores 6.198883056640625e-06 ????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0006949901580810547 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 22043288, '2025-04-15' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1714503,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.028275251388549805 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= 1714503 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1714503, 'dashboard_run_id': 1723785, 'mtr_portfolio_id': 22041608, 'dashboard_result_id': 9859925, '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_P22041608_15-04-2025_18_33_00.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22041636, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22041637, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22041638, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22041639, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22041640, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22041641, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22041642, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22041643, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22041644, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22041645, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22041646, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22041647, 'pht': 3726}}"}, {'dashboat_entry_day': 1714503, 'dashboard_run_id': 1723785, 'mtr_portfolio_id': 22042194, 'dashboard_result_id': 9859926, '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_P22042194_15-04-2025_18_48_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22042215, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22042216, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22042217, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22042218, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22042219, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22042220, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22042221, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22042222, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22042223, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22042224, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22042225, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22042226, 'pht': 3726}}"}, {'dashboat_entry_day': 1714503, 'dashboard_run_id': 1723785, 'mtr_portfolio_id': 22042817, 'dashboard_result_id': 9859927, '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_P22042817_15-04-2025_19_03_00.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22042818, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22042819, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22042820, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22042821, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22042822, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22042823, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22042824, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22042825, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22042826, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22042827, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22042828, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22042829, 'pht': 3726}}"}, {'dashboat_entry_day': 1714503, 'dashboard_run_id': 1723785, 'mtr_portfolio_id': 22043288, 'dashboard_result_id': 9859928, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0}"}] 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 = 22041608 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': 2722721, 'mtr_portfolio_id': 22041608, 'created_at': datetime.datetime(2025, 4, 15, 18, 32, 59), 'result': '0.039576403964266316', 'result_long': None, 'result_double': None}] Qualite : 0.039576403964266316 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22041608 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22041608_15-04-2025_18_33_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22041608 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_P22041608_15-04-2025_18_33_00.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22041636, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22041637, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22041638, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22041639, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22041640, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22041641, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22041642, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22041643, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22041644, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22041645, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22041646, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22041647, 'pht': 3726}}" where mtr_portfolio_id = 22041608 and dashboard_run_id = 1723785 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`=22041608 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9859925, 0.039576403964266316, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22041608_15-04-2025_18_33_00.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22041636, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22041637, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22041638, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22041639, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22041640, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22041641, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22041642, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22041643, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22041644, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22041645, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22041646, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22041647, '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 = 22042194 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': 2722788, 'mtr_portfolio_id': 22042194, 'created_at': datetime.datetime(2025, 4, 15, 18, 48, 58), 'result': '0.06618043090690692', 'result_long': None, 'result_double': None}] Qualite : 0.06618043090690692 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22042194 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22042194_15-04-2025_18_48_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22042194 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_P22042194_15-04-2025_18_48_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22042215, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22042216, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22042217, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22042218, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22042219, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22042220, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22042221, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22042222, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22042223, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22042224, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22042225, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22042226, 'pht': 3726}}" where mtr_portfolio_id = 22042194 and dashboard_run_id = 1723785 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`=22042194 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9859926, 0.06618043090690692, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22042194_15-04-2025_18_48_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22042215, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22042216, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22042217, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22042218, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22042219, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22042220, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22042221, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22042222, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22042223, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22042224, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22042225, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22042226, '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 = 22042817 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': 2722848, 'mtr_portfolio_id': 22042817, 'created_at': datetime.datetime(2025, 4, 15, 19, 2, 59), 'result': '0.06642539548332362', 'result_long': None, 'result_double': None}] Qualite : 0.06642539548332362 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22042817 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22042817_15-04-2025_19_03_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22042817 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_P22042817_15-04-2025_19_03_00.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22042818, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22042819, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22042820, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22042821, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22042822, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22042823, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22042824, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22042825, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22042826, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22042827, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22042828, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22042829, 'pht': 3726}}" where mtr_portfolio_id = 22042817 and dashboard_run_id = 1723785 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`=22042817 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9859927, 0.06642539548332362, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22042817_15-04-2025_19_03_00.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22042818, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22042819, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22042820, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22042821, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22042822, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22042823, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22042824, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22042825, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22042826, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22042827, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22042828, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22042829, '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 = 22043288 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': 2722921, 'mtr_portfolio_id': 22043288, 'created_at': datetime.datetime(2025, 4, 15, 19, 5), 'result': '0.05528112217317988', 'result_long': None, 'result_double': None}] Qualite : 0.05528112217317988 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22043288 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22043288_15-04-2025_19_05_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22043288 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_P22043288_15-04-2025_19_05_02.pdf'}" where mtr_portfolio_id = 22043288 and dashboard_run_id = 1723785 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`=22043288 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9859928, 0.05528112217317988, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22043288_15-04-2025_19_05_02.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22043297, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22043298, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22043299, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22043300, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22043301, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22043302, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22043303, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22043304, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22043305, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22043306, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22043307, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22043308, '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 (22041608,22042194,22042817,22043288) result : ((1349946294,), (1349946307,), (1349946694,), (1349946727,), (1349946754,), (1349947111,), (1349947138,), (1349947149,), (1349947172,), (1349947680,), (1349947683,), (1349947691,), (1349947717,), (1349947745,), (1349947996,), (1349948025,), (1349948056,), (1349948080,), (1349948113,), (1349948366,), (1349948369,), (1349948377,), (1349948388,), (1349948393,), (1349948407,), (1349948411,), (1349948414,), (1349948417,), (1349948421,), (1349948490,), (1349948495,), (1349948502,), (1349948506,), (1349948562,), (1349948577,), (1349948585,), (1349948589,), (1349948594,), (1349948599,), (1349948754,), (1349948758,), (1349948761,), (1349948766,), (1349948792,), (1349948801,), (1349948829,), (1349948839,), (1349948868,), (1349948877,), (1349949003,), (1349949010,), (1349949015,), (1349949017,), (1349949037,), (1349949122,), (1349949125,), (1349949129,), (1349949132,), (1349949135,), (1349949200,), (1349949216,), (1349949220,), (1349949270,), (1349949274,), (1349949278,), (1349949283,), (1349949620,), (1349949506,), (1349949531,), (1349949557,), (1349949585,), (1349949609,), (1349949723,), (1349949726,), (1349949730,), (1349949734,), (1349949891,), (1349949895,), (1349949899,), (1349949903,), (1349949907,), (1349950334,), (1349950335,), (1349950339,), (1349950340,), (1349950351,), (1349950354,), (1349950359,), (1349950361,), (1349950390,), (1349950392,), (1349950478,), (1349950481,), (1349950486,), (1349950492,), (1349950969,), (1349950975,), (1349950992,), (1349951001,), (1349951010,), (1349951061,), (1349951066,), (1349951069,), (1349951073,), (1349951226,), (1349951231,), (1349951250,), (1349951256,), (1349951264,), (1349951322,), (1349951327,), (1349951331,), (1349951337,), (1349951345,), (1349951402,), (1349951405,), (1349951410,), (1349951415,), (1349951419,), (1349951508,), (1349951512,), (1349951515,), (1349951531,), (1349951535,), (1349951550,), (1349951576,), (1349951580,), (1349951608,), (1349952158,), (1349952300,), (1349952301,), (1349952303,), (1349952305,), (1349952370,), (1349952376,), (1349952379,), (1349952904,), (1349953004,), (1349953013,), (1349953089,), (1349953111,), (1349953139,), (1349953311,), (1349953329,), (1349953338,), (1349953403,), (1349953407,), (1349953413,), (1349953527,), (1349953529,), (1349953533,), (1349953581,), (1349953588,), (1349953591,), (1349953603,), (1349953605,), (1349953612,), (1349953827,), (1349953831,), (1349953876,), (1349953881,), (1349953887,), (1349953891,), (1349953896,), (1349953899,), (1349953954,), (1349953957,), (1349953961,), (1349953962,), (1349953968,), (1349953972,), (1349953977,), (1349953979,), (1349953982,), (1349953984,), (1349953989,), (1349953990,), (1349954421,), (1349954473,), (1349954538,), (1349955965,), (1349955759,), (1349955829,), (1349955896,), (1349956684,), (1349956719,), (1349956754,), (1349956786,), (1349956821,), (1349956861,), (1349956869,), (1349956872,), (1349956875,), (1349956877,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'15042025': {'nb_upload': 13, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22043288]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1349956877, 1349956875, 1349956872, 1349956869, 1349956861, 1349956821, 1349956786, 1349956754, 1349956719, 1349956684, 1349955896, 1349955829, 1349955759] map_info['map_portfolio_photo'] : {22043288: [1349956877, 1349956875, 1349956872, 1349956869, 1349956861, 1349956821, 1349956786, 1349956754, 1349956719, 1349956684, 1349955896, 1349955829, 1349955759]} final : True mtd_id 4302 list_pids : [1349956877, 1349956875, 1349956872, 1349956869, 1349956861, 1349956821, 1349956786, 1349956754, 1349956719, 1349956684, 1349955896, 1349955829, 1349955759] Looping around the photos to save general results len do output : 1 /22043288Didn'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, '2722921') ('4302', '22043288', '1349956877', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956875', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956872', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956869', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956861', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956821', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956786', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956754', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956719', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349956684', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349955896', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349955829', None, None, None, None, None, '2722921') ('4302', None, None, None, None, None, None, None, '2722921') ('4302', '22043288', '1349955759', None, None, None, None, None, '2722921') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 14 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, '22043288', 'None', None, None, None, None, '2722921'), ('4302', '22043288', '1349956877', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349956875', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349956872', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349956869', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349956861', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349956821', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349956786', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349956754', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349956719', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349956684', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349955896', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349955829', None, None, None, None, None, '2722921'), ('4302', '22043288', '1349955759', None, None, None, None, None, '2722921')] time used for this insertion : 0.014232873916625977 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.3372957706451416 time spend to save output : 0.014465093612670898 total time spend for step 5 : 0.3517608642578125 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 (2722921) 2.51user 2.36system 0:08.62elapsed 56%CPU (0avgtext+0avgdata 160420maxresident)k 26696inputs+8544outputs (140major+73625minor)pagefaults 0swaps