result : ((1353811806,), (1353811913,), (1353811946,), (1353811976,), (1353812637,), (1353812770,), (1353812820,), (1353812857,), (1353812874,), (1353812991,), (1353813416,), (1353813444,), (1353813474,)) 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 22442397 , 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=22442369 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 (22442397) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22442369) result : ((1353811806,), (1353811913,), (1353811946,), (1353811976,), (1353812637,), (1353812770,), (1353812820,), (1353812857,), (1353812874,), (1353812991,), (1353813416,), (1353813444,), (1353813474,)) 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 22442398 , 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=22442369 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 (22442398) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22442369) result : ((1353811806,), (1353811913,), (1353811946,), (1353811976,), (1353812637,), (1353812770,), (1353812820,), (1353812857,), (1353812874,), (1353812991,), (1353813416,), (1353813444,), (1353813474,)) 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 22442399 , 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=22442369 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 (22442399) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22442369) result : ((1353811806,), (1353811913,), (1353811946,), (1353811976,), (1353812637,), (1353812770,), (1353812820,), (1353812857,), (1353812874,), (1353812991,), (1353813416,), (1353813444,), (1353813474,)) 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 22442400 , 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=22442369 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 (22442400) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22442369) result : ((1353811806,), (1353811913,), (1353811946,), (1353811976,), (1353812637,), (1353812770,), (1353812820,), (1353812857,), (1353812874,), (1353812991,), (1353813416,), (1353813444,), (1353813474,)) 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 22442401 , 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=22442369 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 (22442401) result : ((1353813832,), (1353813834,), (1353813835,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22442369) result : ((1353811806,), (1353811913,), (1353811946,), (1353811976,), (1353812637,), (1353812770,), (1353812820,), (1353812857,), (1353812874,), (1353812991,), (1353813416,), (1353813444,), (1353813474,)) 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 22442402 , 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=22442369 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 (22442402) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22442369) result : ((1353811806,), (1353811913,), (1353811946,), (1353811976,), (1353812637,), (1353812770,), (1353812820,), (1353812857,), (1353812874,), (1353812991,), (1353813416,), (1353813444,), (1353813474,)) 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 22442403 , 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=22442369 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 (22442403) result : ((1353813823,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22442369) result : ((1353811806,), (1353811913,), (1353811946,), (1353811976,), (1353812637,), (1353812770,), (1353812820,), (1353812857,), (1353812874,), (1353812991,), (1353813416,), (1353813444,), (1353813474,)) 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 22442404 , 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=22442369 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 (22442404) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22442369) result : ((1353811806,), (1353811913,), (1353811946,), (1353811976,), (1353812637,), (1353812770,), (1353812820,), (1353812857,), (1353812874,), (1353812991,), (1353813416,), (1353813444,), (1353813474,)) 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 22442405 , 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=22442369 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 (22442405) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22442369) result : ((1353811806,), (1353811913,), (1353811946,), (1353811976,), (1353812637,), (1353812770,), (1353812820,), (1353812857,), (1353812874,), (1353812991,), (1353813416,), (1353813444,), (1353813474,)) 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`=22442369 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','metal','cartonnette','mal_croppe','plastique','flou','Teint_Dans_La_Masse','Carton_gris','kraft','autre_refus','environnement','Carton_brun')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=22442369 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','metal','cartonnette','mal_croppe','plastique','flou','Teint_Dans_La_Masse','Carton_gris','kraft','autre_refus','environnement','Carton_brun')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__25042025_17_00_14_10253_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__25042025_17_00_14_10253_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__25042025_17_00_14_10253_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__25042025_17_00_14_10253_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__25042025_17_00_14_10253_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__25042025_17_00_14_10253_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__25042025_17_00_14_10253_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__25042025_17_00_14_10253_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__25042025_17_00_14_10253_4417_kraft_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__25042025_17_00_14_10253_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__25042025_17_00_14_10253_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__25042025_17_00_14_10253_4417_Carton_brun_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)[[22442369, 22442406, 4417, 0.5, 492668766, 979], [22442369, 22442407, 4417, 0.5, 492628673, 979], [22442369, 22442408, 4417, 0.5, 702398920, 979], [22442369, 22442409, 4417, 0.5, 2107755527, 979], [22442369, 22442410, 4417, 0.5, 492725882, 979], [22442369, 22442411, 4417, 0.5, 492777938, 979], [22442369, 22442412, 4417, 0.5, 2107752385, 979], [22442369, 22442413, 4417, 0.5, 2107753020, 979], [22442369, 22442414, 4417, 0.5, 493202403, 979], [22442369, 22442415, 4417, 0.5, 2107752406, 979], [22442369, 22442416, 4417, 0.5, 493012381, 979], [22442369, 22442417, 4417, 0.5, 2107753024, 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`=22442369 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','metal','cartonnette','mal_croppe','plastique','flou','Teint_Dans_La_Masse','Carton_gris','kraft','autre_refus','environnement','Carton_brun')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=22442369 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','metal','cartonnette','mal_croppe','plastique','flou','Teint_Dans_La_Masse','Carton_gris','kraft','autre_refus','environnement','Carton_brun')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 22442369, 'sub_port_id': 22442406, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14887524, 'last_updated_at': datetime.datetime(2025, 4, 25, 17, 5, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 17, 5, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 17, 5, 1)}, 'metal': {'main_port_id': 22442369, 'sub_port_id': 22442407, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14887525, 'last_updated_at': datetime.datetime(2025, 4, 25, 17, 5, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 17, 5, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 17, 5, 1)}, 'cartonnette': {'main_port_id': 22442369, 'sub_port_id': 22442408, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14887526, 'last_updated_at': datetime.datetime(2025, 4, 25, 17, 5, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 17, 5, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 17, 5, 1)}, 'mal_croppe': {'main_port_id': 22442369, 'sub_port_id': 22442409, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14887527, 'last_updated_at': datetime.datetime(2025, 4, 25, 17, 5, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 17, 5, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 17, 5, 1)}, 'plastique': {'main_port_id': 22442369, 'sub_port_id': 22442410, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14887528, 'last_updated_at': datetime.datetime(2025, 4, 25, 17, 5, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 17, 5, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 17, 5, 1)}, 'flou': {'main_port_id': 22442369, 'sub_port_id': 22442411, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14887529, 'last_updated_at': datetime.datetime(2025, 4, 25, 17, 5, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 17, 5, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 17, 5, 1)}, 'Teint_Dans_La_Masse': {'main_port_id': 22442369, 'sub_port_id': 22442412, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14887530, 'last_updated_at': datetime.datetime(2025, 4, 25, 17, 5, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 17, 5, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 17, 5, 1)}, 'Carton_gris': {'main_port_id': 22442369, 'sub_port_id': 22442413, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14887531, 'last_updated_at': datetime.datetime(2025, 4, 25, 17, 5, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 17, 5, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 17, 5, 1)}, 'kraft': {'main_port_id': 22442369, 'sub_port_id': 22442414, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14887532, 'last_updated_at': datetime.datetime(2025, 4, 25, 17, 5, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 17, 5, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 17, 5, 1)}, 'autre_refus': {'main_port_id': 22442369, 'sub_port_id': 22442415, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14887533, 'last_updated_at': datetime.datetime(2025, 4, 25, 17, 5, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 17, 5, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 17, 5, 1)}, 'environnement': {'main_port_id': 22442369, 'sub_port_id': 22442416, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14887534, 'last_updated_at': datetime.datetime(2025, 4, 25, 17, 5, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 17, 5, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 17, 5, 1)}, 'Carton_brun': {'main_port_id': 22442369, 'sub_port_id': 22442417, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14887535, 'last_updated_at': datetime.datetime(2025, 4, 25, 17, 5, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 17, 5, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 17, 5, 1)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22442406,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22442394 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22442407,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22442395 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22442408,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22442396 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22442409,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22442397 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22442410,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22442398 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22442411,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22442399 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22442412,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22442400 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22442413,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22442401 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22442414,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22442402 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22442415,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22442403 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22442416,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22442404 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22442417,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22442405 lien utilise dans velours : https://www.fotonower.com/velours/22442406,22442407,22442408,22442409,22442410,22442411,22442412,22442413,22442414,22442415,22442416,22442417?tags=papier,metal,cartonnette,mal_croppe,plastique,flou,Teint_Dans_La_Masse,Carton_gris,kraft,autre_refus,environnement,Carton_brun After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22442369]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1353813474, 1353813444, 1353813416, 1353812991, 1353812874, 1353812857, 1353812820, 1353812770, 1353812637, 1353811976, 1353811946, 1353811913, 1353811806] map_info['map_portfolio_photo'] : {22442369: [1353813474, 1353813444, 1353813416, 1353812991, 1353812874, 1353812857, 1353812820, 1353812770, 1353812637, 1353811976, 1353811946, 1353811913, 1353811806]} final : False mtd_id 4302 list_pids : [1353813474, 1353813444, 1353813416, 1353812991, 1353812874, 1353812857, 1353812820, 1353812770, 1353812637, 1353811976, 1353811946, 1353811913, 1353811806] Looping around the photos to save general results len do output : 1 /22442369. 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, '2763364') ('4302', '22442369', '1353813474', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353813444', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353813416', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353812991', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353812874', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353812857', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353812820', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353812770', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353812637', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353811976', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353811946', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353811913', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353811806', None, None, None, None, None, '2763364') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 14 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '22442369', "{'papier': 22442394, 'metal': 22442395, 'cartonnette': 22442396, 'mal_croppe': 22442397, 'plastique': 22442398, 'flou': 22442399, 'Teint_Dans_La_Masse': 22442400, 'Carton_gris': 22442401, 'kraft': 22442402, 'autre_refus': 22442403, 'environnement': 22442404, 'Carton_brun': 22442405}", None, None, None, None, '2763364'), ('4302', '22442369', '1353813474', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353813444', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353813416', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353812991', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353812874', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353812857', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353812820', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353812770', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353812637', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353811976', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353811946', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353811913', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353811806', None, None, None, None, None, '2763364')] time used for this insertion : 0.013907670974731445 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.104579448699951 time spend to save output : 0.014205694198608398 total time spend for step 1 : 2.1187851428985596 step2:final Fri Apr 25 17:05:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! 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 (22442369) 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 22442369 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1353811976,1353811946,1353811913,1353811806,1353812991,1353812874,1353812857,1353812820,1353812770,1353812637,1353813474,1353813444,1353813416); 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([22442369]) Inside saveOutput : final : False verbose : True original output for save of step final : {1353813474: ('0.024966648597594114',), 1353813444: ('0.024966648597594114',), 1353813416: ('0.024966648597594114',), 1353812991: ('0.024966648597594114',), 1353812874: ('0.024966648597594114',), 1353812857: ('0.024966648597594114',), 1353812820: ('0.024966648597594114',), 1353812770: ('0.024966648597594114',), 1353812637: ('0.024966648597594114',), 1353811976: ('0.024966648597594114',), 1353811946: ('0.024966648597594114',), 1353811913: ('0.024966648597594114',), 1353811806: ('0.024966648597594114',)} new output for save of step final : {1353813474: ('0.024966648597594114',), 1353813444: ('0.024966648597594114',), 1353813416: ('0.024966648597594114',), 1353812991: ('0.024966648597594114',), 1353812874: ('0.024966648597594114',), 1353812857: ('0.024966648597594114',), 1353812820: ('0.024966648597594114',), 1353812770: ('0.024966648597594114',), 1353812637: ('0.024966648597594114',), 1353811976: ('0.024966648597594114',), 1353811946: ('0.024966648597594114',), 1353811913: ('0.024966648597594114',), 1353811806: ('0.024966648597594114',)} [1353813474, 1353813444, 1353813416, 1353812991, 1353812874, 1353812857, 1353812820, 1353812770, 1353812637, 1353811976, 1353811946, 1353811913, 1353811806] map_info['map_portfolio_photo'] : {22442369: [1353813474, 1353813444, 1353813416, 1353812991, 1353812874, 1353812857, 1353812820, 1353812770, 1353812637, 1353811976, 1353811946, 1353811913, 1353811806]} final : False mtd_id 4302 list_pids : [1353813474, 1353813444, 1353813416, 1353812991, 1353812874, 1353812857, 1353812820, 1353812770, 1353812637, 1353811976, 1353811946, 1353811913, 1353811806] Looping around the photos to save general results len do output : 13 /1353813474.Didn't retrieve data . /1353813444.Didn't retrieve data . /1353813416.Didn't retrieve data . /1353812991.Didn't retrieve data . /1353812874.Didn't retrieve data . /1353812857.Didn't retrieve data . /1353812820.Didn't retrieve data . /1353812770.Didn't retrieve data . /1353812637.Didn't retrieve data . /1353811976.Didn't retrieve data . /1353811946.Didn't retrieve data . /1353811913.Didn't retrieve data . /1353811806.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, '2763364') ('4302', '22442369', '1353813474', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353813444', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353813416', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353812991', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353812874', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353812857', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353812820', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353812770', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353812637', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353811976', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353811946', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353811913', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353811806', None, None, None, None, None, '2763364') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 39 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '22442369', '1353813474', '0.024966648597594114', None, None, None, None, '2763364'), ('4302', '22442369', '1353813444', '0.024966648597594114', None, None, None, None, '2763364'), ('4302', '22442369', '1353813416', '0.024966648597594114', None, None, None, None, '2763364'), ('4302', '22442369', '1353812991', '0.024966648597594114', None, None, None, None, '2763364'), ('4302', '22442369', '1353812874', '0.024966648597594114', None, None, None, None, '2763364'), ('4302', '22442369', '1353812857', '0.024966648597594114', None, None, None, None, '2763364'), ('4302', '22442369', '1353812820', '0.024966648597594114', None, None, None, None, '2763364'), ('4302', '22442369', '1353812770', '0.024966648597594114', None, None, None, None, '2763364'), ('4302', '22442369', '1353812637', '0.024966648597594114', None, None, None, None, '2763364'), ('4302', '22442369', '1353811976', '0.024966648597594114', None, None, None, None, '2763364'), ('4302', '22442369', '1353811946', '0.024966648597594114', None, None, None, None, '2763364'), ('4302', '22442369', '1353811913', '0.024966648597594114', None, None, None, None, '2763364'), ('4302', '22442369', '1353811806', '0.024966648597594114', None, None, None, None, '2763364')] time used for this insertion : 0.014446258544921875 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.02730846405029297 time spend to save output : 0.015001535415649414 total time spend for step 2 : 0.04230999946594238 step3:velours_tree Fri Apr 25 17:05:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {22442369: [{'papier': 22442394, 'metal': 22442395, 'cartonnette': 22442396, 'mal_croppe': 22442397, 'plastique': 22442398, 'flou': 22442399, 'Teint_Dans_La_Masse': 22442400, 'Carton_gris': 22442401, 'kraft': 22442402, 'autre_refus': 22442403, 'environnement': 22442404, 'Carton_brun': 22442405}]} input_args_next_step : {22442369: ()} output_args : {22442369: [{'papier': 22442394, 'metal': 22442395, 'cartonnette': 22442396, 'mal_croppe': 22442397, 'plastique': 22442398, 'flou': 22442399, 'Teint_Dans_La_Masse': 22442400, 'Carton_gris': 22442401, 'kraft': 22442402, 'autre_refus': 22442403, 'environnement': 22442404, 'Carton_brun': 22442405}]} args : 22442369 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': 22442394, 'metal': 22442395, 'cartonnette': 22442396, 'mal_croppe': 22442397, 'plastique': 22442398, 'flou': 22442399, 'Teint_Dans_La_Masse': 22442400, 'Carton_gris': 22442401, 'kraft': 22442402, 'autre_refus': 22442403, 'environnement': 22442404, 'Carton_brun': 22442405},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22442369) 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([22442369]) 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.7646827697753906 time spend to save output : 0.00010156631469726562 total time spend for step 3 : 0.7647843360900879 step4:send_mail_cod Fri Apr 25 17:05:02 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1353813474: ('0.024966648597594114',), 1353813444: ('0.024966648597594114',), 1353813416: ('0.024966648597594114',), 1353812991: ('0.024966648597594114',), 1353812874: ('0.024966648597594114',), 1353812857: ('0.024966648597594114',), 1353812820: ('0.024966648597594114',), 1353812770: ('0.024966648597594114',), 1353812637: ('0.024966648597594114',), 1353811976: ('0.024966648597594114',), 1353811946: ('0.024966648597594114',), 1353811913: ('0.024966648597594114',), 1353811806: ('0.024966648597594114',)} input_args_next_step : {1353813474: ()} output_args : {1353813474: ('0.024966648597594114',), 1353813444: ('0.024966648597594114',), 1353813416: ('0.024966648597594114',), 1353812991: ('0.024966648597594114',), 1353812874: ('0.024966648597594114',), 1353812857: ('0.024966648597594114',), 1353812820: ('0.024966648597594114',), 1353812770: ('0.024966648597594114',), 1353812637: ('0.024966648597594114',), 1353811976: ('0.024966648597594114',), 1353811946: ('0.024966648597594114',), 1353811913: ('0.024966648597594114',), 1353811806: ('0.024966648597594114',)} args : 1353813474 depend.output_id : 0 input_args_next_step : {1353813474: ('0.024966648597594114',), 1353813444: ()} output_args : {1353813474: ('0.024966648597594114',), 1353813444: ('0.024966648597594114',), 1353813416: ('0.024966648597594114',), 1353812991: ('0.024966648597594114',), 1353812874: ('0.024966648597594114',), 1353812857: ('0.024966648597594114',), 1353812820: ('0.024966648597594114',), 1353812770: ('0.024966648597594114',), 1353812637: ('0.024966648597594114',), 1353811976: ('0.024966648597594114',), 1353811946: ('0.024966648597594114',), 1353811913: ('0.024966648597594114',), 1353811806: ('0.024966648597594114',)} args : 1353813444 depend.output_id : 0 input_args_next_step : {1353813474: ('0.024966648597594114',), 1353813444: ('0.024966648597594114',), 1353813416: ()} output_args : {1353813474: ('0.024966648597594114',), 1353813444: ('0.024966648597594114',), 1353813416: ('0.024966648597594114',), 1353812991: ('0.024966648597594114',), 1353812874: ('0.024966648597594114',), 1353812857: ('0.024966648597594114',), 1353812820: ('0.024966648597594114',), 1353812770: ('0.024966648597594114',), 1353812637: ('0.024966648597594114',), 1353811976: ('0.024966648597594114',), 1353811946: ('0.024966648597594114',), 1353811913: ('0.024966648597594114',), 1353811806: ('0.024966648597594114',)} args : 1353813416 depend.output_id : 0 input_args_next_step : {1353813474: ('0.024966648597594114',), 1353813444: ('0.024966648597594114',), 1353813416: ('0.024966648597594114',), 1353812991: ()} output_args : {1353813474: ('0.024966648597594114',), 1353813444: ('0.024966648597594114',), 1353813416: ('0.024966648597594114',), 1353812991: ('0.024966648597594114',), 1353812874: ('0.024966648597594114',), 1353812857: ('0.024966648597594114',), 1353812820: ('0.024966648597594114',), 1353812770: ('0.024966648597594114',), 1353812637: ('0.024966648597594114',), 1353811976: ('0.024966648597594114',), 1353811946: ('0.024966648597594114',), 1353811913: ('0.024966648597594114',), 1353811806: ('0.024966648597594114',)} args : 1353812991 depend.output_id : 0 input_args_next_step : {1353813474: ('0.024966648597594114',), 1353813444: ('0.024966648597594114',), 1353813416: ('0.024966648597594114',), 1353812991: ('0.024966648597594114',), 1353812874: ()} output_args : {1353813474: ('0.024966648597594114',), 1353813444: ('0.024966648597594114',), 1353813416: ('0.024966648597594114',), 1353812991: ('0.024966648597594114',), 1353812874: ('0.024966648597594114',), 1353812857: ('0.024966648597594114',), 1353812820: ('0.024966648597594114',), 1353812770: ('0.024966648597594114',), 1353812637: ('0.024966648597594114',), 1353811976: ('0.024966648597594114',), 1353811946: ('0.024966648597594114',), 1353811913: ('0.024966648597594114',), 1353811806: ('0.024966648597594114',)} args : 1353812874 depend.output_id : 0 input_args_next_step : {1353813474: ('0.024966648597594114',), 1353813444: ('0.024966648597594114',), 1353813416: ('0.024966648597594114',), 1353812991: ('0.024966648597594114',), 1353812874: ('0.024966648597594114',), 1353812857: ()} output_args : {1353813474: ('0.024966648597594114',), 1353813444: ('0.024966648597594114',), 1353813416: ('0.024966648597594114',), 1353812991: ('0.024966648597594114',), 1353812874: ('0.024966648597594114',), 1353812857: ('0.024966648597594114',), 1353812820: ('0.024966648597594114',), 1353812770: ('0.024966648597594114',), 1353812637: ('0.024966648597594114',), 1353811976: ('0.024966648597594114',), 1353811946: ('0.024966648597594114',), 1353811913: ('0.024966648597594114',), 1353811806: ('0.024966648597594114',)} args : 1353812857 depend.output_id : 0 input_args_next_step : {1353813474: ('0.024966648597594114',), 1353813444: ('0.024966648597594114',), 1353813416: ('0.024966648597594114',), 1353812991: ('0.024966648597594114',), 1353812874: ('0.024966648597594114',), 1353812857: ('0.024966648597594114',), 1353812820: ()} output_args : {1353813474: ('0.024966648597594114',), 1353813444: ('0.024966648597594114',), 1353813416: ('0.024966648597594114',), 1353812991: ('0.024966648597594114',), 1353812874: ('0.024966648597594114',), 1353812857: ('0.024966648597594114',), 1353812820: ('0.024966648597594114',), 1353812770: ('0.024966648597594114',), 1353812637: ('0.024966648597594114',), 1353811976: ('0.024966648597594114',), 1353811946: ('0.024966648597594114',), 1353811913: ('0.024966648597594114',), 1353811806: ('0.024966648597594114',)} args : 1353812820 depend.output_id : 0 input_args_next_step : {1353813474: ('0.024966648597594114',), 1353813444: ('0.024966648597594114',), 1353813416: ('0.024966648597594114',), 1353812991: ('0.024966648597594114',), 1353812874: ('0.024966648597594114',), 1353812857: ('0.024966648597594114',), 1353812820: ('0.024966648597594114',), 1353812770: ()} output_args : {1353813474: ('0.024966648597594114',), 1353813444: ('0.024966648597594114',), 1353813416: ('0.024966648597594114',), 1353812991: ('0.024966648597594114',), 1353812874: ('0.024966648597594114',), 1353812857: ('0.024966648597594114',), 1353812820: ('0.024966648597594114',), 1353812770: ('0.024966648597594114',), 1353812637: ('0.024966648597594114',), 1353811976: ('0.024966648597594114',), 1353811946: ('0.024966648597594114',), 1353811913: ('0.024966648597594114',), 1353811806: ('0.024966648597594114',)} args : 1353812770 depend.output_id : 0 input_args_next_step : {1353813474: ('0.024966648597594114',), 1353813444: ('0.024966648597594114',), 1353813416: ('0.024966648597594114',), 1353812991: ('0.024966648597594114',), 1353812874: ('0.024966648597594114',), 1353812857: ('0.024966648597594114',), 1353812820: ('0.024966648597594114',), 1353812770: ('0.024966648597594114',), 1353812637: ()} output_args : {1353813474: ('0.024966648597594114',), 1353813444: ('0.024966648597594114',), 1353813416: ('0.024966648597594114',), 1353812991: ('0.024966648597594114',), 1353812874: ('0.024966648597594114',), 1353812857: ('0.024966648597594114',), 1353812820: ('0.024966648597594114',), 1353812770: ('0.024966648597594114',), 1353812637: ('0.024966648597594114',), 1353811976: ('0.024966648597594114',), 1353811946: ('0.024966648597594114',), 1353811913: ('0.024966648597594114',), 1353811806: ('0.024966648597594114',)} args : 1353812637 depend.output_id : 0 input_args_next_step : {1353813474: ('0.024966648597594114',), 1353813444: ('0.024966648597594114',), 1353813416: ('0.024966648597594114',), 1353812991: ('0.024966648597594114',), 1353812874: ('0.024966648597594114',), 1353812857: ('0.024966648597594114',), 1353812820: ('0.024966648597594114',), 1353812770: ('0.024966648597594114',), 1353812637: ('0.024966648597594114',), 1353811976: ()} output_args : {1353813474: ('0.024966648597594114',), 1353813444: ('0.024966648597594114',), 1353813416: ('0.024966648597594114',), 1353812991: ('0.024966648597594114',), 1353812874: ('0.024966648597594114',), 1353812857: ('0.024966648597594114',), 1353812820: ('0.024966648597594114',), 1353812770: ('0.024966648597594114',), 1353812637: ('0.024966648597594114',), 1353811976: ('0.024966648597594114',), 1353811946: ('0.024966648597594114',), 1353811913: ('0.024966648597594114',), 1353811806: ('0.024966648597594114',)} args : 1353811976 depend.output_id : 0 input_args_next_step : {1353813474: ('0.024966648597594114',), 1353813444: ('0.024966648597594114',), 1353813416: ('0.024966648597594114',), 1353812991: ('0.024966648597594114',), 1353812874: ('0.024966648597594114',), 1353812857: ('0.024966648597594114',), 1353812820: ('0.024966648597594114',), 1353812770: ('0.024966648597594114',), 1353812637: ('0.024966648597594114',), 1353811976: ('0.024966648597594114',), 1353811946: ()} output_args : {1353813474: ('0.024966648597594114',), 1353813444: ('0.024966648597594114',), 1353813416: ('0.024966648597594114',), 1353812991: ('0.024966648597594114',), 1353812874: ('0.024966648597594114',), 1353812857: ('0.024966648597594114',), 1353812820: ('0.024966648597594114',), 1353812770: ('0.024966648597594114',), 1353812637: ('0.024966648597594114',), 1353811976: ('0.024966648597594114',), 1353811946: ('0.024966648597594114',), 1353811913: ('0.024966648597594114',), 1353811806: ('0.024966648597594114',)} args : 1353811946 depend.output_id : 0 input_args_next_step : {1353813474: ('0.024966648597594114',), 1353813444: ('0.024966648597594114',), 1353813416: ('0.024966648597594114',), 1353812991: ('0.024966648597594114',), 1353812874: ('0.024966648597594114',), 1353812857: ('0.024966648597594114',), 1353812820: ('0.024966648597594114',), 1353812770: ('0.024966648597594114',), 1353812637: ('0.024966648597594114',), 1353811976: ('0.024966648597594114',), 1353811946: ('0.024966648597594114',), 1353811913: ()} output_args : {1353813474: ('0.024966648597594114',), 1353813444: ('0.024966648597594114',), 1353813416: ('0.024966648597594114',), 1353812991: ('0.024966648597594114',), 1353812874: ('0.024966648597594114',), 1353812857: ('0.024966648597594114',), 1353812820: ('0.024966648597594114',), 1353812770: ('0.024966648597594114',), 1353812637: ('0.024966648597594114',), 1353811976: ('0.024966648597594114',), 1353811946: ('0.024966648597594114',), 1353811913: ('0.024966648597594114',), 1353811806: ('0.024966648597594114',)} args : 1353811913 depend.output_id : 0 input_args_next_step : {1353813474: ('0.024966648597594114',), 1353813444: ('0.024966648597594114',), 1353813416: ('0.024966648597594114',), 1353812991: ('0.024966648597594114',), 1353812874: ('0.024966648597594114',), 1353812857: ('0.024966648597594114',), 1353812820: ('0.024966648597594114',), 1353812770: ('0.024966648597594114',), 1353812637: ('0.024966648597594114',), 1353811976: ('0.024966648597594114',), 1353811946: ('0.024966648597594114',), 1353811913: ('0.024966648597594114',), 1353811806: ()} output_args : {1353813474: ('0.024966648597594114',), 1353813444: ('0.024966648597594114',), 1353813416: ('0.024966648597594114',), 1353812991: ('0.024966648597594114',), 1353812874: ('0.024966648597594114',), 1353812857: ('0.024966648597594114',), 1353812820: ('0.024966648597594114',), 1353812770: ('0.024966648597594114',), 1353812637: ('0.024966648597594114',), 1353811976: ('0.024966648597594114',), 1353811946: ('0.024966648597594114',), 1353811913: ('0.024966648597594114',), 1353811806: ('0.024966648597594114',)} args : 1353811806 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 : {22442369: [{'papier': 22442394, 'metal': 22442395, 'cartonnette': 22442396, 'mal_croppe': 22442397, 'plastique': 22442398, 'flou': 22442399, 'Teint_Dans_La_Masse': 22442400, 'Carton_gris': 22442401, 'kraft': 22442402, 'autre_refus': 22442403, 'environnement': 22442404, 'Carton_brun': 22442405}]} input_args_next_step : {1353813474: ('0.024966648597594114',), 1353813444: ('0.024966648597594114',), 1353813416: ('0.024966648597594114',), 1353812991: ('0.024966648597594114',), 1353812874: ('0.024966648597594114',), 1353812857: ('0.024966648597594114',), 1353812820: ('0.024966648597594114',), 1353812770: ('0.024966648597594114',), 1353812637: ('0.024966648597594114',), 1353811976: ('0.024966648597594114',), 1353811946: ('0.024966648597594114',), 1353811913: ('0.024966648597594114',), 1353811806: ('0.024966648597594114',), 22442369: ()} output_args : {22442369: [{'papier': 22442394, 'metal': 22442395, 'cartonnette': 22442396, 'mal_croppe': 22442397, 'plastique': 22442398, 'flou': 22442399, 'Teint_Dans_La_Masse': 22442400, 'Carton_gris': 22442401, 'kraft': 22442402, 'autre_refus': 22442403, 'environnement': 22442404, 'Carton_brun': 22442405}]} args : 22442369 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :14, first value : ('0.024966648597594114',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22442369) 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 (1353813474,1353813444,1353813416,1353812991,1353812874,1353812857,1353812820,1353812770,1353812637,1353811976,1353811946,1353811913,1353811806) Found this number of photos: 13 ##### Call download_photos : nb_thread : 5 begin to download photo : 1353811806 begin to download photo : 1353811976 begin to download photo : 1353812820 begin to download photo : 1353812991 begin to download photo : 1353813474 download finish for photo 1353812991 begin to download photo : 1353813416 download finish for photo 1353811976 begin to download photo : 1353812637 download finish for photo 1353812820 begin to download photo : 1353812857 download finish for photo 1353813474 download finish for photo 1353811806 begin to download photo : 1353811913 download finish for photo 1353813416 begin to download photo : 1353813444 download finish for photo 1353812857 begin to download photo : 1353812874 download finish for photo 1353812637 begin to download photo : 1353812770 download finish for photo 1353811913 begin to download photo : 1353811946 download finish for photo 1353813444 download finish for photo 1353812874 download finish for photo 1353812770 download finish for photo 1353811946 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette224423951745593502/ length of list_filenames : 13 ; length of list_pids : 13 ; length of list_args : 13 results_Auto_P22442369_25-04-2025_17_05_02.pdf 22442395 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=22442395 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette224423951745593502 22442396 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=22442396 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1353813848: '1745593451_2132068_1353811913_185c3d1e6628772e9a78cb37f67a0b9d_rle_crop_3770348366_0.png'} change filename to text .imagette224423961745593502/ imagette224423961745593502/1745593451_2132068_1353811913_185c3d1e6628772e9a78cb37f67a0b9d_rle_crop_3770348366_0.png.png imagette224423971745593503/ imagette224423981745593503/ imagette224423991745593503/ imagette224424021745593503/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/25/fb8cbc37eda60df3b71b1bb34d505e72_57790517.png imagette224423961745593502 22442397 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=22442397 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette224423971745593503 22442398 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=22442398 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette224423981745593503 22442399 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=22442399 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette224423991745593503 22442402 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=22442402 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette224424021745593503 22442403 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=22442403 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1353813823: '1745593451_2132068_1353811946_30b40280c8cae545fcb7a7e222532a32_rle_crop_3770348345_0.png'} change filename to text .imagette224424031745593503/ imagette224424031745593503/1745593451_2132068_1353811946_30b40280c8cae545fcb7a7e222532a32_rle_crop_3770348345_0.png.png imagette224424001745593503/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/25/cb594994fff05bc975c10f4f6e9054c5_38693982.png imagette224424031745593503 22442400 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=22442400 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette224424001745593503 22442401 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=22442401 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1353813832: '1745593451_2132068_1353811976_8a028828007e7fe3d8cd2e58c35f7bcb_rle_crop_3770348335_0.png', 1353813834: '1745593451_2132068_1353811806_1ed2cf8f4b7907b99a87a3eae5e0a115_rle_crop_3770348437_0.png', 1353813835: '1745593451_2132068_1353811806_1ed2cf8f4b7907b99a87a3eae5e0a115_rle_crop_3770348441_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/25/81efdd0fbc877fda9044bcd44cfc6f6c_72267888.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/25/744c821befd3df765c3ed086ac8cb247_71463328.png change filename to text .imagette224424011745593503/ imagette224424011745593503/1745593451_2132068_1353811806_1ed2cf8f4b7907b99a87a3eae5e0a115_rle_crop_3770348437_0.png.png imagette224424011745593503/1745593451_2132068_1353811976_8a028828007e7fe3d8cd2e58c35f7bcb_rle_crop_3770348335_0.png.png imagette224424011745593503/1745593451_2132068_1353811806_1ed2cf8f4b7907b99a87a3eae5e0a115_rle_crop_3770348441_0.png.png imagette224424051745593503/ wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/25/8c44f53fcbd42ff03ef5e7ec8d0061f7_12940964.png imagette224424011745593503 22442405 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=22442405 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette224424051745593503 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=22442369 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/22442406,22442407,22442408,22442409,22442410,22442411,22442412,22442413,22442414,22442415,22442416,22442417?tags=papier,metal,cartonnette,mal_croppe,plastique,flou,Teint_Dans_La_Masse,Carton_gris,kraft,autre_refus,environnement,Carton_brun your option no_mail is active, we will not send the real mail to your client args[1353813474] : ('0.024966648597594114',) no score found for photo 1353813474 We are sending mail with results at report@fotonower.com args[1353813444] : ('0.024966648597594114',) no score found for photo 1353813444 We are sending mail with results at report@fotonower.com args[1353813416] : ('0.024966648597594114',) no score found for photo 1353813416 We are sending mail with results at report@fotonower.com args[1353812991] : ('0.024966648597594114',) no score found for photo 1353812991 We are sending mail with results at report@fotonower.com args[1353812874] : ('0.024966648597594114',) no score found for photo 1353812874 We are sending mail with results at report@fotonower.com args[1353812857] : ('0.024966648597594114',) no score found for photo 1353812857 We are sending mail with results at report@fotonower.com args[1353812820] : ('0.024966648597594114',) no score found for photo 1353812820 We are sending mail with results at report@fotonower.com args[1353812770] : ('0.024966648597594114',) no score found for photo 1353812770 We are sending mail with results at report@fotonower.com args[1353812637] : ('0.024966648597594114',) no score found for photo 1353812637 We are sending mail with results at report@fotonower.com args[1353811976] : ('0.024966648597594114',) no score found for photo 1353811976 We are sending mail with results at report@fotonower.com args[1353811946] : ('0.024966648597594114',) no score found for photo 1353811946 We are sending mail with results at report@fotonower.com args[1353811913] : ('0.024966648597594114',) no score found for photo 1353811913 We are sending mail with results at report@fotonower.com args[1353811806] : ('0.024966648597594114',) no score found for photo 1353811806 We are sending mail with results at report@fotonower.com refus_total : 0.024966648597594114 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=22442369 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_P22442369_25-04-2025_17_05_02.pdf results_Auto_P22442369_25-04-2025_17_05_02.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22442369_25-04-2025_17_05_02.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','22442369','results_Auto_P22442369_25-04-2025_17_05_02.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22442369_25-04-2025_17_05_02.pdf','pdf','','0.13','0.024966648597594114') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22442369]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1353813474, 1353813444, 1353813416, 1353812991, 1353812874, 1353812857, 1353812820, 1353812770, 1353812637, 1353811976, 1353811946, 1353811913, 1353811806] map_info['map_portfolio_photo'] : {22442369: [1353813474, 1353813444, 1353813416, 1353812991, 1353812874, 1353812857, 1353812820, 1353812770, 1353812637, 1353811976, 1353811946, 1353811913, 1353811806]} final : False mtd_id 4302 list_pids : [1353813474, 1353813444, 1353813416, 1353812991, 1353812874, 1353812857, 1353812820, 1353812770, 1353812637, 1353811976, 1353811946, 1353811913, 1353811806] 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, '2763364') ('4302', '22442369', '1353813474', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353813444', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353813416', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353812991', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353812874', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353812857', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353812820', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353812770', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353812637', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353811976', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353811946', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353811913', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353811806', None, None, None, None, None, '2763364') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 13 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '22442369', '1353813474', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353813444', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353813416', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353812991', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353812874', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353812857', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353812820', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353812770', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353812637', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353811976', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353811946', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353811913', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353811806', None, None, None, None, None, '2763364')] time used for this insertion : 0.013803482055664062 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.065850257873535 time spend to save output : 0.013991355895996094 total time spend for step 4 : 2.0798416137695312 step5:split_time_score Fri Apr 25 17:05:04 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['22442369'] 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 : [('22442369',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22442369) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1353813474: {'path': 'temp/1745593502_2200723_1353813474_1a5beaaa4cab28f50f98430f17168e0e.jpg', 'extension': 'jpg'}, 1353812991: {'path': 'temp/1745593502_2200723_1353812991_a2d2177b1564a8a388a01c8188fca9dc.jpg', 'extension': 'jpg'}, 1353813416: {'path': 'temp/1745593502_2200723_1353813416_ce4608623166867fccc78a395e747520.jpg', 'extension': 'jpg'}, 1353813444: {'path': 'temp/1745593502_2200723_1353813444_98b946506e9514db7f88202ba52b2ccd.jpg', 'extension': 'jpg'}, 1353812820: {'path': 'temp/1745593502_2200723_1353812820_eaf30429cde136e4b74b9b005dea4705.jpg', 'extension': 'jpg'}, 1353812857: {'path': 'temp/1745593502_2200723_1353812857_4341d90c7a4bc86a34ca323bd86a0eb8.jpg', 'extension': 'jpg'}, 1353812874: {'path': 'temp/1745593502_2200723_1353812874_e7adca18f59984a683aa1826fdf1d828.jpg', 'extension': 'jpg'}, 1353811976: {'path': 'temp/1745593502_2200723_1353811976_8a028828007e7fe3d8cd2e58c35f7bcb.jpg', 'extension': 'jpg'}, 1353812637: {'path': 'temp/1745593502_2200723_1353812637_554296341abcb710806d7cd71a832b77.jpg', 'extension': 'jpg'}, 1353812770: {'path': 'temp/1745593502_2200723_1353812770_010578ae62a2164b8cb07c73ab97f317.jpg', 'extension': 'jpg'}, 1353811806: {'path': 'temp/1745593502_2200723_1353811806_1ed2cf8f4b7907b99a87a3eae5e0a115.jpg', 'extension': 'jpg'}, 1353811913: {'path': 'temp/1745593502_2200723_1353811913_185c3d1e6628772e9a78cb37f67a0b9d.jpg', 'extension': 'jpg'}, 1353811946: {'path': 'temp/1745593502_2200723_1353811946_30b40280c8cae545fcb7a7e222532a32.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 = 22442369; (('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 = 22442369 group by h (('17', 13),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22442369 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 (22442369) 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 (22442369) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 25042025 22442369 Nombre de photos uploadées : 13 / 23040 (0%) 25042025 22442369 Nombre de photos taguées (types de déchets): 0 / 13 (0%) 25042025 22442369 Nombre de photos taguées (volume) : 0 / 13 (0%) [{'photo_id': 1353811976, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/25/8a028828007e7fe3d8cd2e58c35f7bcb.jpg', 'username': None, 'uploaded_at': 1745593267, 'text': 'image_25042025_17_00_14_10252.jpg'}, {'photo_id': 1353811946, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/25/30b40280c8cae545fcb7a7e222532a32.jpg', 'username': None, 'uploaded_at': 1745593267, 'text': 'image_25042025_17_00_24_10140.jpg'}, {'photo_id': 1353811913, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/25/185c3d1e6628772e9a78cb37f67a0b9d.jpg', 'username': None, 'uploaded_at': 1745593267, 'text': 'image_25042025_17_00_34_10147.jpg'}, {'photo_id': 1353811806, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/25/1ed2cf8f4b7907b99a87a3eae5e0a115.jpg', 'username': None, 'uploaded_at': 1745593267, 'text': 'image_25042025_17_00_44_10141.jpg'}] 0 [] elapsed_time : load_data_split_time_score 3.337860107421875e-06 elapsed_time : order_list_meta_photo_and_scores 7.152557373046875e-06 ????????????? elapsed_time : fill_and_build_computed_from_old_data 0.000720977783203125 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 22442369, '2025-04-25' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1747621,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.025043010711669922 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= 1747621 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1747621, 'dashboard_run_id': 1757657, 'mtr_portfolio_id': 22440054, 'dashboard_result_id': 10109685, '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_P22440054_25-04-2025_16_32_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 22440096, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22440097, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22440098, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22440099, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22440100, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22440101, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22440102, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22440103, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22440104, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22440105, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22440106, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22440107, 'pht': 3726}}"}, {'dashboat_entry_day': 1747621, 'dashboard_run_id': 1757657, 'mtr_portfolio_id': 22440702, 'dashboard_result_id': 10109686, '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_P22440702_25-04-2025_16_50_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 22440817, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22440818, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22440819, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22440820, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22440821, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22440822, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22440823, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22440824, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22440825, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22440826, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22440827, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22440828, 'pht': 3726}}"}, {'dashboat_entry_day': 1747621, 'dashboard_run_id': 1757657, 'mtr_portfolio_id': 22441671, 'dashboard_result_id': 10109687, '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_P22441671_25-04-2025_17_02_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22441701, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22441702, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22441703, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22441704, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22441705, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22441706, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22441707, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22441708, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22441709, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22441710, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22441711, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22441712, 'pht': 3726}}"}, {'dashboat_entry_day': 1747621, 'dashboard_run_id': 1757657, 'mtr_portfolio_id': 22442369, 'dashboard_result_id': 10109688, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0}"}] SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 22440054 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': 2763173, 'mtr_portfolio_id': 22440054, 'created_at': datetime.datetime(2025, 4, 25, 16, 32, 58), 'result': '0.06426119522104286', 'result_long': None, 'result_double': None}] Qualite : 0.06426119522104286 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22440054 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22440054_25-04-2025_16_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22440054 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_P22440054_25-04-2025_16_32_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 22440096, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22440097, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22440098, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22440099, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22440100, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22440101, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22440102, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22440103, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22440104, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22440105, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22440106, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22440107, 'pht': 3726}}" where mtr_portfolio_id = 22440054 and dashboard_run_id = 1757657 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`=22440054 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10109685, 0.06426119522104286, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22440054_25-04-2025_16_32_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 22440096, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22440097, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22440098, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22440099, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22440100, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22440101, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22440102, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22440103, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22440104, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22440105, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22440106, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22440107, '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 = 22440702 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': 2763237, 'mtr_portfolio_id': 22440702, 'created_at': datetime.datetime(2025, 4, 25, 16, 50, 59), 'result': '0.06318775502169534', 'result_long': None, 'result_double': None}] Qualite : 0.06318775502169534 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22440702 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22440702_25-04-2025_16_50_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22440702 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_P22440702_25-04-2025_16_50_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 22440817, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22440818, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22440819, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22440820, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22440821, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22440822, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22440823, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22440824, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22440825, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22440826, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22440827, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22440828, 'pht': 3726}}" where mtr_portfolio_id = 22440702 and dashboard_run_id = 1757657 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`=22440702 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10109686, 0.06318775502169534, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22440702_25-04-2025_16_50_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 22440817, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22440818, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22440819, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22440820, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22440821, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22440822, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22440823, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22440824, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22440825, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22440826, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22440827, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22440828, '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 = 22441671 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': 2763299, 'mtr_portfolio_id': 22441671, 'created_at': datetime.datetime(2025, 4, 25, 17, 2, 58), 'result': '0.05395903832796529', 'result_long': None, 'result_double': None}] Qualite : 0.05395903832796529 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22441671 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22441671_25-04-2025_17_02_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22441671 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_P22441671_25-04-2025_17_02_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22441701, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22441702, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22441703, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22441704, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22441705, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22441706, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22441707, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22441708, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22441709, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22441710, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22441711, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22441712, 'pht': 3726}}" where mtr_portfolio_id = 22441671 and dashboard_run_id = 1757657 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`=22441671 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10109687, 0.05395903832796529, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22441671_25-04-2025_17_02_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22441701, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22441702, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22441703, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22441704, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22441705, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22441706, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22441707, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22441708, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22441709, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22441710, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22441711, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22441712, '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 = 22442369 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': 2763364, 'mtr_portfolio_id': 22442369, 'created_at': datetime.datetime(2025, 4, 25, 17, 5, 1), 'result': '0.024966648597594114', 'result_long': None, 'result_double': None}] Qualite : 0.024966648597594114 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22442369 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22442369_25-04-2025_17_05_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22442369 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_P22442369_25-04-2025_17_05_02.pdf'}" where mtr_portfolio_id = 22442369 and dashboard_run_id = 1757657 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`=22442369 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10109688, 0.024966648597594114, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22442369_25-04-2025_17_05_02.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22442394, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22442395, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22442396, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22442397, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22442398, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22442399, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22442400, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22442401, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22442402, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22442403, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22442404, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22442405, '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 (22440054,22440702,22441671,22442369) result : ((1353790645,), (1353791533,), (1353791599,), (1353791664,), (1353791695,), (1353792363,), (1353792385,), (1353792418,), (1353792428,), (1353792446,), (1353792555,), (1353792575,), (1353792579,), (1353792599,), (1353792662,), (1353792956,), (1353792987,), (1353793228,), (1353793255,), (1353793278,), (1353793292,), (1353793978,), (1353794059,), (1353794151,), (1353794224,), (1353794302,), (1353794320,), (1353794505,), (1353794510,), (1353794512,), (1353794528,), (1353794580,), (1353794593,), (1353794623,), (1353794675,), (1353794793,), (1353795629,), (1353795667,), (1353795725,), (1353795779,), (1353795793,), (1353796042,), (1353796045,), (1353796076,), (1353796104,), (1353796144,), (1353796673,), (1353796682,), (1353796687,), (1353796723,), (1353796876,), (1353796879,), (1353796883,), (1353796887,), (1353796891,), (1353797395,), (1353797399,), (1353797402,), (1353797405,), (1353797496,), (1353797577,), (1353797680,), (1353797715,), (1353797742,), (1353797771,), (1353798199,), (1353797994,), (1353797999,), (1353798012,), (1353798024,), (1353798064,), (1353798922,), (1353798945,), (1353798948,), (1353799302,), (1353799312,), (1353799317,), (1353799343,), (1353799424,), (1353799451,), (1353799766,), (1353799798,), (1353799952,), (1353800126,), (1353800427,), (1353800442,), (1353800598,), (1353800605,), (1353800621,), (1353801229,), (1353801233,), (1353801237,), (1353801246,), (1353801256,), (1353801263,), (1353801570,), (1353801573,), (1353801622,), (1353801702,), (1353801750,), (1353801805,), (1353801907,), (1353801961,), (1353802520,), (1353802546,), (1353802576,), (1353802608,), (1353802646,), (1353802660,), (1353802792,), (1353802823,), (1353802852,), (1353803178,), (1353803208,), (1353803236,), (1353803264,), (1353803307,), (1353803320,), (1353803696,), (1353803708,), (1353803711,), (1353803712,), (1353803715,), (1353803717,), (1353804018,), (1353804071,), (1353804729,), (1353804652,), (1353804671,), (1353804687,), (1353804689,), (1353804693,), (1353804992,), (1353804995,), (1353804997,), (1353804999,), (1353805040,), (1353805061,), (1353805076,), (1353805092,), (1353805448,), (1353805451,), (1353805460,), (1353805461,), (1353805464,), (1353805652,), (1353805656,), (1353805661,), (1353805669,), (1353805937,), (1353805962,), (1353805991,), (1353806004,), (1353806008,), (1353806027,), (1353806080,), (1353806085,), (1353806088,), (1353806091,), (1353806095,), (1353806098,), (1353806133,), (1353806145,), (1353806152,), (1353806155,), (1353806375,), (1353806418,), (1353806455,), (1353806477,), (1353806496,), (1353806500,), (1353806725,), (1353806732,), (1353806736,), (1353806739,), (1353806742,), (1353806745,), (1353806803,), (1353806806,), (1353806808,), (1353806986,), (1353807010,), (1353807037,), (1353807064,), (1353807560,), (1353807660,), (1353807768,), (1353807877,), (1353807977,), (1353808075,), (1353810221,), (1353810294,), (1353810372,), (1353812007,), (1353811806,), (1353811913,), (1353811946,), (1353811976,), (1353812637,), (1353812770,), (1353812820,), (1353812857,), (1353812874,), (1353812991,), (1353813416,), (1353813444,), (1353813474,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'25042025': {'nb_upload': 13, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22442369]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1353813474, 1353813444, 1353813416, 1353812991, 1353812874, 1353812857, 1353812820, 1353812770, 1353812637, 1353811976, 1353811946, 1353811913, 1353811806] map_info['map_portfolio_photo'] : {22442369: [1353813474, 1353813444, 1353813416, 1353812991, 1353812874, 1353812857, 1353812820, 1353812770, 1353812637, 1353811976, 1353811946, 1353811913, 1353811806]} final : True mtd_id 4302 list_pids : [1353813474, 1353813444, 1353813416, 1353812991, 1353812874, 1353812857, 1353812820, 1353812770, 1353812637, 1353811976, 1353811946, 1353811913, 1353811806] Looping around the photos to save general results len do output : 1 /22442369Didn'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, '2763364') ('4302', '22442369', '1353813474', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353813444', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353813416', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353812991', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353812874', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353812857', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353812820', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353812770', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353812637', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353811976', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353811946', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353811913', None, None, None, None, None, '2763364') ('4302', None, None, None, None, None, None, None, '2763364') ('4302', '22442369', '1353811806', None, None, None, None, None, '2763364') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 14 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '22442369', 'None', None, None, None, None, '2763364'), ('4302', '22442369', '1353813474', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353813444', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353813416', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353812991', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353812874', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353812857', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353812820', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353812770', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353812637', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353811976', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353811946', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353811913', None, None, None, None, None, '2763364'), ('4302', '22442369', '1353811806', None, None, None, None, None, '2763364')] time used for this insertion : 0.01567983627319336 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.3450887203216553 time spend to save output : 0.01594686508178711 total time spend for step 5 : 0.3610355854034424 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 (2763364) 2.35user 2.45system 0:09.58elapsed 50%CPU (0avgtext+0avgdata 160172maxresident)k 35736inputs+7744outputs (160major+75764minor)pagefaults 0swaps