insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22119613 , 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=22119603 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='papier' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22119613) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22119603) result : ((1350399254,), (1350399258,), (1350399267,), (1350399633,), (1350399651,), (1350399694,), (1350399707,), (1350399781,), (1350399793,)) 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 22119614 , 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=22119603 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='metal' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22119614) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22119603) result : ((1350399254,), (1350399258,), (1350399267,), (1350399633,), (1350399651,), (1350399694,), (1350399707,), (1350399781,), (1350399793,)) 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 22119615 , 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=22119603 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 (22119615) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22119603) result : ((1350399254,), (1350399258,), (1350399267,), (1350399633,), (1350399651,), (1350399694,), (1350399707,), (1350399781,), (1350399793,)) 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 22119616 , 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=22119603 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 (22119616) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22119603) result : ((1350399254,), (1350399258,), (1350399267,), (1350399633,), (1350399651,), (1350399694,), (1350399707,), (1350399781,), (1350399793,)) 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`=22119603 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','mal_croppe','Carton_brun','kraft','cartonnette','Carton_gris','Teint_Dans_La_Masse','autre_refus','papier','metal','flou','environnement')) 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`=22119603 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','mal_croppe','Carton_brun','kraft','cartonnette','Carton_gris','Teint_Dans_La_Masse','autre_refus','papier','metal','flou','environnement')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__07042025_20_03_03_10141_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__07042025_20_03_03_10141_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__07042025_20_03_03_10141_4417_Carton_brun_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__07042025_20_03_03_10141_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__07042025_20_03_03_10141_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__07042025_20_03_03_10141_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__07042025_20_03_03_10141_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__07042025_20_03_03_10141_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__07042025_20_03_03_10141_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__07042025_20_03_03_10141_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__07042025_20_03_03_10141_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__07042025_20_03_03_10141_4417_environnement_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)[[22119603, 22119617, 4417, 0.5, 492725882, 979], [22119603, 22119618, 4417, 0.5, 2107755527, 979], [22119603, 22119619, 4417, 0.5, 2107753024, 979], [22119603, 22119620, 4417, 0.5, 493202403, 979], [22119603, 22119621, 4417, 0.5, 702398920, 979], [22119603, 22119622, 4417, 0.5, 2107753020, 979], [22119603, 22119623, 4417, 0.5, 2107752385, 979], [22119603, 22119624, 4417, 0.5, 2107752406, 979], [22119603, 22119625, 4417, 0.5, 492668766, 979], [22119603, 22119626, 4417, 0.5, 492628673, 979], [22119603, 22119627, 4417, 0.5, 492777938, 979], [22119603, 22119628, 4417, 0.5, 493012381, 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`=22119603 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','mal_croppe','Carton_brun','kraft','cartonnette','Carton_gris','Teint_Dans_La_Masse','autre_refus','papier','metal','flou','environnement')) 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`=22119603 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','mal_croppe','Carton_brun','kraft','cartonnette','Carton_gris','Teint_Dans_La_Masse','autre_refus','papier','metal','flou','environnement')) AND mptpi.`min_score`=0.5 To do returned map {'plastique': {'main_port_id': 22119603, 'sub_port_id': 22119617, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14601231, 'last_updated_at': datetime.datetime(2025, 4, 7, 20, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 20, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 20, 6, 57)}, 'mal_croppe': {'main_port_id': 22119603, 'sub_port_id': 22119618, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14601232, 'last_updated_at': datetime.datetime(2025, 4, 7, 20, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 20, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 20, 6, 57)}, 'Carton_brun': {'main_port_id': 22119603, 'sub_port_id': 22119619, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14601233, 'last_updated_at': datetime.datetime(2025, 4, 7, 20, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 20, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 20, 6, 57)}, 'kraft': {'main_port_id': 22119603, 'sub_port_id': 22119620, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14601234, 'last_updated_at': datetime.datetime(2025, 4, 7, 20, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 20, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 20, 6, 57)}, 'cartonnette': {'main_port_id': 22119603, 'sub_port_id': 22119621, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14601235, 'last_updated_at': datetime.datetime(2025, 4, 7, 20, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 20, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 20, 6, 57)}, 'Carton_gris': {'main_port_id': 22119603, 'sub_port_id': 22119622, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14601236, 'last_updated_at': datetime.datetime(2025, 4, 7, 20, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 20, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 20, 6, 57)}, 'Teint_Dans_La_Masse': {'main_port_id': 22119603, 'sub_port_id': 22119623, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14601237, 'last_updated_at': datetime.datetime(2025, 4, 7, 20, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 20, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 20, 6, 57)}, 'autre_refus': {'main_port_id': 22119603, 'sub_port_id': 22119624, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14601238, 'last_updated_at': datetime.datetime(2025, 4, 7, 20, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 20, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 20, 6, 57)}, 'papier': {'main_port_id': 22119603, 'sub_port_id': 22119625, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14601239, 'last_updated_at': datetime.datetime(2025, 4, 7, 20, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 20, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 20, 6, 57)}, 'metal': {'main_port_id': 22119603, 'sub_port_id': 22119626, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14601240, 'last_updated_at': datetime.datetime(2025, 4, 7, 20, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 20, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 20, 6, 57)}, 'flou': {'main_port_id': 22119603, 'sub_port_id': 22119627, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14601241, 'last_updated_at': datetime.datetime(2025, 4, 7, 20, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 20, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 20, 6, 57)}, 'environnement': {'main_port_id': 22119603, 'sub_port_id': 22119628, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14601242, 'last_updated_at': datetime.datetime(2025, 4, 7, 20, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 20, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 20, 6, 57)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22119617,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22119605 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22119618,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22119606 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22119619,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22119607 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22119620,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22119608 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22119621,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22119609 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22119622,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22119610 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22119623,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22119611 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22119624,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22119612 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22119625,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22119613 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22119626,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22119614 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22119627,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22119615 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22119628,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22119616 lien utilise dans velours : https://www.fotonower.com/velours/22119617,22119618,22119619,22119620,22119621,22119622,22119623,22119624,22119625,22119626,22119627,22119628?tags=plastique,mal_croppe,Carton_brun,kraft,cartonnette,Carton_gris,Teint_Dans_La_Masse,autre_refus,papier,metal,flou,environnement After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22119603]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1350399793, 1350399781, 1350399707, 1350399694, 1350399651, 1350399633, 1350399267, 1350399258, 1350399254] map_info['map_portfolio_photo'] : {22119603: [1350399793, 1350399781, 1350399707, 1350399694, 1350399651, 1350399633, 1350399267, 1350399258, 1350399254]} final : False mtd_id 4302 list_pids : [1350399793, 1350399781, 1350399707, 1350399694, 1350399651, 1350399633, 1350399267, 1350399258, 1350399254] Looping around the photos to save general results len do output : 1 /22119603. 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, '2730247') ('4302', '22119603', '1350399793', None, None, None, None, None, '2730247') ('4302', None, None, None, None, None, None, None, '2730247') ('4302', '22119603', '1350399781', None, None, None, None, None, '2730247') ('4302', None, None, None, None, None, None, None, '2730247') ('4302', '22119603', '1350399707', None, None, None, None, None, '2730247') ('4302', None, None, None, None, None, None, None, '2730247') ('4302', '22119603', '1350399694', None, None, None, None, None, '2730247') ('4302', None, None, None, None, None, None, None, '2730247') ('4302', '22119603', '1350399651', None, None, None, None, None, '2730247') ('4302', None, None, None, None, None, None, None, '2730247') ('4302', '22119603', '1350399633', None, None, None, None, None, '2730247') ('4302', None, None, None, None, None, None, None, '2730247') ('4302', '22119603', '1350399267', None, None, None, None, None, '2730247') ('4302', None, None, None, None, None, None, None, '2730247') ('4302', '22119603', '1350399258', None, None, None, None, None, '2730247') ('4302', None, None, None, None, None, None, None, '2730247') ('4302', '22119603', '1350399254', None, None, None, None, None, '2730247') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '22119603', "{'plastique': 22119605, 'mal_croppe': 22119606, 'Carton_brun': 22119607, 'kraft': 22119608, 'cartonnette': 22119609, 'Carton_gris': 22119610, 'Teint_Dans_La_Masse': 22119611, 'autre_refus': 22119612, 'papier': 22119613, 'metal': 22119614, 'flou': 22119615, 'environnement': 22119616}", None, None, None, None, '2730247'), ('4302', '22119603', '1350399793', None, None, None, None, None, '2730247'), ('4302', '22119603', '1350399781', None, None, None, None, None, '2730247'), ('4302', '22119603', '1350399707', None, None, None, None, None, '2730247'), ('4302', '22119603', '1350399694', None, None, None, None, None, '2730247'), ('4302', '22119603', '1350399651', None, None, None, None, None, '2730247'), ('4302', '22119603', '1350399633', None, None, None, None, None, '2730247'), ('4302', '22119603', '1350399267', None, None, None, None, None, '2730247'), ('4302', '22119603', '1350399258', None, None, None, None, None, '2730247'), ('4302', '22119603', '1350399254', None, None, None, None, None, '2730247')] time used for this insertion : 0.01428079605102539 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.095954418182373 time spend to save output : 0.014543294906616211 total time spend for step 1 : 2.1104977130889893 step2:final Mon Apr 7 20:06:57 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 (22119603) 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 22119603 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1350399267,1350399258,1350399254,1350399707,1350399694,1350399651,1350399633,1350399793,1350399781); 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([22119603]) Inside saveOutput : final : False verbose : True original output for save of step final : {1350399793: ('0.028944009898310648',), 1350399781: ('0.028944009898310648',), 1350399707: ('0.028944009898310648',), 1350399694: ('0.028944009898310648',), 1350399651: ('0.028944009898310648',), 1350399633: ('0.028944009898310648',), 1350399267: ('0.028944009898310648',), 1350399258: ('0.028944009898310648',), 1350399254: ('0.028944009898310648',)} new output for save of step final : {1350399793: ('0.028944009898310648',), 1350399781: ('0.028944009898310648',), 1350399707: ('0.028944009898310648',), 1350399694: ('0.028944009898310648',), 1350399651: ('0.028944009898310648',), 1350399633: ('0.028944009898310648',), 1350399267: ('0.028944009898310648',), 1350399258: ('0.028944009898310648',), 1350399254: ('0.028944009898310648',)} [1350399793, 1350399781, 1350399707, 1350399694, 1350399651, 1350399633, 1350399267, 1350399258, 1350399254] map_info['map_portfolio_photo'] : {22119603: [1350399793, 1350399781, 1350399707, 1350399694, 1350399651, 1350399633, 1350399267, 1350399258, 1350399254]} final : False mtd_id 4302 list_pids : [1350399793, 1350399781, 1350399707, 1350399694, 1350399651, 1350399633, 1350399267, 1350399258, 1350399254] Looping around the photos to save general results len do output : 9 /1350399793.Didn't retrieve data . /1350399781.Didn't retrieve data . /1350399707.Didn't retrieve data . /1350399694.Didn't retrieve data . /1350399651.Didn't retrieve data . /1350399633.Didn't retrieve data . /1350399267.Didn't retrieve data . /1350399258.Didn't retrieve data . /1350399254.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, '2730247') ('4302', '22119603', '1350399793', None, None, None, None, None, '2730247') ('4302', None, None, None, None, None, None, None, '2730247') ('4302', '22119603', '1350399781', None, None, None, None, None, '2730247') ('4302', None, None, None, None, None, None, None, '2730247') ('4302', '22119603', '1350399707', None, None, None, None, None, '2730247') ('4302', None, None, None, None, None, None, None, '2730247') ('4302', '22119603', '1350399694', None, None, None, None, None, '2730247') ('4302', None, None, None, None, None, None, None, '2730247') ('4302', '22119603', '1350399651', None, None, None, None, None, '2730247') ('4302', None, None, None, None, None, None, None, '2730247') ('4302', '22119603', '1350399633', None, None, None, None, None, '2730247') ('4302', None, None, None, None, None, None, None, '2730247') ('4302', '22119603', '1350399267', None, None, None, None, None, '2730247') ('4302', None, None, None, None, None, None, None, '2730247') ('4302', '22119603', '1350399258', None, None, None, None, None, '2730247') ('4302', None, None, None, None, None, None, None, '2730247') ('4302', '22119603', '1350399254', None, None, None, None, None, '2730247') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 27 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '22119603', '1350399793', '0.028944009898310648', None, None, None, None, '2730247'), ('4302', '22119603', '1350399781', '0.028944009898310648', None, None, None, None, '2730247'), ('4302', '22119603', '1350399707', '0.028944009898310648', None, None, None, None, '2730247'), ('4302', '22119603', '1350399694', '0.028944009898310648', None, None, None, None, '2730247'), ('4302', '22119603', '1350399651', '0.028944009898310648', None, None, None, None, '2730247'), ('4302', '22119603', '1350399633', '0.028944009898310648', None, None, None, None, '2730247'), ('4302', '22119603', '1350399267', '0.028944009898310648', None, None, None, None, '2730247'), ('4302', '22119603', '1350399258', '0.028944009898310648', None, None, None, None, '2730247'), ('4302', '22119603', '1350399254', '0.028944009898310648', None, None, None, None, '2730247')] time used for this insertion : 0.016777753829956055 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.0286099910736084 time spend to save output : 0.017238378524780273 total time spend for step 2 : 0.04584836959838867 step3:velours_tree Mon Apr 7 20:06:58 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 : {22119603: [{'plastique': 22119605, 'mal_croppe': 22119606, 'Carton_brun': 22119607, 'kraft': 22119608, 'cartonnette': 22119609, 'Carton_gris': 22119610, 'Teint_Dans_La_Masse': 22119611, 'autre_refus': 22119612, 'papier': 22119613, 'metal': 22119614, 'flou': 22119615, 'environnement': 22119616}]} input_args_next_step : {22119603: ()} output_args : {22119603: [{'plastique': 22119605, 'mal_croppe': 22119606, 'Carton_brun': 22119607, 'kraft': 22119608, 'cartonnette': 22119609, 'Carton_gris': 22119610, 'Teint_Dans_La_Masse': 22119611, 'autre_refus': 22119612, 'papier': 22119613, 'metal': 22119614, 'flou': 22119615, 'environnement': 22119616}]} args : 22119603 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 : ({'plastique': 22119605, 'mal_croppe': 22119606, 'Carton_brun': 22119607, 'kraft': 22119608, 'cartonnette': 22119609, 'Carton_gris': 22119610, 'Teint_Dans_La_Masse': 22119611, 'autre_refus': 22119612, 'papier': 22119613, 'metal': 22119614, 'flou': 22119615, 'environnement': 22119616},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22119603) 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([22119603]) 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.3003530502319336 time spend to save output : 6.580352783203125e-05 total time spend for step 3 : 0.3004188537597656 step4:send_mail_cod Mon Apr 7 20:06:58 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 : {1350399793: ('0.028944009898310648',), 1350399781: ('0.028944009898310648',), 1350399707: ('0.028944009898310648',), 1350399694: ('0.028944009898310648',), 1350399651: ('0.028944009898310648',), 1350399633: ('0.028944009898310648',), 1350399267: ('0.028944009898310648',), 1350399258: ('0.028944009898310648',), 1350399254: ('0.028944009898310648',)} input_args_next_step : {1350399793: ()} output_args : {1350399793: ('0.028944009898310648',), 1350399781: ('0.028944009898310648',), 1350399707: ('0.028944009898310648',), 1350399694: ('0.028944009898310648',), 1350399651: ('0.028944009898310648',), 1350399633: ('0.028944009898310648',), 1350399267: ('0.028944009898310648',), 1350399258: ('0.028944009898310648',), 1350399254: ('0.028944009898310648',)} args : 1350399793 depend.output_id : 0 input_args_next_step : {1350399793: ('0.028944009898310648',), 1350399781: ()} output_args : {1350399793: ('0.028944009898310648',), 1350399781: ('0.028944009898310648',), 1350399707: ('0.028944009898310648',), 1350399694: ('0.028944009898310648',), 1350399651: ('0.028944009898310648',), 1350399633: ('0.028944009898310648',), 1350399267: ('0.028944009898310648',), 1350399258: ('0.028944009898310648',), 1350399254: ('0.028944009898310648',)} args : 1350399781 depend.output_id : 0 input_args_next_step : {1350399793: ('0.028944009898310648',), 1350399781: ('0.028944009898310648',), 1350399707: ()} output_args : {1350399793: ('0.028944009898310648',), 1350399781: ('0.028944009898310648',), 1350399707: ('0.028944009898310648',), 1350399694: ('0.028944009898310648',), 1350399651: ('0.028944009898310648',), 1350399633: ('0.028944009898310648',), 1350399267: ('0.028944009898310648',), 1350399258: ('0.028944009898310648',), 1350399254: ('0.028944009898310648',)} args : 1350399707 depend.output_id : 0 input_args_next_step : {1350399793: ('0.028944009898310648',), 1350399781: ('0.028944009898310648',), 1350399707: ('0.028944009898310648',), 1350399694: ()} output_args : {1350399793: ('0.028944009898310648',), 1350399781: ('0.028944009898310648',), 1350399707: ('0.028944009898310648',), 1350399694: ('0.028944009898310648',), 1350399651: ('0.028944009898310648',), 1350399633: ('0.028944009898310648',), 1350399267: ('0.028944009898310648',), 1350399258: ('0.028944009898310648',), 1350399254: ('0.028944009898310648',)} args : 1350399694 depend.output_id : 0 input_args_next_step : {1350399793: ('0.028944009898310648',), 1350399781: ('0.028944009898310648',), 1350399707: ('0.028944009898310648',), 1350399694: ('0.028944009898310648',), 1350399651: ()} output_args : {1350399793: ('0.028944009898310648',), 1350399781: ('0.028944009898310648',), 1350399707: ('0.028944009898310648',), 1350399694: ('0.028944009898310648',), 1350399651: ('0.028944009898310648',), 1350399633: ('0.028944009898310648',), 1350399267: ('0.028944009898310648',), 1350399258: ('0.028944009898310648',), 1350399254: ('0.028944009898310648',)} args : 1350399651 depend.output_id : 0 input_args_next_step : {1350399793: ('0.028944009898310648',), 1350399781: ('0.028944009898310648',), 1350399707: ('0.028944009898310648',), 1350399694: ('0.028944009898310648',), 1350399651: ('0.028944009898310648',), 1350399633: ()} output_args : {1350399793: ('0.028944009898310648',), 1350399781: ('0.028944009898310648',), 1350399707: ('0.028944009898310648',), 1350399694: ('0.028944009898310648',), 1350399651: ('0.028944009898310648',), 1350399633: ('0.028944009898310648',), 1350399267: ('0.028944009898310648',), 1350399258: ('0.028944009898310648',), 1350399254: ('0.028944009898310648',)} args : 1350399633 depend.output_id : 0 input_args_next_step : {1350399793: ('0.028944009898310648',), 1350399781: ('0.028944009898310648',), 1350399707: ('0.028944009898310648',), 1350399694: ('0.028944009898310648',), 1350399651: ('0.028944009898310648',), 1350399633: ('0.028944009898310648',), 1350399267: ()} output_args : {1350399793: ('0.028944009898310648',), 1350399781: ('0.028944009898310648',), 1350399707: ('0.028944009898310648',), 1350399694: ('0.028944009898310648',), 1350399651: ('0.028944009898310648',), 1350399633: ('0.028944009898310648',), 1350399267: ('0.028944009898310648',), 1350399258: ('0.028944009898310648',), 1350399254: ('0.028944009898310648',)} args : 1350399267 depend.output_id : 0 input_args_next_step : {1350399793: ('0.028944009898310648',), 1350399781: ('0.028944009898310648',), 1350399707: ('0.028944009898310648',), 1350399694: ('0.028944009898310648',), 1350399651: ('0.028944009898310648',), 1350399633: ('0.028944009898310648',), 1350399267: ('0.028944009898310648',), 1350399258: ()} output_args : {1350399793: ('0.028944009898310648',), 1350399781: ('0.028944009898310648',), 1350399707: ('0.028944009898310648',), 1350399694: ('0.028944009898310648',), 1350399651: ('0.028944009898310648',), 1350399633: ('0.028944009898310648',), 1350399267: ('0.028944009898310648',), 1350399258: ('0.028944009898310648',), 1350399254: ('0.028944009898310648',)} args : 1350399258 depend.output_id : 0 input_args_next_step : {1350399793: ('0.028944009898310648',), 1350399781: ('0.028944009898310648',), 1350399707: ('0.028944009898310648',), 1350399694: ('0.028944009898310648',), 1350399651: ('0.028944009898310648',), 1350399633: ('0.028944009898310648',), 1350399267: ('0.028944009898310648',), 1350399258: ('0.028944009898310648',), 1350399254: ()} output_args : {1350399793: ('0.028944009898310648',), 1350399781: ('0.028944009898310648',), 1350399707: ('0.028944009898310648',), 1350399694: ('0.028944009898310648',), 1350399651: ('0.028944009898310648',), 1350399633: ('0.028944009898310648',), 1350399267: ('0.028944009898310648',), 1350399258: ('0.028944009898310648',), 1350399254: ('0.028944009898310648',)} args : 1350399254 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 : {22119603: [{'plastique': 22119605, 'mal_croppe': 22119606, 'Carton_brun': 22119607, 'kraft': 22119608, 'cartonnette': 22119609, 'Carton_gris': 22119610, 'Teint_Dans_La_Masse': 22119611, 'autre_refus': 22119612, 'papier': 22119613, 'metal': 22119614, 'flou': 22119615, 'environnement': 22119616}]} input_args_next_step : {1350399793: ('0.028944009898310648',), 1350399781: ('0.028944009898310648',), 1350399707: ('0.028944009898310648',), 1350399694: ('0.028944009898310648',), 1350399651: ('0.028944009898310648',), 1350399633: ('0.028944009898310648',), 1350399267: ('0.028944009898310648',), 1350399258: ('0.028944009898310648',), 1350399254: ('0.028944009898310648',), 22119603: ()} output_args : {22119603: [{'plastique': 22119605, 'mal_croppe': 22119606, 'Carton_brun': 22119607, 'kraft': 22119608, 'cartonnette': 22119609, 'Carton_gris': 22119610, 'Teint_Dans_La_Masse': 22119611, 'autre_refus': 22119612, 'papier': 22119613, 'metal': 22119614, 'flou': 22119615, 'environnement': 22119616}]} args : 22119603 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :10, first value : ('0.028944009898310648',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22119603) 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 (1350399793,1350399781,1350399707,1350399694,1350399651,1350399633,1350399267,1350399258,1350399254) Found this number of photos: 9 ##### Call download_photos : nb_thread : 5 begin to download photo : 1350399254 begin to download photo : 1350399267 begin to download photo : 1350399651 begin to download photo : 1350399707 begin to download photo : 1350399793 download finish for photo 1350399651 begin to download photo : 1350399694 download finish for photo 1350399707 begin to download photo : 1350399781 download finish for photo 1350399793 download finish for photo 1350399267 begin to download photo : 1350399633 download finish for photo 1350399254 begin to download photo : 1350399258 download finish for photo 1350399258 download finish for photo 1350399694 download finish for photo 1350399781 download finish for photo 1350399633 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette221196051744049218/ imagette221196061744049218/ imagette221196081744049218/ length of list_filenames : 9 ; length of list_pids : 9 ; length of list_args : 9 results_Auto_P22119603_07-04-2025_20_06_58.pdf 22119605 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=22119605 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221196051744049218 22119606 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=22119606 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221196061744049218 22119608 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=22119608 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221196081744049218 22119609 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=22119609 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350399774: '1744049128_871023_1350399267_e2bb9821476269427a45c935ff807891_rle_crop_3749459798_0.png', 1350399775: '1744049128_871023_1350399258_787e1e5dd8a90e75c85f781128a207e1_rle_crop_3749459822_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/20be4c630f48e2a30ea2656e25d8ab37_21276940.png change filename to text .imagette221196091744049218/ imagette221196091744049218/1744049128_871023_1350399258_787e1e5dd8a90e75c85f781128a207e1_rle_crop_3749459822_0.png.png imagette221196091744049218/1744049128_871023_1350399267_e2bb9821476269427a45c935ff807891_rle_crop_3749459798_0.png.png imagette221196121744049218/ imagette221196141744049218/ imagette221196151744049218/ imagette221196071744049218/ imagette221196101744049218/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/413afcffa80644067fdd9c65e75acc1e_8719031.png imagette221196091744049218 22119612 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=22119612 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221196121744049218 22119614 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=22119614 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221196141744049218 22119615 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=22119615 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221196151744049218 22119607 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=22119607 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221196071744049218 22119610 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=22119610 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221196101744049218 22119611 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=22119611 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350399771: '1744049128_871023_1350399267_e2bb9821476269427a45c935ff807891_rle_crop_3749459800_0.png', 1350399772: '1744049128_871023_1350399254_c2f4fb100dd8f8406a0a234c30925b79_rle_crop_3749459850_0.png', 1350399773: '1744049128_871023_1350399254_c2f4fb100dd8f8406a0a234c30925b79_rle_crop_3749459852_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/d4231a9cbd75dc3f6edb18c59d09fe5a_22727967.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/a06f0d218de868cf0872288b14d34717_64768225.png change filename to text .imagette221196111744049218/ imagette221196111744049218/1744049128_871023_1350399267_e2bb9821476269427a45c935ff807891_rle_crop_3749459800_0.png.png imagette221196111744049218/1744049128_871023_1350399254_c2f4fb100dd8f8406a0a234c30925b79_rle_crop_3749459852_0.png.png imagette221196111744049218/1744049128_871023_1350399254_c2f4fb100dd8f8406a0a234c30925b79_rle_crop_3749459850_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/dadc18ad097b88bb1fc05ed06abdf3da_54569435.png imagette221196111744049218 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=22119603 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/22119617,22119618,22119619,22119620,22119621,22119622,22119623,22119624,22119625,22119626,22119627,22119628?tags=plastique,mal_croppe,Carton_brun,kraft,cartonnette,Carton_gris,Teint_Dans_La_Masse,autre_refus,papier,metal,flou,environnement your option no_mail is active, we will not send the real mail to your client args[1350399793] : ('0.028944009898310648',) no score found for photo 1350399793 We are sending mail with results at report@fotonower.com args[1350399781] : ('0.028944009898310648',) no score found for photo 1350399781 We are sending mail with results at report@fotonower.com args[1350399707] : ('0.028944009898310648',) no score found for photo 1350399707 We are sending mail with results at report@fotonower.com args[1350399694] : ('0.028944009898310648',) no score found for photo 1350399694 We are sending mail with results at report@fotonower.com args[1350399651] : ('0.028944009898310648',) no score found for photo 1350399651 We are sending mail with results at report@fotonower.com args[1350399633] : ('0.028944009898310648',) no score found for photo 1350399633 We are sending mail with results at report@fotonower.com args[1350399267] : ('0.028944009898310648',) no score found for photo 1350399267 We are sending mail with results at report@fotonower.com args[1350399258] : ('0.028944009898310648',) no score found for photo 1350399258 We are sending mail with results at report@fotonower.com args[1350399254] : ('0.028944009898310648',) no score found for photo 1350399254 We are sending mail with results at report@fotonower.com refus_total : 0.028944009898310648 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=22119603 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_P22119603_07-04-2025_20_06_58.pdf results_Auto_P22119603_07-04-2025_20_06_58.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22119603_07-04-2025_20_06_58.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','22119603','results_Auto_P22119603_07-04-2025_20_06_58.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22119603_07-04-2025_20_06_58.pdf','pdf','','0.1','0.028944009898310648') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22119603]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1350399793, 1350399781, 1350399707, 1350399694, 1350399651, 1350399633, 1350399267, 1350399258, 1350399254] map_info['map_portfolio_photo'] : {22119603: [1350399793, 1350399781, 1350399707, 1350399694, 1350399651, 1350399633, 1350399267, 1350399258, 1350399254]} final : False mtd_id 4302 list_pids : [1350399793, 1350399781, 1350399707, 1350399694, 1350399651, 1350399633, 1350399267, 1350399258, 1350399254] 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, '2730247') ('4302', '22119603', '1350399793', None, None, None, None, None, '2730247') ('4302', None, None, None, None, None, None, None, '2730247') ('4302', '22119603', '1350399781', None, None, None, None, None, '2730247') ('4302', None, None, None, None, None, None, None, '2730247') ('4302', '22119603', '1350399707', None, None, None, None, None, '2730247') ('4302', None, None, None, None, None, None, None, '2730247') ('4302', '22119603', '1350399694', None, None, None, None, None, '2730247') ('4302', None, None, None, None, None, None, None, '2730247') ('4302', '22119603', '1350399651', None, None, None, None, None, '2730247') ('4302', None, None, None, None, None, None, None, '2730247') ('4302', '22119603', '1350399633', None, None, None, None, None, '2730247') ('4302', None, None, None, None, None, None, None, '2730247') ('4302', '22119603', '1350399267', None, None, None, None, None, '2730247') ('4302', None, None, None, None, None, None, None, '2730247') ('4302', '22119603', '1350399258', None, None, None, None, None, '2730247') ('4302', None, None, None, None, None, None, None, '2730247') ('4302', '22119603', '1350399254', None, None, None, None, None, '2730247') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 9 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '22119603', '1350399793', None, None, None, None, None, '2730247'), ('4302', '22119603', '1350399781', None, None, None, None, None, '2730247'), ('4302', '22119603', '1350399707', None, None, None, None, None, '2730247'), ('4302', '22119603', '1350399694', None, None, None, None, None, '2730247'), ('4302', '22119603', '1350399651', None, None, None, None, None, '2730247'), ('4302', '22119603', '1350399633', None, None, None, None, None, '2730247'), ('4302', '22119603', '1350399267', None, None, None, None, None, '2730247'), ('4302', '22119603', '1350399258', None, None, None, None, None, '2730247'), ('4302', '22119603', '1350399254', None, None, None, None, None, '2730247')] time used for this insertion : 0.016800642013549805 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5912184715270996 time spend to save output : 0.01702260971069336 total time spend for step 4 : 1.608241081237793 step5:split_time_score Mon Apr 7 20:06:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['22119603'] 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 : [('22119603',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22119603) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1350399793: {'path': 'temp/1744049218_2131542_1350399793_1e000e0eea46b8c42eb14fcbad50cd66.jpg', 'extension': 'jpg'}, 1350399254: {'path': 'temp/1744049218_2131542_1350399254_c2f4fb100dd8f8406a0a234c30925b79.jpg', 'extension': 'jpg'}, 1350399258: {'path': 'temp/1744049218_2131542_1350399258_787e1e5dd8a90e75c85f781128a207e1.jpg', 'extension': 'jpg'}, 1350399651: {'path': 'temp/1744049218_2131542_1350399651_1d05fb32649daf5778379773fc6d215e.jpg', 'extension': 'jpg'}, 1350399694: {'path': 'temp/1744049218_2131542_1350399694_8ab502e54755b6a29f6ab83c626dd5d9.jpg', 'extension': 'jpg'}, 1350399707: {'path': 'temp/1744049218_2131542_1350399707_86afb32ff149cb211302b3ece0fef9bf.jpg', 'extension': 'jpg'}, 1350399781: {'path': 'temp/1744049218_2131542_1350399781_6bbad8d86902f8bb5238460a471ce464.jpg', 'extension': 'jpg'}, 1350399267: {'path': 'temp/1744049218_2131542_1350399267_e2bb9821476269427a45c935ff807891.jpg', 'extension': 'jpg'}, 1350399633: {'path': 'temp/1744049218_2131542_1350399633_ff7dc21d288bca271992f31a3cdfd9bd.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 = 22119603; (('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 = 22119603 group by h (('20', 9),) 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=22119603 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 (22119603) 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 (22119603) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 07042025 22119603 Nombre de photos uploadées : 9 / 23040 (0%) 07042025 22119603 Nombre de photos taguées (types de déchets): 0 / 9 (0%) 07042025 22119603 Nombre de photos taguées (volume) : 0 / 9 (0%) [{'photo_id': 1350399267, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/e2bb9821476269427a45c935ff807891.jpg', 'username': None, 'uploaded_at': 1744049048, 'text': 'image_07042025_20_03_03_010140m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1350399258, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/787e1e5dd8a90e75c85f781128a207e1.jpg', 'username': None, 'uploaded_at': 1744049048, 'text': 'image_07042025_20_03_13_010142m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1350399254, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/c2f4fb100dd8f8406a0a234c30925b79.jpg', 'username': None, 'uploaded_at': 1744049048, 'text': 'image_07042025_20_03_23_010145m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1350399707, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/86afb32ff149cb211302b3ece0fef9bf.jpg', 'username': None, 'uploaded_at': 1744049108, 'text': 'image_07042025_20_03_44_10141.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.6689300537109375e-06 elapsed_time : order_list_meta_photo_and_scores 5.0067901611328125e-06 ????????? elapsed_time : fill_and_build_computed_from_old_data 0.0005059242248535156 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 22119603, '2025-04-07' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1719143,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.02437591552734375 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= 1719143 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1719143, 'dashboard_run_id': 1729191, 'mtr_portfolio_id': 22117993, 'dashboard_result_id': 9917722, '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_P22117993_07-04-2025_19_33_00.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22117996, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22117997, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22117998, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22117999, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22118000, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22118001, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22118002, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22118003, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22118004, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22118005, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22118006, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22118007, 'pht': 3726}}"}, {'dashboat_entry_day': 1719143, 'dashboard_run_id': 1729191, 'mtr_portfolio_id': 22118404, 'dashboard_result_id': 9917723, '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_P22118404_07-04-2025_19_48_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22118406, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22118407, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22118408, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22118409, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22118410, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22118411, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22118412, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22118413, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22118414, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22118415, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22118416, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22118417, 'pht': 3726}}"}, {'dashboat_entry_day': 1719143, 'dashboard_run_id': 1729191, 'mtr_portfolio_id': 22118961, 'dashboard_result_id': 9917724, '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_P22118961_07-04-2025_20_04_31.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22119012, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22119013, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22119014, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22119015, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22119016, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22119017, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22119018, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22119019, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22119020, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22119021, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22119022, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22119023, 'pht': 3726}}"}, {'dashboat_entry_day': 1719143, 'dashboard_run_id': 1729191, 'mtr_portfolio_id': 22119603, 'dashboard_result_id': 9917725, '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 = 22117993 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': 2730100, 'mtr_portfolio_id': 22117993, 'created_at': datetime.datetime(2025, 4, 7, 19, 32, 59), 'result': '0.05818949852027168', 'result_long': None, 'result_double': None}] Qualite : 0.05818949852027168 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22117993 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22117993_07-04-2025_19_33_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22117993 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_P22117993_07-04-2025_19_33_00.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22117996, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22117997, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22117998, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22117999, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22118000, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22118001, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22118002, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22118003, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22118004, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22118005, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22118006, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22118007, 'pht': 3726}}" where mtr_portfolio_id = 22117993 and dashboard_run_id = 1729191 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`=22117993 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9917722, 0.05818949852027168, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22117993_07-04-2025_19_33_00.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22117996, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22117997, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22117998, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22117999, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22118000, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22118001, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22118002, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22118003, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22118004, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22118005, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22118006, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22118007, '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 = 22118404 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': 2730148, 'mtr_portfolio_id': 22118404, 'created_at': datetime.datetime(2025, 4, 7, 19, 48, 59), 'result': '0.07382460022343797', 'result_long': None, 'result_double': None}] Qualite : 0.07382460022343797 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22118404 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22118404_07-04-2025_19_48_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22118404 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_P22118404_07-04-2025_19_48_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22118406, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22118407, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22118408, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22118409, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22118410, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22118411, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22118412, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22118413, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22118414, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22118415, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22118416, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22118417, 'pht': 3726}}" where mtr_portfolio_id = 22118404 and dashboard_run_id = 1729191 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`=22118404 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9917723, 0.07382460022343797, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22118404_07-04-2025_19_48_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22118406, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22118407, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22118408, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22118409, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22118410, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22118411, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22118412, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22118413, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22118414, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22118415, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22118416, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22118417, '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 = 22118961 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': 2730185, 'mtr_portfolio_id': 22118961, 'created_at': datetime.datetime(2025, 4, 7, 20, 4, 30), 'result': '0.047790102222747016', 'result_long': None, 'result_double': None}] Qualite : 0.047790102222747016 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22118961 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22118961_07-04-2025_20_04_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22118961 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_P22118961_07-04-2025_20_04_31.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22119012, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22119013, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22119014, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22119015, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22119016, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22119017, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22119018, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22119019, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22119020, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22119021, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22119022, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22119023, 'pht': 3726}}" where mtr_portfolio_id = 22118961 and dashboard_run_id = 1729191 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`=22118961 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9917724, 0.047790102222747016, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22118961_07-04-2025_20_04_31.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22119012, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22119013, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22119014, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22119015, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22119016, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22119017, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22119018, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22119019, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22119020, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22119021, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22119022, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22119023, '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 = 22119603 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': 2730247, 'mtr_portfolio_id': 22119603, 'created_at': datetime.datetime(2025, 4, 7, 20, 6, 58), 'result': '0.028944009898310648', 'result_long': None, 'result_double': None}] Qualite : 0.028944009898310648 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22119603 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22119603_07-04-2025_20_06_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22119603 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_P22119603_07-04-2025_20_06_58.pdf'}" where mtr_portfolio_id = 22119603 and dashboard_run_id = 1729191 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`=22119603 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9917725, 0.028944009898310648, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22119603_07-04-2025_20_06_58.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22119605, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22119606, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22119607, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22119608, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22119609, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22119610, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22119611, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22119612, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22119613, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22119614, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22119615, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22119616, '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 (22117993,22118404,22118961,22119603) result : ((1350388323,), (1350388332,), (1350388335,), (1350388530,), (1350388572,), (1350388581,), (1350388762,), (1350388768,), (1350388779,), (1350388791,), (1350388794,), (1350388934,), (1350388956,), (1350388973,), (1350389059,), (1350389093,), (1350389108,), (1350389251,), (1350389252,), (1350389254,), (1350389257,), (1350389314,), (1350389320,), (1350389826,), (1350389842,), (1350390060,), (1350390086,), (1350390276,), (1350390427,), (1350390470,), (1350390473,), (1350390696,), (1350390699,), (1350390701,), (1350390703,), (1350390715,), (1350390721,), (1350390751,), (1350390768,), (1350390786,), (1350390793,), (1350391000,), (1350390925,), (1350390955,), (1350390982,), (1350390993,), (1350390997,), (1350391033,), (1350391044,), (1350391054,), (1350391068,), (1350391084,), (1350391144,), (1350391146,), (1350391148,), (1350391151,), (1350391155,), (1350391237,), (1350391289,), (1350391327,), (1350391358,), (1350391381,), (1350391542,), (1350391547,), (1350391552,), (1350391556,), (1350391623,), (1350391626,), (1350391631,), (1350391635,), (1350391638,), (1350391641,), (1350391685,), (1350391688,), (1350391692,), (1350391865,), (1350391909,), (1350391917,), (1350391920,), (1350391925,), (1350391930,), (1350392052,), (1350392056,), (1350392059,), (1350392068,), (1350392151,), (1350392276,), (1350392290,), (1350392313,), (1350392343,), (1350392372,), (1350392457,), (1350392459,), (1350392464,), (1350392468,), (1350392472,), (1350392849,), (1350392900,), (1350392946,), (1350393094,), (1350393130,), (1350393314,), (1350393323,), (1350393328,), (1350393382,), (1350393386,), (1350393390,), (1350393395,), (1350393398,), (1350393544,), (1350393495,), (1350393529,), (1350393535,), (1350393709,), (1350393712,), (1350393715,), (1350393751,), (1350393796,), (1350393809,), (1350393887,), (1350393890,), (1350393894,), (1350393899,), (1350394031,), (1350394038,), (1350394056,), (1350394342,), (1350394347,), (1350394350,), (1350394397,), (1350394402,), (1350394405,), (1350394408,), (1350394412,), (1350394418,), (1350394571,), (1350394576,), (1350394582,), (1350394592,), (1350394655,), (1350394746,), (1350394800,), (1350394805,), (1350394811,), (1350394887,), (1350394892,), (1350394895,), (1350394898,), (1350394942,), (1350395015,), (1350395061,), (1350395064,), (1350395078,), (1350395107,), (1350395227,), (1350395230,), (1350395233,), (1350395236,), (1350395299,), (1350395304,), (1350395707,), (1350395731,), (1350395737,), (1350395760,), (1350395782,), (1350396406,), (1350396457,), (1350399294,), (1350399254,), (1350399258,), (1350399267,), (1350399633,), (1350399651,), (1350399694,), (1350399707,), (1350399781,), (1350399793,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'07042025': {'nb_upload': 9, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22119603]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1350399793, 1350399781, 1350399707, 1350399694, 1350399651, 1350399633, 1350399267, 1350399258, 1350399254] map_info['map_portfolio_photo'] : {22119603: [1350399793, 1350399781, 1350399707, 1350399694, 1350399651, 1350399633, 1350399267, 1350399258, 1350399254]} final : True mtd_id 4302 list_pids : [1350399793, 1350399781, 1350399707, 1350399694, 1350399651, 1350399633, 1350399267, 1350399258, 1350399254] Looping around the photos to save general results len do output : 1 /22119603Didn'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, '2730247') ('4302', '22119603', '1350399793', None, None, None, None, None, '2730247') ('4302', None, None, None, None, None, None, None, '2730247') ('4302', '22119603', '1350399781', None, None, None, None, None, '2730247') ('4302', None, None, None, None, None, None, None, '2730247') ('4302', '22119603', '1350399707', None, None, None, None, None, '2730247') ('4302', None, None, None, None, None, None, None, '2730247') ('4302', '22119603', '1350399694', None, None, None, None, None, '2730247') ('4302', None, None, None, None, None, None, None, '2730247') ('4302', '22119603', '1350399651', None, None, None, None, None, '2730247') ('4302', None, None, None, None, None, None, None, '2730247') ('4302', '22119603', '1350399633', None, None, None, None, None, '2730247') ('4302', None, None, None, None, None, None, None, '2730247') ('4302', '22119603', '1350399267', None, None, None, None, None, '2730247') ('4302', None, None, None, None, None, None, None, '2730247') ('4302', '22119603', '1350399258', None, None, None, None, None, '2730247') ('4302', None, None, None, None, None, None, None, '2730247') ('4302', '22119603', '1350399254', None, None, None, None, None, '2730247') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '22119603', 'None', None, None, None, None, '2730247'), ('4302', '22119603', '1350399793', None, None, None, None, None, '2730247'), ('4302', '22119603', '1350399781', None, None, None, None, None, '2730247'), ('4302', '22119603', '1350399707', None, None, None, None, None, '2730247'), ('4302', '22119603', '1350399694', None, None, None, None, None, '2730247'), ('4302', '22119603', '1350399651', None, None, None, None, None, '2730247'), ('4302', '22119603', '1350399633', None, None, None, None, None, '2730247'), ('4302', '22119603', '1350399267', None, None, None, None, None, '2730247'), ('4302', '22119603', '1350399258', None, None, None, None, None, '2730247'), ('4302', '22119603', '1350399254', None, None, None, None, None, '2730247')] time used for this insertion : 0.017215251922607422 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.32541465759277344 time spend to save output : 0.01743006706237793 total time spend for step 5 : 0.34284472465515137 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 (2730247) 2.01user 2.35system 0:06.07elapsed 71%CPU (0avgtext+0avgdata 159672maxresident)k 4920inputs+5800outputs (19major+64184minor)pagefaults 0swaps