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 : 22370825 get user id for portfolio 22370825 get sub ptf for main ptf 22370825, type 3726 and hashtags ['papier', 'flou', 'mal_croppe', 'cartonnette', 'environnement', 'plastique', 'Teint_Dans_La_Masse', 'Carton_brun', 'autre_refus', 'Carton_gris', 'metal', 'kraft'] 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`=22370825 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','flou','mal_croppe','cartonnette','environnement','plastique','Teint_Dans_La_Masse','Carton_brun','autre_refus','Carton_gris','metal','kraft')) 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`=22370825 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','flou','mal_croppe','cartonnette','environnement','plastique','Teint_Dans_La_Masse','Carton_brun','autre_refus','Carton_gris','metal','kraft')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__24042025_07_00_04_10138_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__24042025_07_00_04_10138_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__24042025_07_00_04_10138_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__24042025_07_00_04_10138_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__24042025_07_00_04_10138_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__24042025_07_00_04_10138_3726_plastique_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__24042025_07_00_04_10138_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__24042025_07_00_04_10138_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__24042025_07_00_04_10138_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__24042025_07_00_04_10138_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__24042025_07_00_04_10138_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__24042025_07_00_04_10138_3726_kraft_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)[[22370825, 22370868, 3726, 0.5, 492668766, 979], [22370825, 22370869, 3726, 0.5, 492777938, 979], [22370825, 22370871, 3726, 0.5, 2107755527, 979], [22370825, 22370872, 3726, 0.5, 702398920, 979], [22370825, 22370873, 3726, 0.5, 493012381, 979], [22370825, 22370874, 3726, 0.5, 492725882, 979], [22370825, 22370876, 3726, 0.5, 2107752385, 979], [22370825, 22370877, 3726, 0.5, 2107753024, 979], [22370825, 22370878, 3726, 0.5, 2107752406, 979], [22370825, 22370880, 3726, 0.5, 2107753020, 979], [22370825, 22370881, 3726, 0.5, 492628673, 979], [22370825, 22370882, 3726, 0.5, 493202403, 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`=22370825 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','flou','mal_croppe','cartonnette','environnement','plastique','Teint_Dans_La_Masse','Carton_brun','autre_refus','Carton_gris','metal','kraft')) 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`=22370825 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','flou','mal_croppe','cartonnette','environnement','plastique','Teint_Dans_La_Masse','Carton_brun','autre_refus','Carton_gris','metal','kraft')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 22370825, 'sub_port_id': 22370868, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14823768, 'last_updated_at': datetime.datetime(2025, 4, 24, 7, 5, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 24, 7, 5, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 24, 7, 5, 29)}, 'flou': {'main_port_id': 22370825, 'sub_port_id': 22370869, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14823769, 'last_updated_at': datetime.datetime(2025, 4, 24, 7, 5, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 24, 7, 5, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 24, 7, 5, 29)}, 'mal_croppe': {'main_port_id': 22370825, 'sub_port_id': 22370871, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14823770, 'last_updated_at': datetime.datetime(2025, 4, 24, 7, 5, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 24, 7, 5, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 24, 7, 5, 29)}, 'cartonnette': {'main_port_id': 22370825, 'sub_port_id': 22370872, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14823771, 'last_updated_at': datetime.datetime(2025, 4, 24, 7, 5, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 24, 7, 5, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 24, 7, 5, 29)}, 'environnement': {'main_port_id': 22370825, 'sub_port_id': 22370873, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14823772, 'last_updated_at': datetime.datetime(2025, 4, 24, 7, 5, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 24, 7, 5, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 24, 7, 5, 29)}, 'plastique': {'main_port_id': 22370825, 'sub_port_id': 22370874, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14823773, 'last_updated_at': datetime.datetime(2025, 4, 24, 7, 5, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 24, 7, 5, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 24, 7, 5, 29)}, 'Teint_Dans_La_Masse': {'main_port_id': 22370825, 'sub_port_id': 22370876, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14823774, 'last_updated_at': datetime.datetime(2025, 4, 24, 7, 5, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 24, 7, 5, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 24, 7, 5, 29)}, 'Carton_brun': {'main_port_id': 22370825, 'sub_port_id': 22370877, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14823775, 'last_updated_at': datetime.datetime(2025, 4, 24, 7, 5, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 24, 7, 5, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 24, 7, 5, 29)}, 'autre_refus': {'main_port_id': 22370825, 'sub_port_id': 22370878, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14823776, 'last_updated_at': datetime.datetime(2025, 4, 24, 7, 5, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 24, 7, 5, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 24, 7, 5, 29)}, 'Carton_gris': {'main_port_id': 22370825, 'sub_port_id': 22370880, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14823777, 'last_updated_at': datetime.datetime(2025, 4, 24, 7, 5, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 24, 7, 5, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 24, 7, 5, 29)}, 'metal': {'main_port_id': 22370825, 'sub_port_id': 22370881, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14823778, 'last_updated_at': datetime.datetime(2025, 4, 24, 7, 5, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 24, 7, 5, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 24, 7, 5, 29)}, 'kraft': {'main_port_id': 22370825, 'sub_port_id': 22370882, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14823779, 'last_updated_at': datetime.datetime(2025, 4, 24, 7, 5, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 24, 7, 5, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 24, 7, 5, 29)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22370868 , 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=22370825 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 (22370868) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22370825) result : ((1353283712,), (1353283745,), (1353283805,), (1353283852,), (1353283889,), (1353284166,), (1353284197,), (1353284233,), (1353284258,), (1353284311,), (1353284603,), (1353284628,), (1353284658,), (1353284673,), (1353284680,)) 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 22370869 , 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=22370825 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 (22370869) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22370825) result : ((1353283712,), (1353283745,), (1353283805,), (1353283852,), (1353283889,), (1353284166,), (1353284197,), (1353284233,), (1353284258,), (1353284311,), (1353284603,), (1353284628,), (1353284658,), (1353284673,), (1353284680,)) 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 22370871 , 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=22370825 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 (22370871) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22370825) result : ((1353283712,), (1353283745,), (1353283805,), (1353283852,), (1353283889,), (1353284166,), (1353284197,), (1353284233,), (1353284258,), (1353284311,), (1353284603,), (1353284628,), (1353284658,), (1353284673,), (1353284680,)) 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 22370872 , 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=22370825 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 (22370872) result : ((1353285081,), (1353285083,), (1353285085,), (1353285087,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22370825) result : ((1353283712,), (1353283745,), (1353283805,), (1353283852,), (1353283889,), (1353284166,), (1353284197,), (1353284233,), (1353284258,), (1353284311,), (1353284603,), (1353284628,), (1353284658,), (1353284673,), (1353284680,)) 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 22370873 , 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=22370825 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 (22370873) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22370825) result : ((1353283712,), (1353283745,), (1353283805,), (1353283852,), (1353283889,), (1353284166,), (1353284197,), (1353284233,), (1353284258,), (1353284311,), (1353284603,), (1353284628,), (1353284658,), (1353284673,), (1353284680,)) 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 22370874 , 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=22370825 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 (22370874) result : ((1353285092,), (1353285093,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22370825) result : ((1353283712,), (1353283745,), (1353283805,), (1353283852,), (1353283889,), (1353284166,), (1353284197,), (1353284233,), (1353284258,), (1353284311,), (1353284603,), (1353284628,), (1353284658,), (1353284673,), (1353284680,)) 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 22370876 , 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=22370825 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 (22370876) result : ((1353285044,), (1353285046,), (1353285048,), (1353285050,), (1353285052,), (1353285054,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22370825) result : ((1353283712,), (1353283745,), (1353283805,), (1353283852,), (1353283889,), (1353284166,), (1353284197,), (1353284233,), (1353284258,), (1353284311,), (1353284603,), (1353284628,), (1353284658,), (1353284673,), (1353284680,)) 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 22370877 , 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=22370825 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 (22370877) result : ((1353285088,), (1353285090,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22370825) result : ((1353283712,), (1353283745,), (1353283805,), (1353283852,), (1353283889,), (1353284166,), (1353284197,), (1353284233,), (1353284258,), (1353284311,), (1353284603,), (1353284628,), (1353284658,), (1353284673,), (1353284680,)) 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 22370878 , 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=22370825 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 (22370878) result : ((1353285062,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22370825) result : ((1353283712,), (1353283745,), (1353283805,), (1353283852,), (1353283889,), (1353284166,), (1353284197,), (1353284233,), (1353284258,), (1353284311,), (1353284603,), (1353284628,), (1353284658,), (1353284673,), (1353284680,)) 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 22370880 , 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=22370825 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 (22370880) result : ((1353285071,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22370825) result : ((1353283712,), (1353283745,), (1353283805,), (1353283852,), (1353283889,), (1353284166,), (1353284197,), (1353284233,), (1353284258,), (1353284311,), (1353284603,), (1353284628,), (1353284658,), (1353284673,), (1353284680,)) 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 22370881 , 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=22370825 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 (22370881) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22370825) result : ((1353283712,), (1353283745,), (1353283805,), (1353283852,), (1353283889,), (1353284166,), (1353284197,), (1353284233,), (1353284258,), (1353284311,), (1353284603,), (1353284628,), (1353284658,), (1353284673,), (1353284680,)) 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 22370882 , 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=22370825 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 (22370882) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22370825) result : ((1353283712,), (1353283745,), (1353283805,), (1353283852,), (1353283889,), (1353284166,), (1353284197,), (1353284233,), (1353284258,), (1353284311,), (1353284603,), (1353284628,), (1353284658,), (1353284673,), (1353284680,)) 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`=22370825 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','flou','mal_croppe','cartonnette','environnement','plastique','Teint_Dans_La_Masse','Carton_brun','autre_refus','Carton_gris','metal','kraft')) 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`=22370825 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','flou','mal_croppe','cartonnette','environnement','plastique','Teint_Dans_La_Masse','Carton_brun','autre_refus','Carton_gris','metal','kraft')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__24042025_07_00_04_10138_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__24042025_07_00_04_10138_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__24042025_07_00_04_10138_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__24042025_07_00_04_10138_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__24042025_07_00_04_10138_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__24042025_07_00_04_10138_4417_plastique_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__24042025_07_00_04_10138_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__24042025_07_00_04_10138_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__24042025_07_00_04_10138_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__24042025_07_00_04_10138_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__24042025_07_00_04_10138_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__24042025_07_00_04_10138_4417_kraft_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)[[22370825, 22370891, 4417, 0.5, 492668766, 979], [22370825, 22370892, 4417, 0.5, 492777938, 979], [22370825, 22370893, 4417, 0.5, 2107755527, 979], [22370825, 22370894, 4417, 0.5, 702398920, 979], [22370825, 22370895, 4417, 0.5, 493012381, 979], [22370825, 22370896, 4417, 0.5, 492725882, 979], [22370825, 22370897, 4417, 0.5, 2107752385, 979], [22370825, 22370898, 4417, 0.5, 2107753024, 979], [22370825, 22370899, 4417, 0.5, 2107752406, 979], [22370825, 22370900, 4417, 0.5, 2107753020, 979], [22370825, 22370901, 4417, 0.5, 492628673, 979], [22370825, 22370902, 4417, 0.5, 493202403, 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`=22370825 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','flou','mal_croppe','cartonnette','environnement','plastique','Teint_Dans_La_Masse','Carton_brun','autre_refus','Carton_gris','metal','kraft')) 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`=22370825 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','flou','mal_croppe','cartonnette','environnement','plastique','Teint_Dans_La_Masse','Carton_brun','autre_refus','Carton_gris','metal','kraft')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 22370825, 'sub_port_id': 22370891, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14823792, 'last_updated_at': datetime.datetime(2025, 4, 24, 7, 5, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 24, 7, 5, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 24, 7, 5, 31)}, 'flou': {'main_port_id': 22370825, 'sub_port_id': 22370892, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14823793, 'last_updated_at': datetime.datetime(2025, 4, 24, 7, 5, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 24, 7, 5, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 24, 7, 5, 31)}, 'mal_croppe': {'main_port_id': 22370825, 'sub_port_id': 22370893, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14823794, 'last_updated_at': datetime.datetime(2025, 4, 24, 7, 5, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 24, 7, 5, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 24, 7, 5, 31)}, 'cartonnette': {'main_port_id': 22370825, 'sub_port_id': 22370894, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14823795, 'last_updated_at': datetime.datetime(2025, 4, 24, 7, 5, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 24, 7, 5, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 24, 7, 5, 31)}, 'environnement': {'main_port_id': 22370825, 'sub_port_id': 22370895, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14823796, 'last_updated_at': datetime.datetime(2025, 4, 24, 7, 5, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 24, 7, 5, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 24, 7, 5, 31)}, 'plastique': {'main_port_id': 22370825, 'sub_port_id': 22370896, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14823797, 'last_updated_at': datetime.datetime(2025, 4, 24, 7, 5, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 24, 7, 5, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 24, 7, 5, 31)}, 'Teint_Dans_La_Masse': {'main_port_id': 22370825, 'sub_port_id': 22370897, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14823798, 'last_updated_at': datetime.datetime(2025, 4, 24, 7, 5, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 24, 7, 5, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 24, 7, 5, 31)}, 'Carton_brun': {'main_port_id': 22370825, 'sub_port_id': 22370898, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14823799, 'last_updated_at': datetime.datetime(2025, 4, 24, 7, 5, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 24, 7, 5, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 24, 7, 5, 31)}, 'autre_refus': {'main_port_id': 22370825, 'sub_port_id': 22370899, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14823800, 'last_updated_at': datetime.datetime(2025, 4, 24, 7, 5, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 24, 7, 5, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 24, 7, 5, 31)}, 'Carton_gris': {'main_port_id': 22370825, 'sub_port_id': 22370900, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14823801, 'last_updated_at': datetime.datetime(2025, 4, 24, 7, 5, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 24, 7, 5, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 24, 7, 5, 31)}, 'metal': {'main_port_id': 22370825, 'sub_port_id': 22370901, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14823802, 'last_updated_at': datetime.datetime(2025, 4, 24, 7, 5, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 24, 7, 5, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 24, 7, 5, 31)}, 'kraft': {'main_port_id': 22370825, 'sub_port_id': 22370902, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14823803, 'last_updated_at': datetime.datetime(2025, 4, 24, 7, 5, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 24, 7, 5, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 24, 7, 5, 31)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22370891,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22370868 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22370892,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22370869 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22370893,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22370871 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22370894,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22370872 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22370895,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22370873 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22370896,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22370874 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22370897,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22370876 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22370898,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22370877 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22370899,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22370878 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22370900,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22370880 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22370901,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22370881 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22370902,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22370882 lien utilise dans velours : https://www.fotonower.com/velours/22370891,22370892,22370893,22370894,22370895,22370896,22370897,22370898,22370899,22370900,22370901,22370902?tags=papier,flou,mal_croppe,cartonnette,environnement,plastique,Teint_Dans_La_Masse,Carton_brun,autre_refus,Carton_gris,metal,kraft After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22370825]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1353284680, 1353284673, 1353284658, 1353284628, 1353284603, 1353284311, 1353284258, 1353284233, 1353284197, 1353284166, 1353283889, 1353283852, 1353283805, 1353283745, 1353283712] map_info['map_portfolio_photo'] : {22370825: [1353284680, 1353284673, 1353284658, 1353284628, 1353284603, 1353284311, 1353284258, 1353284233, 1353284197, 1353284166, 1353283889, 1353283852, 1353283805, 1353283745, 1353283712]} final : False mtd_id 4302 list_pids : [1353284680, 1353284673, 1353284658, 1353284628, 1353284603, 1353284311, 1353284258, 1353284233, 1353284197, 1353284166, 1353283889, 1353283852, 1353283805, 1353283745, 1353283712] Looping around the photos to save general results len do output : 1 /22370825. 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, '2755937') ('4302', '22370825', '1353284680', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284673', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284658', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284628', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284603', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284311', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284258', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284233', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284197', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284166', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353283889', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353283852', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353283805', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353283745', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353283712', None, None, None, None, None, '2755937') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 16 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, '22370825', "{'papier': 22370868, 'flou': 22370869, 'mal_croppe': 22370871, 'cartonnette': 22370872, 'environnement': 22370873, 'plastique': 22370874, 'Teint_Dans_La_Masse': 22370876, 'Carton_brun': 22370877, 'autre_refus': 22370878, 'Carton_gris': 22370880, 'metal': 22370881, 'kraft': 22370882}", None, None, None, None, '2755937'), ('4302', '22370825', '1353284680', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353284673', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353284658', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353284628', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353284603', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353284311', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353284258', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353284233', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353284197', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353284166', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353283889', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353283852', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353283805', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353283745', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353283712', None, None, None, None, None, '2755937')] time used for this insertion : 0.017073392868041992 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.120159387588501 time spend to save output : 0.01741623878479004 total time spend for step 1 : 2.137575626373291 step2:final Thu Apr 24 07:05:31 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 (22370825) 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 22370825 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1353283889,1353283852,1353283805,1353283745,1353283712,1353284311,1353284258,1353284233,1353284197,1353284166,1353284680,1353284673,1353284658,1353284628,1353284603); 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([22370825]) Inside saveOutput : final : False verbose : True original output for save of step final : {1353284680: ('0.05030710064987305',), 1353284673: ('0.05030710064987305',), 1353284658: ('0.05030710064987305',), 1353284628: ('0.05030710064987305',), 1353284603: ('0.05030710064987305',), 1353284311: ('0.05030710064987305',), 1353284258: ('0.05030710064987305',), 1353284233: ('0.05030710064987305',), 1353284197: ('0.05030710064987305',), 1353284166: ('0.05030710064987305',), 1353283889: ('0.05030710064987305',), 1353283852: ('0.05030710064987305',), 1353283805: ('0.05030710064987305',), 1353283745: ('0.05030710064987305',), 1353283712: ('0.05030710064987305',)} new output for save of step final : {1353284680: ('0.05030710064987305',), 1353284673: ('0.05030710064987305',), 1353284658: ('0.05030710064987305',), 1353284628: ('0.05030710064987305',), 1353284603: ('0.05030710064987305',), 1353284311: ('0.05030710064987305',), 1353284258: ('0.05030710064987305',), 1353284233: ('0.05030710064987305',), 1353284197: ('0.05030710064987305',), 1353284166: ('0.05030710064987305',), 1353283889: ('0.05030710064987305',), 1353283852: ('0.05030710064987305',), 1353283805: ('0.05030710064987305',), 1353283745: ('0.05030710064987305',), 1353283712: ('0.05030710064987305',)} [1353284680, 1353284673, 1353284658, 1353284628, 1353284603, 1353284311, 1353284258, 1353284233, 1353284197, 1353284166, 1353283889, 1353283852, 1353283805, 1353283745, 1353283712] map_info['map_portfolio_photo'] : {22370825: [1353284680, 1353284673, 1353284658, 1353284628, 1353284603, 1353284311, 1353284258, 1353284233, 1353284197, 1353284166, 1353283889, 1353283852, 1353283805, 1353283745, 1353283712]} final : False mtd_id 4302 list_pids : [1353284680, 1353284673, 1353284658, 1353284628, 1353284603, 1353284311, 1353284258, 1353284233, 1353284197, 1353284166, 1353283889, 1353283852, 1353283805, 1353283745, 1353283712] Looping around the photos to save general results len do output : 15 /1353284680.Didn't retrieve data . /1353284673.Didn't retrieve data . /1353284658.Didn't retrieve data . /1353284628.Didn't retrieve data . /1353284603.Didn't retrieve data . /1353284311.Didn't retrieve data . /1353284258.Didn't retrieve data . /1353284233.Didn't retrieve data . /1353284197.Didn't retrieve data . /1353284166.Didn't retrieve data . /1353283889.Didn't retrieve data . /1353283852.Didn't retrieve data . /1353283805.Didn't retrieve data . /1353283745.Didn't retrieve data . /1353283712.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, '2755937') ('4302', '22370825', '1353284680', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284673', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284658', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284628', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284603', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284311', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284258', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284233', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284197', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284166', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353283889', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353283852', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353283805', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353283745', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353283712', None, None, None, None, None, '2755937') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 45 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', '22370825', '1353284680', '0.05030710064987305', None, None, None, None, '2755937'), ('4302', '22370825', '1353284673', '0.05030710064987305', None, None, None, None, '2755937'), ('4302', '22370825', '1353284658', '0.05030710064987305', None, None, None, None, '2755937'), ('4302', '22370825', '1353284628', '0.05030710064987305', None, None, None, None, '2755937'), ('4302', '22370825', '1353284603', '0.05030710064987305', None, None, None, None, '2755937'), ('4302', '22370825', '1353284311', '0.05030710064987305', None, None, None, None, '2755937'), ('4302', '22370825', '1353284258', '0.05030710064987305', None, None, None, None, '2755937'), ('4302', '22370825', '1353284233', '0.05030710064987305', None, None, None, None, '2755937'), ('4302', '22370825', '1353284197', '0.05030710064987305', None, None, None, None, '2755937'), ('4302', '22370825', '1353284166', '0.05030710064987305', None, None, None, None, '2755937'), ('4302', '22370825', '1353283889', '0.05030710064987305', None, None, None, None, '2755937'), ('4302', '22370825', '1353283852', '0.05030710064987305', None, None, None, None, '2755937'), ('4302', '22370825', '1353283805', '0.05030710064987305', None, None, None, None, '2755937'), ('4302', '22370825', '1353283745', '0.05030710064987305', None, None, None, None, '2755937'), ('4302', '22370825', '1353283712', '0.05030710064987305', None, None, None, None, '2755937')] time used for this insertion : 0.016994953155517578 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.030269384384155273 time spend to save output : 0.017750263214111328 total time spend for step 2 : 0.0480196475982666 step3:velours_tree Thu Apr 24 07:05:31 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 : {22370825: [{'papier': 22370868, 'flou': 22370869, 'mal_croppe': 22370871, 'cartonnette': 22370872, 'environnement': 22370873, 'plastique': 22370874, 'Teint_Dans_La_Masse': 22370876, 'Carton_brun': 22370877, 'autre_refus': 22370878, 'Carton_gris': 22370880, 'metal': 22370881, 'kraft': 22370882}]} input_args_next_step : {22370825: ()} output_args : {22370825: [{'papier': 22370868, 'flou': 22370869, 'mal_croppe': 22370871, 'cartonnette': 22370872, 'environnement': 22370873, 'plastique': 22370874, 'Teint_Dans_La_Masse': 22370876, 'Carton_brun': 22370877, 'autre_refus': 22370878, 'Carton_gris': 22370880, 'metal': 22370881, 'kraft': 22370882}]} args : 22370825 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 : ({'papier': 22370868, 'flou': 22370869, 'mal_croppe': 22370871, 'cartonnette': 22370872, 'environnement': 22370873, 'plastique': 22370874, 'Teint_Dans_La_Masse': 22370876, 'Carton_brun': 22370877, 'autre_refus': 22370878, 'Carton_gris': 22370880, 'metal': 22370881, 'kraft': 22370882},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22370825) 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([22370825]) 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.30013227462768555 time spend to save output : 4.9591064453125e-05 total time spend for step 3 : 0.30018186569213867 step4:send_mail_cod Thu Apr 24 07:05:31 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 : {1353284680: ('0.05030710064987305',), 1353284673: ('0.05030710064987305',), 1353284658: ('0.05030710064987305',), 1353284628: ('0.05030710064987305',), 1353284603: ('0.05030710064987305',), 1353284311: ('0.05030710064987305',), 1353284258: ('0.05030710064987305',), 1353284233: ('0.05030710064987305',), 1353284197: ('0.05030710064987305',), 1353284166: ('0.05030710064987305',), 1353283889: ('0.05030710064987305',), 1353283852: ('0.05030710064987305',), 1353283805: ('0.05030710064987305',), 1353283745: ('0.05030710064987305',), 1353283712: ('0.05030710064987305',)} input_args_next_step : {1353284680: ()} output_args : {1353284680: ('0.05030710064987305',), 1353284673: ('0.05030710064987305',), 1353284658: ('0.05030710064987305',), 1353284628: ('0.05030710064987305',), 1353284603: ('0.05030710064987305',), 1353284311: ('0.05030710064987305',), 1353284258: ('0.05030710064987305',), 1353284233: ('0.05030710064987305',), 1353284197: ('0.05030710064987305',), 1353284166: ('0.05030710064987305',), 1353283889: ('0.05030710064987305',), 1353283852: ('0.05030710064987305',), 1353283805: ('0.05030710064987305',), 1353283745: ('0.05030710064987305',), 1353283712: ('0.05030710064987305',)} args : 1353284680 depend.output_id : 0 input_args_next_step : {1353284680: ('0.05030710064987305',), 1353284673: ()} output_args : {1353284680: ('0.05030710064987305',), 1353284673: ('0.05030710064987305',), 1353284658: ('0.05030710064987305',), 1353284628: ('0.05030710064987305',), 1353284603: ('0.05030710064987305',), 1353284311: ('0.05030710064987305',), 1353284258: ('0.05030710064987305',), 1353284233: ('0.05030710064987305',), 1353284197: ('0.05030710064987305',), 1353284166: ('0.05030710064987305',), 1353283889: ('0.05030710064987305',), 1353283852: ('0.05030710064987305',), 1353283805: ('0.05030710064987305',), 1353283745: ('0.05030710064987305',), 1353283712: ('0.05030710064987305',)} args : 1353284673 depend.output_id : 0 input_args_next_step : {1353284680: ('0.05030710064987305',), 1353284673: ('0.05030710064987305',), 1353284658: ()} output_args : {1353284680: ('0.05030710064987305',), 1353284673: ('0.05030710064987305',), 1353284658: ('0.05030710064987305',), 1353284628: ('0.05030710064987305',), 1353284603: ('0.05030710064987305',), 1353284311: ('0.05030710064987305',), 1353284258: ('0.05030710064987305',), 1353284233: ('0.05030710064987305',), 1353284197: ('0.05030710064987305',), 1353284166: ('0.05030710064987305',), 1353283889: ('0.05030710064987305',), 1353283852: ('0.05030710064987305',), 1353283805: ('0.05030710064987305',), 1353283745: ('0.05030710064987305',), 1353283712: ('0.05030710064987305',)} args : 1353284658 depend.output_id : 0 input_args_next_step : {1353284680: ('0.05030710064987305',), 1353284673: ('0.05030710064987305',), 1353284658: ('0.05030710064987305',), 1353284628: ()} output_args : {1353284680: ('0.05030710064987305',), 1353284673: ('0.05030710064987305',), 1353284658: ('0.05030710064987305',), 1353284628: ('0.05030710064987305',), 1353284603: ('0.05030710064987305',), 1353284311: ('0.05030710064987305',), 1353284258: ('0.05030710064987305',), 1353284233: ('0.05030710064987305',), 1353284197: ('0.05030710064987305',), 1353284166: ('0.05030710064987305',), 1353283889: ('0.05030710064987305',), 1353283852: ('0.05030710064987305',), 1353283805: ('0.05030710064987305',), 1353283745: ('0.05030710064987305',), 1353283712: ('0.05030710064987305',)} args : 1353284628 depend.output_id : 0 input_args_next_step : {1353284680: ('0.05030710064987305',), 1353284673: ('0.05030710064987305',), 1353284658: ('0.05030710064987305',), 1353284628: ('0.05030710064987305',), 1353284603: ()} output_args : {1353284680: ('0.05030710064987305',), 1353284673: ('0.05030710064987305',), 1353284658: ('0.05030710064987305',), 1353284628: ('0.05030710064987305',), 1353284603: ('0.05030710064987305',), 1353284311: ('0.05030710064987305',), 1353284258: ('0.05030710064987305',), 1353284233: ('0.05030710064987305',), 1353284197: ('0.05030710064987305',), 1353284166: ('0.05030710064987305',), 1353283889: ('0.05030710064987305',), 1353283852: ('0.05030710064987305',), 1353283805: ('0.05030710064987305',), 1353283745: ('0.05030710064987305',), 1353283712: ('0.05030710064987305',)} args : 1353284603 depend.output_id : 0 input_args_next_step : {1353284680: ('0.05030710064987305',), 1353284673: ('0.05030710064987305',), 1353284658: ('0.05030710064987305',), 1353284628: ('0.05030710064987305',), 1353284603: ('0.05030710064987305',), 1353284311: ()} output_args : {1353284680: ('0.05030710064987305',), 1353284673: ('0.05030710064987305',), 1353284658: ('0.05030710064987305',), 1353284628: ('0.05030710064987305',), 1353284603: ('0.05030710064987305',), 1353284311: ('0.05030710064987305',), 1353284258: ('0.05030710064987305',), 1353284233: ('0.05030710064987305',), 1353284197: ('0.05030710064987305',), 1353284166: ('0.05030710064987305',), 1353283889: ('0.05030710064987305',), 1353283852: ('0.05030710064987305',), 1353283805: ('0.05030710064987305',), 1353283745: ('0.05030710064987305',), 1353283712: ('0.05030710064987305',)} args : 1353284311 depend.output_id : 0 input_args_next_step : {1353284680: ('0.05030710064987305',), 1353284673: ('0.05030710064987305',), 1353284658: ('0.05030710064987305',), 1353284628: ('0.05030710064987305',), 1353284603: ('0.05030710064987305',), 1353284311: ('0.05030710064987305',), 1353284258: ()} output_args : {1353284680: ('0.05030710064987305',), 1353284673: ('0.05030710064987305',), 1353284658: ('0.05030710064987305',), 1353284628: ('0.05030710064987305',), 1353284603: ('0.05030710064987305',), 1353284311: ('0.05030710064987305',), 1353284258: ('0.05030710064987305',), 1353284233: ('0.05030710064987305',), 1353284197: ('0.05030710064987305',), 1353284166: ('0.05030710064987305',), 1353283889: ('0.05030710064987305',), 1353283852: ('0.05030710064987305',), 1353283805: ('0.05030710064987305',), 1353283745: ('0.05030710064987305',), 1353283712: ('0.05030710064987305',)} args : 1353284258 depend.output_id : 0 input_args_next_step : {1353284680: ('0.05030710064987305',), 1353284673: ('0.05030710064987305',), 1353284658: ('0.05030710064987305',), 1353284628: ('0.05030710064987305',), 1353284603: ('0.05030710064987305',), 1353284311: ('0.05030710064987305',), 1353284258: ('0.05030710064987305',), 1353284233: ()} output_args : {1353284680: ('0.05030710064987305',), 1353284673: ('0.05030710064987305',), 1353284658: ('0.05030710064987305',), 1353284628: ('0.05030710064987305',), 1353284603: ('0.05030710064987305',), 1353284311: ('0.05030710064987305',), 1353284258: ('0.05030710064987305',), 1353284233: ('0.05030710064987305',), 1353284197: ('0.05030710064987305',), 1353284166: ('0.05030710064987305',), 1353283889: ('0.05030710064987305',), 1353283852: ('0.05030710064987305',), 1353283805: ('0.05030710064987305',), 1353283745: ('0.05030710064987305',), 1353283712: ('0.05030710064987305',)} args : 1353284233 depend.output_id : 0 input_args_next_step : {1353284680: ('0.05030710064987305',), 1353284673: ('0.05030710064987305',), 1353284658: ('0.05030710064987305',), 1353284628: ('0.05030710064987305',), 1353284603: ('0.05030710064987305',), 1353284311: ('0.05030710064987305',), 1353284258: ('0.05030710064987305',), 1353284233: ('0.05030710064987305',), 1353284197: ()} output_args : {1353284680: ('0.05030710064987305',), 1353284673: ('0.05030710064987305',), 1353284658: ('0.05030710064987305',), 1353284628: ('0.05030710064987305',), 1353284603: ('0.05030710064987305',), 1353284311: ('0.05030710064987305',), 1353284258: ('0.05030710064987305',), 1353284233: ('0.05030710064987305',), 1353284197: ('0.05030710064987305',), 1353284166: ('0.05030710064987305',), 1353283889: ('0.05030710064987305',), 1353283852: ('0.05030710064987305',), 1353283805: ('0.05030710064987305',), 1353283745: ('0.05030710064987305',), 1353283712: ('0.05030710064987305',)} args : 1353284197 depend.output_id : 0 input_args_next_step : {1353284680: ('0.05030710064987305',), 1353284673: ('0.05030710064987305',), 1353284658: ('0.05030710064987305',), 1353284628: ('0.05030710064987305',), 1353284603: ('0.05030710064987305',), 1353284311: ('0.05030710064987305',), 1353284258: ('0.05030710064987305',), 1353284233: ('0.05030710064987305',), 1353284197: ('0.05030710064987305',), 1353284166: ()} output_args : {1353284680: ('0.05030710064987305',), 1353284673: ('0.05030710064987305',), 1353284658: ('0.05030710064987305',), 1353284628: ('0.05030710064987305',), 1353284603: ('0.05030710064987305',), 1353284311: ('0.05030710064987305',), 1353284258: ('0.05030710064987305',), 1353284233: ('0.05030710064987305',), 1353284197: ('0.05030710064987305',), 1353284166: ('0.05030710064987305',), 1353283889: ('0.05030710064987305',), 1353283852: ('0.05030710064987305',), 1353283805: ('0.05030710064987305',), 1353283745: ('0.05030710064987305',), 1353283712: ('0.05030710064987305',)} args : 1353284166 depend.output_id : 0 input_args_next_step : {1353284680: ('0.05030710064987305',), 1353284673: ('0.05030710064987305',), 1353284658: ('0.05030710064987305',), 1353284628: ('0.05030710064987305',), 1353284603: ('0.05030710064987305',), 1353284311: ('0.05030710064987305',), 1353284258: ('0.05030710064987305',), 1353284233: ('0.05030710064987305',), 1353284197: ('0.05030710064987305',), 1353284166: ('0.05030710064987305',), 1353283889: ()} output_args : {1353284680: ('0.05030710064987305',), 1353284673: ('0.05030710064987305',), 1353284658: ('0.05030710064987305',), 1353284628: ('0.05030710064987305',), 1353284603: ('0.05030710064987305',), 1353284311: ('0.05030710064987305',), 1353284258: ('0.05030710064987305',), 1353284233: ('0.05030710064987305',), 1353284197: ('0.05030710064987305',), 1353284166: ('0.05030710064987305',), 1353283889: ('0.05030710064987305',), 1353283852: ('0.05030710064987305',), 1353283805: ('0.05030710064987305',), 1353283745: ('0.05030710064987305',), 1353283712: ('0.05030710064987305',)} args : 1353283889 depend.output_id : 0 input_args_next_step : {1353284680: ('0.05030710064987305',), 1353284673: ('0.05030710064987305',), 1353284658: ('0.05030710064987305',), 1353284628: ('0.05030710064987305',), 1353284603: ('0.05030710064987305',), 1353284311: ('0.05030710064987305',), 1353284258: ('0.05030710064987305',), 1353284233: ('0.05030710064987305',), 1353284197: ('0.05030710064987305',), 1353284166: ('0.05030710064987305',), 1353283889: ('0.05030710064987305',), 1353283852: ()} output_args : {1353284680: ('0.05030710064987305',), 1353284673: ('0.05030710064987305',), 1353284658: ('0.05030710064987305',), 1353284628: ('0.05030710064987305',), 1353284603: ('0.05030710064987305',), 1353284311: ('0.05030710064987305',), 1353284258: ('0.05030710064987305',), 1353284233: ('0.05030710064987305',), 1353284197: ('0.05030710064987305',), 1353284166: ('0.05030710064987305',), 1353283889: ('0.05030710064987305',), 1353283852: ('0.05030710064987305',), 1353283805: ('0.05030710064987305',), 1353283745: ('0.05030710064987305',), 1353283712: ('0.05030710064987305',)} args : 1353283852 depend.output_id : 0 input_args_next_step : {1353284680: ('0.05030710064987305',), 1353284673: ('0.05030710064987305',), 1353284658: ('0.05030710064987305',), 1353284628: ('0.05030710064987305',), 1353284603: ('0.05030710064987305',), 1353284311: ('0.05030710064987305',), 1353284258: ('0.05030710064987305',), 1353284233: ('0.05030710064987305',), 1353284197: ('0.05030710064987305',), 1353284166: ('0.05030710064987305',), 1353283889: ('0.05030710064987305',), 1353283852: ('0.05030710064987305',), 1353283805: ()} output_args : {1353284680: ('0.05030710064987305',), 1353284673: ('0.05030710064987305',), 1353284658: ('0.05030710064987305',), 1353284628: ('0.05030710064987305',), 1353284603: ('0.05030710064987305',), 1353284311: ('0.05030710064987305',), 1353284258: ('0.05030710064987305',), 1353284233: ('0.05030710064987305',), 1353284197: ('0.05030710064987305',), 1353284166: ('0.05030710064987305',), 1353283889: ('0.05030710064987305',), 1353283852: ('0.05030710064987305',), 1353283805: ('0.05030710064987305',), 1353283745: ('0.05030710064987305',), 1353283712: ('0.05030710064987305',)} args : 1353283805 depend.output_id : 0 input_args_next_step : {1353284680: ('0.05030710064987305',), 1353284673: ('0.05030710064987305',), 1353284658: ('0.05030710064987305',), 1353284628: ('0.05030710064987305',), 1353284603: ('0.05030710064987305',), 1353284311: ('0.05030710064987305',), 1353284258: ('0.05030710064987305',), 1353284233: ('0.05030710064987305',), 1353284197: ('0.05030710064987305',), 1353284166: ('0.05030710064987305',), 1353283889: ('0.05030710064987305',), 1353283852: ('0.05030710064987305',), 1353283805: ('0.05030710064987305',), 1353283745: ()} output_args : {1353284680: ('0.05030710064987305',), 1353284673: ('0.05030710064987305',), 1353284658: ('0.05030710064987305',), 1353284628: ('0.05030710064987305',), 1353284603: ('0.05030710064987305',), 1353284311: ('0.05030710064987305',), 1353284258: ('0.05030710064987305',), 1353284233: ('0.05030710064987305',), 1353284197: ('0.05030710064987305',), 1353284166: ('0.05030710064987305',), 1353283889: ('0.05030710064987305',), 1353283852: ('0.05030710064987305',), 1353283805: ('0.05030710064987305',), 1353283745: ('0.05030710064987305',), 1353283712: ('0.05030710064987305',)} args : 1353283745 depend.output_id : 0 input_args_next_step : {1353284680: ('0.05030710064987305',), 1353284673: ('0.05030710064987305',), 1353284658: ('0.05030710064987305',), 1353284628: ('0.05030710064987305',), 1353284603: ('0.05030710064987305',), 1353284311: ('0.05030710064987305',), 1353284258: ('0.05030710064987305',), 1353284233: ('0.05030710064987305',), 1353284197: ('0.05030710064987305',), 1353284166: ('0.05030710064987305',), 1353283889: ('0.05030710064987305',), 1353283852: ('0.05030710064987305',), 1353283805: ('0.05030710064987305',), 1353283745: ('0.05030710064987305',), 1353283712: ()} output_args : {1353284680: ('0.05030710064987305',), 1353284673: ('0.05030710064987305',), 1353284658: ('0.05030710064987305',), 1353284628: ('0.05030710064987305',), 1353284603: ('0.05030710064987305',), 1353284311: ('0.05030710064987305',), 1353284258: ('0.05030710064987305',), 1353284233: ('0.05030710064987305',), 1353284197: ('0.05030710064987305',), 1353284166: ('0.05030710064987305',), 1353283889: ('0.05030710064987305',), 1353283852: ('0.05030710064987305',), 1353283805: ('0.05030710064987305',), 1353283745: ('0.05030710064987305',), 1353283712: ('0.05030710064987305',)} args : 1353283712 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 : {22370825: [{'papier': 22370868, 'flou': 22370869, 'mal_croppe': 22370871, 'cartonnette': 22370872, 'environnement': 22370873, 'plastique': 22370874, 'Teint_Dans_La_Masse': 22370876, 'Carton_brun': 22370877, 'autre_refus': 22370878, 'Carton_gris': 22370880, 'metal': 22370881, 'kraft': 22370882}]} input_args_next_step : {1353284680: ('0.05030710064987305',), 1353284673: ('0.05030710064987305',), 1353284658: ('0.05030710064987305',), 1353284628: ('0.05030710064987305',), 1353284603: ('0.05030710064987305',), 1353284311: ('0.05030710064987305',), 1353284258: ('0.05030710064987305',), 1353284233: ('0.05030710064987305',), 1353284197: ('0.05030710064987305',), 1353284166: ('0.05030710064987305',), 1353283889: ('0.05030710064987305',), 1353283852: ('0.05030710064987305',), 1353283805: ('0.05030710064987305',), 1353283745: ('0.05030710064987305',), 1353283712: ('0.05030710064987305',), 22370825: ()} output_args : {22370825: [{'papier': 22370868, 'flou': 22370869, 'mal_croppe': 22370871, 'cartonnette': 22370872, 'environnement': 22370873, 'plastique': 22370874, 'Teint_Dans_La_Masse': 22370876, 'Carton_brun': 22370877, 'autre_refus': 22370878, 'Carton_gris': 22370880, 'metal': 22370881, 'kraft': 22370882}]} args : 22370825 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 :16, first value : ('0.05030710064987305',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22370825) 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 (1353284680,1353284673,1353284658,1353284628,1353284603,1353284311,1353284258,1353284233,1353284197,1353284166,1353283889,1353283852,1353283805,1353283745,1353283712) Found this number of photos: 15 ##### Call download_photos : nb_thread : 5 begin to download photo : 1353283712 begin to download photo : 1353283889 begin to download photo : 1353284258 begin to download photo : 1353284658 download finish for photo 1353284258 begin to download photo : 1353284311 download finish for photo 1353283889 begin to download photo : 1353284166 download finish for photo 1353284658 begin to download photo : 1353284673 download finish for photo 1353283712 begin to download photo : 1353283745 download finish for photo 1353284311 begin to download photo : 1353284603 download finish for photo 1353284166 begin to download photo : 1353284197 download finish for photo 1353284673 begin to download photo : 1353284680 download finish for photo 1353283745 begin to download photo : 1353283805 download finish for photo 1353284603 begin to download photo : 1353284628 download finish for photo 1353284680 download finish for photo 1353283805 begin to download photo : 1353283852 download finish for photo 1353284197 begin to download photo : 1353284233 download finish for photo 1353284628 download finish for photo 1353284233 download finish for photo 1353283852 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette223708691745471132/ imagette223708711745471132/ length of list_filenames : 15 ; length of list_pids : 15 ; length of list_args : 15 results_Auto_P22370825_24-04-2025_07_05_32.pdf 22370869 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=22370869 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette223708691745471132 22370871 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=22370871 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette223708711745471132 22370872 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=22370872 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1353285081: '1745471020_3795279_1353283852_704224f7db390cb3d635b0b8ce84fd04_rle_crop_3766987192_0.png', 1353285083: '1745471020_3795279_1353283805_3b99108262b03fa1dd613ffa5f7a9432_rle_crop_3766987216_0.png', 1353285085: '1745471020_3795279_1353283745_49aaba59fedee455419c33c52a2f0d66_rle_crop_3766987823_0.png', 1353285087: '1745471020_3795279_1353283712_39ec0d892297f922b165327be6636952_rle_crop_3766987848_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/24/f01480590a2f4b1cb16340bf439d60cf_96961409.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/24/9eadc523bc7a7ef248432e0dfdf56266_22798764.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/24/a45aaefd9ef8f656707f13240bc138cb_65366824.png change filename to text .imagette223708721745471132/ imagette223708721745471132/1745471020_3795279_1353283712_39ec0d892297f922b165327be6636952_rle_crop_3766987848_0.png.png imagette223708721745471132/1745471020_3795279_1353283805_3b99108262b03fa1dd613ffa5f7a9432_rle_crop_3766987216_0.png.png imagette223708721745471132/1745471020_3795279_1353283745_49aaba59fedee455419c33c52a2f0d66_rle_crop_3766987823_0.png.png imagette223708721745471132/1745471020_3795279_1353283852_704224f7db390cb3d635b0b8ce84fd04_rle_crop_3766987192_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/24/33046fab26220f597defe0f4971bd7f3_75592190.png imagette223708721745471132 22370874 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=22370874 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1353285092: '1745471020_3795279_1353283852_704224f7db390cb3d635b0b8ce84fd04_rle_crop_3766987193_0.png', 1353285093: '1745471020_3795279_1353283745_49aaba59fedee455419c33c52a2f0d66_rle_crop_3766987824_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/24/0756bf2aebbd69cb1b2513fd6f318cc2_23709613.png change filename to text .imagette223708741745471132/ imagette223708741745471132/1745471020_3795279_1353283745_49aaba59fedee455419c33c52a2f0d66_rle_crop_3766987824_0.png.png imagette223708741745471132/1745471020_3795279_1353283852_704224f7db390cb3d635b0b8ce84fd04_rle_crop_3766987193_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/24/8514cf94229e0d5ad517c1b6a31aaa65_59474152.png imagette223708741745471132 22370878 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=22370878 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1353285062: '1745471020_3795279_1353283805_3b99108262b03fa1dd613ffa5f7a9432_rle_crop_3766987212_0.png'} change filename to text .imagette223708781745471132/ imagette223708781745471132/1745471020_3795279_1353283805_3b99108262b03fa1dd613ffa5f7a9432_rle_crop_3766987212_0.png.png imagette223708811745471132/ imagette223708821745471132/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/24/d488f516cf4059fab623f5e8fcfaa33e_29910523.png imagette223708781745471132 22370881 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=22370881 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette223708811745471132 22370882 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=22370882 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette223708821745471132 22370876 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=22370876 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1353285044: '1745471020_3795279_1353283889_8db009714d824732411a463e2a344cb4_rle_crop_3766987175_0.png', 1353285046: '1745471020_3795279_1353283889_8db009714d824732411a463e2a344cb4_rle_crop_3766987174_0.png', 1353285048: '1745471020_3795279_1353283852_704224f7db390cb3d635b0b8ce84fd04_rle_crop_3766987196_0.png', 1353285050: '1745471020_3795279_1353283852_704224f7db390cb3d635b0b8ce84fd04_rle_crop_3766987194_0.png', 1353285052: '1745471020_3795279_1353283852_704224f7db390cb3d635b0b8ce84fd04_rle_crop_3766987199_0.png', 1353285054: '1745471020_3795279_1353283745_49aaba59fedee455419c33c52a2f0d66_rle_crop_3766987829_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/24/88bcead947b487cfade116b74722649a_35538192.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/24/aa3f6b1775c3309955671b184fd4dfa7_98383836.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/24/21ea3a13b2665d5d5d79626804cf36cf_14935399.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/24/e643b3b8867d0f08fa5efd16f2199393_91363236.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/24/8769e76290af43bdf1929c19a270b3a7_2846952.png change filename to text .imagette223708761745471132/ imagette223708761745471132/1745471020_3795279_1353283889_8db009714d824732411a463e2a344cb4_rle_crop_3766987175_0.png.png imagette223708761745471132/1745471020_3795279_1353283852_704224f7db390cb3d635b0b8ce84fd04_rle_crop_3766987199_0.png.png imagette223708761745471132/1745471020_3795279_1353283852_704224f7db390cb3d635b0b8ce84fd04_rle_crop_3766987196_0.png.png imagette223708761745471132/1745471020_3795279_1353283852_704224f7db390cb3d635b0b8ce84fd04_rle_crop_3766987194_0.png.png imagette223708761745471132/1745471020_3795279_1353283745_49aaba59fedee455419c33c52a2f0d66_rle_crop_3766987829_0.png.png imagette223708761745471132/1745471020_3795279_1353283889_8db009714d824732411a463e2a344cb4_rle_crop_3766987174_0.png.png wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/24/d3edc468979c130a66b78750cedb1a89_99167754.png imagette223708761745471132 22370877 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=22370877 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1353285088: '1745471020_3795279_1353283889_8db009714d824732411a463e2a344cb4_rle_crop_3766987177_0.png', 1353285090: '1745471020_3795279_1353283745_49aaba59fedee455419c33c52a2f0d66_rle_crop_3766987831_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/24/2360ed14d4adfa7c33b8c6afe68eff75_60848098.png change filename to text .imagette223708771745471132/ imagette223708771745471132/1745471020_3795279_1353283889_8db009714d824732411a463e2a344cb4_rle_crop_3766987177_0.png.png imagette223708771745471132/1745471020_3795279_1353283745_49aaba59fedee455419c33c52a2f0d66_rle_crop_3766987831_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/24/e03c29ad6bfd9c5e3cbbc185a4fce19a_78333240.png imagette223708771745471132 22370880 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=22370880 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1353285071: '1745471020_3795279_1353283712_39ec0d892297f922b165327be6636952_rle_crop_3766987849_0.png'} change filename to text .imagette223708801745471133/ imagette223708801745471133/1745471020_3795279_1353283712_39ec0d892297f922b165327be6636952_rle_crop_3766987849_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/24/cb3411b1b3c313a18196a481af449933_26453193.png imagette223708801745471133 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=22370825 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/22370891,22370892,22370893,22370894,22370895,22370896,22370897,22370898,22370899,22370900,22370901,22370902?tags=papier,flou,mal_croppe,cartonnette,environnement,plastique,Teint_Dans_La_Masse,Carton_brun,autre_refus,Carton_gris,metal,kraft your option no_mail is active, we will not send the real mail to your client args[1353284680] : ('0.05030710064987305',) no score found for photo 1353284680 We are sending mail with results at report@fotonower.com args[1353284673] : ('0.05030710064987305',) no score found for photo 1353284673 We are sending mail with results at report@fotonower.com args[1353284658] : ('0.05030710064987305',) no score found for photo 1353284658 We are sending mail with results at report@fotonower.com args[1353284628] : ('0.05030710064987305',) no score found for photo 1353284628 We are sending mail with results at report@fotonower.com args[1353284603] : ('0.05030710064987305',) no score found for photo 1353284603 We are sending mail with results at report@fotonower.com args[1353284311] : ('0.05030710064987305',) no score found for photo 1353284311 We are sending mail with results at report@fotonower.com args[1353284258] : ('0.05030710064987305',) no score found for photo 1353284258 We are sending mail with results at report@fotonower.com args[1353284233] : ('0.05030710064987305',) no score found for photo 1353284233 We are sending mail with results at report@fotonower.com args[1353284197] : ('0.05030710064987305',) no score found for photo 1353284197 We are sending mail with results at report@fotonower.com args[1353284166] : ('0.05030710064987305',) no score found for photo 1353284166 We are sending mail with results at report@fotonower.com args[1353283889] : ('0.05030710064987305',) no score found for photo 1353283889 We are sending mail with results at report@fotonower.com args[1353283852] : ('0.05030710064987305',) no score found for photo 1353283852 We are sending mail with results at report@fotonower.com args[1353283805] : ('0.05030710064987305',) no score found for photo 1353283805 We are sending mail with results at report@fotonower.com args[1353283745] : ('0.05030710064987305',) no score found for photo 1353283745 We are sending mail with results at report@fotonower.com args[1353283712] : ('0.05030710064987305',) no score found for photo 1353283712 We are sending mail with results at report@fotonower.com refus_total : 0.05030710064987305 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=22370825 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_P22370825_24-04-2025_07_05_32.pdf results_Auto_P22370825_24-04-2025_07_05_32.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22370825_24-04-2025_07_05_32.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','22370825','results_Auto_P22370825_24-04-2025_07_05_32.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22370825_24-04-2025_07_05_32.pdf','pdf','','0.17','0.05030710064987305') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22370825]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1353284680, 1353284673, 1353284658, 1353284628, 1353284603, 1353284311, 1353284258, 1353284233, 1353284197, 1353284166, 1353283889, 1353283852, 1353283805, 1353283745, 1353283712] map_info['map_portfolio_photo'] : {22370825: [1353284680, 1353284673, 1353284658, 1353284628, 1353284603, 1353284311, 1353284258, 1353284233, 1353284197, 1353284166, 1353283889, 1353283852, 1353283805, 1353283745, 1353283712]} final : False mtd_id 4302 list_pids : [1353284680, 1353284673, 1353284658, 1353284628, 1353284603, 1353284311, 1353284258, 1353284233, 1353284197, 1353284166, 1353283889, 1353283852, 1353283805, 1353283745, 1353283712] 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, '2755937') ('4302', '22370825', '1353284680', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284673', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284658', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284628', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284603', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284311', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284258', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284233', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284197', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284166', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353283889', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353283852', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353283805', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353283745', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353283712', None, None, None, None, None, '2755937') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 15 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', '22370825', '1353284680', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353284673', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353284658', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353284628', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353284603', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353284311', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353284258', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353284233', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353284197', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353284166', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353283889', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353283852', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353283805', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353283745', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353283712', None, None, None, None, None, '2755937')] time used for this insertion : 0.017301321029663086 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.81254243850708 time spend to save output : 0.017632007598876953 total time spend for step 4 : 2.830174446105957 step5:split_time_score Thu Apr 24 07:05:34 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 : ['22370825'] 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 : [('22370825',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22370825) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1353284658: {'path': 'temp/1745471131_2596277_1353284658_7a6dae8a400c07bbe64cc1ffe047ef02.jpg', 'extension': 'jpg'}, 1353284673: {'path': 'temp/1745471131_2596277_1353284673_974a7e1773ffa3dbb3ff2cb017c3ad1c.jpg', 'extension': 'jpg'}, 1353284680: {'path': 'temp/1745471131_2596277_1353284680_fe61deb60e2bdb8f6eeb07321338241b.jpg', 'extension': 'jpg'}, 1353284258: {'path': 'temp/1745471131_2596277_1353284258_a08293326d973eb1f825a1ce8a0c1dcf.jpg', 'extension': 'jpg'}, 1353284311: {'path': 'temp/1745471131_2596277_1353284311_9568fd8a130c530531a580a2c4b8dfb2.jpg', 'extension': 'jpg'}, 1353284603: {'path': 'temp/1745471131_2596277_1353284603_0b1ea7fff9d7c22dcd53ec8a2e718c3f.jpg', 'extension': 'jpg'}, 1353284628: {'path': 'temp/1745471131_2596277_1353284628_f96a57210bbc4af36dc8873262b28f91.jpg', 'extension': 'jpg'}, 1353283889: {'path': 'temp/1745471131_2596277_1353283889_8db009714d824732411a463e2a344cb4.jpg', 'extension': 'jpg'}, 1353284166: {'path': 'temp/1745471131_2596277_1353284166_427814b5d25d514a6f34a98715140012.jpg', 'extension': 'jpg'}, 1353284197: {'path': 'temp/1745471131_2596277_1353284197_0dc4c6c624ce5c2e4ec3ed28c58740b3.jpg', 'extension': 'jpg'}, 1353284233: {'path': 'temp/1745471131_2596277_1353284233_0027f992b0f9bb980142d75558e97b5e.jpg', 'extension': 'jpg'}, 1353283712: {'path': 'temp/1745471131_2596277_1353283712_39ec0d892297f922b165327be6636952.jpg', 'extension': 'jpg'}, 1353283745: {'path': 'temp/1745471131_2596277_1353283745_49aaba59fedee455419c33c52a2f0d66.jpg', 'extension': 'jpg'}, 1353283805: {'path': 'temp/1745471131_2596277_1353283805_3b99108262b03fa1dd613ffa5f7a9432.jpg', 'extension': 'jpg'}, 1353283852: {'path': 'temp/1745471131_2596277_1353283852_704224f7db390cb3d635b0b8ce84fd04.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 = 22370825; (('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 = 22370825 group by h (('07', 15),) 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=22370825 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 (22370825) 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 (22370825) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 24042025 22370825 Nombre de photos uploadées : 15 / 23040 (0%) 24042025 22370825 Nombre de photos taguées (types de déchets): 0 / 15 (0%) 24042025 22370825 Nombre de photos taguées (volume) : 0 / 15 (0%) [{'photo_id': 1353283889, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/24/8db009714d824732411a463e2a344cb4.jpg', 'username': None, 'uploaded_at': 1745470867, 'text': 'image_24042025_07_00_04_10137.jpg'}, {'photo_id': 1353283852, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/24/704224f7db390cb3d635b0b8ce84fd04.jpg', 'username': None, 'uploaded_at': 1745470867, 'text': 'image_24042025_07_00_14_10137.jpg'}, {'photo_id': 1353283805, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/24/3b99108262b03fa1dd613ffa5f7a9432.jpg', 'username': None, 'uploaded_at': 1745470867, 'text': 'image_24042025_07_00_24_10136.jpg'}, {'photo_id': 1353283745, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/24/49aaba59fedee455419c33c52a2f0d66.jpg', 'username': None, 'uploaded_at': 1745470867, 'text': 'image_24042025_07_00_33_9125.jpg'}] 0 [] elapsed_time : load_data_split_time_score 3.5762786865234375e-06 elapsed_time : order_list_meta_photo_and_scores 8.58306884765625e-06 ??????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0006265640258789062 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 22370825, '2025-04-24' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1743777,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.02797102928161621 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= 1743777 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1743777, 'dashboard_run_id': 1751960, 'mtr_portfolio_id': 22369768, 'dashboard_result_id': 10063932, '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_P22369768_24-04-2025_06_32_32.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22369769, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22369770, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22369771, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22369772, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22369773, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22369774, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22369775, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22369776, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22369777, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22369778, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22369779, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22369780, 'pht': 3726}}"}, {'dashboat_entry_day': 1743777, 'dashboard_run_id': 1751960, 'mtr_portfolio_id': 22370237, 'dashboard_result_id': 10063933, '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_P22370237_24-04-2025_06_55_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22370238, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22370239, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22370240, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22370241, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22370242, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22370243, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22370244, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22370245, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22370246, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22370247, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22370248, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22370249, 'pht': 3726}}"}, {'dashboat_entry_day': 1743777, 'dashboard_run_id': 1751960, 'mtr_portfolio_id': 22370495, 'dashboard_result_id': 10063934, '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_P22370495_24-04-2025_07_05_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22370496, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22370497, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22370498, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22370499, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22370500, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22370501, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22370502, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22370503, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22370504, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22370505, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22370506, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22370507, 'pht': 3726}}"}, {'dashboat_entry_day': 1743777, 'dashboard_run_id': 1751960, 'mtr_portfolio_id': 22370825, 'dashboard_result_id': 10063935, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': ''}"}] 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 = 22369768 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': 2755813, 'mtr_portfolio_id': 22369768, 'created_at': datetime.datetime(2025, 4, 24, 6, 32, 31), 'result': '0.052888407671088156', 'result_long': None, 'result_double': None}] Qualite : 0.052888407671088156 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22369768 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22369768_24-04-2025_06_32_32.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22369768 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_P22369768_24-04-2025_06_32_32.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22369769, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22369770, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22369771, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22369772, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22369773, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22369774, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22369775, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22369776, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22369777, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22369778, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22369779, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22369780, 'pht': 3726}}" where mtr_portfolio_id = 22369768 and dashboard_run_id = 1751960 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`=22369768 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10063932, 0.052888407671088156, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22369768_24-04-2025_06_32_32.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22369769, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22369770, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22369771, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22369772, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22369773, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22369774, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22369775, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22369776, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22369777, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22369778, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22369779, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22369780, '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 = 22370237 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': 2755859, 'mtr_portfolio_id': 22370237, 'created_at': datetime.datetime(2025, 4, 24, 6, 54, 59), 'result': '0.06424533586621727', 'result_long': None, 'result_double': None}] Qualite : 0.06424533586621727 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22370237 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22370237_24-04-2025_06_55_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22370237 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_P22370237_24-04-2025_06_55_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22370238, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22370239, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22370240, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22370241, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22370242, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22370243, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22370244, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22370245, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22370246, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22370247, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22370248, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22370249, 'pht': 3726}}" where mtr_portfolio_id = 22370237 and dashboard_run_id = 1751960 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`=22370237 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10063933, 0.06424533586621727, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22370237_24-04-2025_06_55_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22370238, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22370239, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22370240, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22370241, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22370242, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22370243, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22370244, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22370245, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22370246, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22370247, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22370248, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22370249, '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 = 22370495 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': 2755892, 'mtr_portfolio_id': 22370495, 'created_at': datetime.datetime(2025, 4, 24, 7, 4, 59), 'result': '0.056105977140070463', 'result_long': None, 'result_double': None}] Qualite : 0.056105977140070463 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22370495 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22370495_24-04-2025_07_05_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22370495 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_P22370495_24-04-2025_07_05_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22370496, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22370497, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22370498, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22370499, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22370500, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22370501, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22370502, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22370503, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22370504, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22370505, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22370506, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22370507, 'pht': 3726}}" where mtr_portfolio_id = 22370495 and dashboard_run_id = 1751960 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`=22370495 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10063934, 0.056105977140070463, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22370495_24-04-2025_07_05_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22370496, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22370497, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22370498, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22370499, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22370500, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22370501, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22370502, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22370503, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22370504, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22370505, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22370506, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22370507, '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 = 22370825 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': 2755937, 'mtr_portfolio_id': 22370825, 'created_at': datetime.datetime(2025, 4, 24, 7, 5, 31), 'result': '0.05030710064987305', 'result_long': None, 'result_double': None}] Qualite : 0.05030710064987305 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22370825 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22370825_24-04-2025_07_05_32.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22370825 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_P22370825_24-04-2025_07_05_32.pdf'}" where mtr_portfolio_id = 22370825 and dashboard_run_id = 1751960 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`=22370825 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10063935, 0.05030710064987305, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22370825_24-04-2025_07_05_32.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22370868, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22370869, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22370871, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22370872, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22370873, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22370874, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22370876, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22370877, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22370878, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22370880, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22370881, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22370882, '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 (22369768,22370237,22370495,22370825) result : ((1353280959,), (1353280964,), (1353280970,), (1353281008,), (1353281012,), (1353281014,), (1353281015,), (1353281018,), (1353281020,), (1353281057,), (1353281063,), (1353281066,), (1353281071,), (1353281077,), (1353281096,), (1353281099,), (1353281101,), (1353281103,), (1353281105,), (1353281134,), (1353281137,), (1353281139,), (1353281141,), (1353281145,), (1353281148,), (1353281177,), (1353281180,), (1353281182,), (1353281214,), (1353281216,), (1353281222,), (1353281223,), (1353281228,), (1353281231,), (1353281304,), (1353281308,), (1353281314,), (1353281323,), (1353281326,), (1353281331,), (1353281342,), (1353281345,), (1353281349,), (1353281353,), (1353281370,), (1353281373,), (1353281375,), (1353281424,), (1353281427,), (1353281428,), (1353281429,), (1353281432,), (1353281435,), (1353281452,), (1353281455,), (1353281457,), (1353281459,), (1353281486,), (1353281490,), (1353281498,), (1353281503,), (1353281507,), (1353281511,), (1353281546,), (1353281549,), (1353281552,), (1353281554,), (1353281557,), (1353281601,), (1353281605,), (1353281607,), (1353281619,), (1353281622,), (1353281626,), (1353281664,), (1353281655,), (1353281659,), (1353281662,), (1353281698,), (1353281701,), (1353281703,), (1353281709,), (1353281717,), (1353281727,), (1353281755,), (1353281758,), (1353281768,), (1353281774,), (1353281781,), (1353281813,), (1353281819,), (1353281823,), (1353281826,), (1353281854,), (1353281858,), (1353281860,), (1353281862,), (1353281865,), (1353281869,), (1353281895,), (1353281903,), (1353281906,), (1353281909,), (1353281951,), (1353281953,), (1353281955,), (1353281956,), (1353282014,), (1353282017,), (1353282018,), (1353282022,), (1353282029,), (1353282033,), (1353282052,), (1353282054,), (1353282537,), (1353282527,), (1353282531,), (1353282534,), (1353282561,), (1353282563,), (1353282565,), (1353282567,), (1353282571,), (1353282574,), (1353282596,), (1353282599,), (1353282601,), (1353282635,), (1353282639,), (1353282642,), (1353282645,), (1353282648,), (1353282651,), (1353282674,), (1353282677,), (1353282678,), (1353282681,), (1353282857,), (1353282885,), (1353282914,), (1353282942,), (1353282974,), (1353283007,), (1353283575,), (1353283583,), (1353283591,), (1353283596,), (1353283603,), (1353283619,), (1353283621,), (1353283624,), (1353283923,), (1353283712,), (1353283745,), (1353283805,), (1353283852,), (1353283889,), (1353284166,), (1353284197,), (1353284233,), (1353284258,), (1353284311,), (1353284603,), (1353284628,), (1353284658,), (1353284673,), (1353284680,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'24042025': {'nb_upload': 15, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22370825]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1353284680, 1353284673, 1353284658, 1353284628, 1353284603, 1353284311, 1353284258, 1353284233, 1353284197, 1353284166, 1353283889, 1353283852, 1353283805, 1353283745, 1353283712] map_info['map_portfolio_photo'] : {22370825: [1353284680, 1353284673, 1353284658, 1353284628, 1353284603, 1353284311, 1353284258, 1353284233, 1353284197, 1353284166, 1353283889, 1353283852, 1353283805, 1353283745, 1353283712]} final : True mtd_id 4302 list_pids : [1353284680, 1353284673, 1353284658, 1353284628, 1353284603, 1353284311, 1353284258, 1353284233, 1353284197, 1353284166, 1353283889, 1353283852, 1353283805, 1353283745, 1353283712] Looping around the photos to save general results len do output : 1 /22370825Didn'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, '2755937') ('4302', '22370825', '1353284680', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284673', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284658', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284628', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284603', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284311', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284258', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284233', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284197', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353284166', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353283889', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353283852', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353283805', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353283745', None, None, None, None, None, '2755937') ('4302', None, None, None, None, None, None, None, '2755937') ('4302', '22370825', '1353283712', None, None, None, None, None, '2755937') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 16 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, '22370825', 'None', None, None, None, None, '2755937'), ('4302', '22370825', '1353284680', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353284673', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353284658', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353284628', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353284603', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353284311', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353284258', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353284233', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353284197', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353284166', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353283889', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353283852', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353283805', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353283745', None, None, None, None, None, '2755937'), ('4302', '22370825', '1353283712', None, None, None, None, None, '2755937')] time used for this insertion : 0.02988600730895996 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.3541285991668701 time spend to save output : 0.030230998992919922 total time spend for step 5 : 0.38435959815979004 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 (2755937) 2.38user 2.15system 0:08.89elapsed 51%CPU (0avgtext+0avgdata 161320maxresident)k 240inputs+9952outputs (2major+74483minor)pagefaults 0swaps