SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21916470) result : ((1349042725,), (1349042728,), (1349042733,), (1349042794,), (1349042798,), (1349042814,), (1349042829,), (1349043018,), (1349043075,), (1349043102,), (1349043128,), (1349043172,), (1349043175,), (1349043177,), (1349043181,)) 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 21916476 , 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=21916470 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='Carton_gris' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21916476) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21916470) result : ((1349042725,), (1349042728,), (1349042733,), (1349042794,), (1349042798,), (1349042814,), (1349042829,), (1349043018,), (1349043075,), (1349043102,), (1349043128,), (1349043172,), (1349043175,), (1349043177,), (1349043181,)) 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 21916477 , 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=21916470 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='Teint_Dans_La_Masse' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21916477) result : ((1349043152,), (1349043155,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21916470) result : ((1349042725,), (1349042728,), (1349042733,), (1349042794,), (1349042798,), (1349042814,), (1349042829,), (1349043018,), (1349043075,), (1349043102,), (1349043128,), (1349043172,), (1349043175,), (1349043177,), (1349043181,)) 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 21916478 , 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=21916470 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 (21916478) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21916470) result : ((1349042725,), (1349042728,), (1349042733,), (1349042794,), (1349042798,), (1349042814,), (1349042829,), (1349043018,), (1349043075,), (1349043102,), (1349043128,), (1349043172,), (1349043175,), (1349043177,), (1349043181,)) 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 21916479 , 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=21916470 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 (21916479) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21916470) result : ((1349042725,), (1349042728,), (1349042733,), (1349042794,), (1349042798,), (1349042814,), (1349042829,), (1349043018,), (1349043075,), (1349043102,), (1349043128,), (1349043172,), (1349043175,), (1349043177,), (1349043181,)) 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 21916480 , 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=21916470 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='mal_croppe' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21916480) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21916470) result : ((1349042725,), (1349042728,), (1349042733,), (1349042794,), (1349042798,), (1349042814,), (1349042829,), (1349043018,), (1349043075,), (1349043102,), (1349043128,), (1349043172,), (1349043175,), (1349043177,), (1349043181,)) 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 21916481 , 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=21916470 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 (21916481) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21916470) result : ((1349042725,), (1349042728,), (1349042733,), (1349042794,), (1349042798,), (1349042814,), (1349042829,), (1349043018,), (1349043075,), (1349043102,), (1349043128,), (1349043172,), (1349043175,), (1349043177,), (1349043181,)) 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 21916482 , 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=21916470 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='plastique' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21916482) result : ((1349043157,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21916470) result : ((1349042725,), (1349042728,), (1349042733,), (1349042794,), (1349042798,), (1349042814,), (1349042829,), (1349043018,), (1349043075,), (1349043102,), (1349043128,), (1349043172,), (1349043175,), (1349043177,), (1349043181,)) 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 21916483 , 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=21916470 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='Carton_brun' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21916483) result : ((1349043156,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21916470) result : ((1349042725,), (1349042728,), (1349042733,), (1349042794,), (1349042798,), (1349042814,), (1349042829,), (1349043018,), (1349043075,), (1349043102,), (1349043128,), (1349043172,), (1349043175,), (1349043177,), (1349043181,)) 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 21916484 , 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=21916470 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='kraft' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21916484) result : ((1349043160,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21916470) result : ((1349042725,), (1349042728,), (1349042733,), (1349042794,), (1349042798,), (1349042814,), (1349042829,), (1349043018,), (1349043075,), (1349043102,), (1349043128,), (1349043172,), (1349043175,), (1349043177,), (1349043181,)) 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`=21916470 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','flou','cartonnette','Carton_gris','Teint_Dans_La_Masse','environnement','papier','mal_croppe','metal','plastique','Carton_brun','kraft')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21916470 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','flou','cartonnette','Carton_gris','Teint_Dans_La_Masse','environnement','papier','mal_croppe','metal','plastique','Carton_brun','kraft')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__31032025_17_15_44_010138_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__31032025_17_15_44_010138_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__31032025_17_15_44_010138_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__31032025_17_15_44_010138_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__31032025_17_15_44_010138_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__31032025_17_15_44_010138_4417_environnement_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__31032025_17_15_44_010138_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__31032025_17_15_44_010138_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__31032025_17_15_44_010138_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__31032025_17_15_44_010138_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__31032025_17_15_44_010138_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__31032025_17_15_44_010138_4417_kraft_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio INSERT IGNORE INTO MTRPhoto.mtr_port_to_port_ids (`mtr_portfolio_id_1`, `mtr_portfolio_id_2`, `type`, `min_score`, `hashtag_id`, `mtr_user_id`) VALUES (%s,%s,%s,%s,%s,%s)[[21916470, 21916485, 4417, 0.5, 2107752406, 979], [21916470, 21916486, 4417, 0.5, 492777938, 979], [21916470, 21916487, 4417, 0.5, 702398920, 979], [21916470, 21916488, 4417, 0.5, 2107753020, 979], [21916470, 21916489, 4417, 0.5, 2107752385, 979], [21916470, 21916490, 4417, 0.5, 493012381, 979], [21916470, 21916491, 4417, 0.5, 492668766, 979], [21916470, 21916492, 4417, 0.5, 2107755527, 979], [21916470, 21916493, 4417, 0.5, 492628673, 979], [21916470, 21916494, 4417, 0.5, 492725882, 979], [21916470, 21916495, 4417, 0.5, 2107753024, 979], [21916470, 21916496, 4417, 0.5, 493202403, 979]] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21916470 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','flou','cartonnette','Carton_gris','Teint_Dans_La_Masse','environnement','papier','mal_croppe','metal','plastique','Carton_brun','kraft')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21916470 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','flou','cartonnette','Carton_gris','Teint_Dans_La_Masse','environnement','papier','mal_croppe','metal','plastique','Carton_brun','kraft')) AND mptpi.`min_score`=0.5 To do returned map {'autre_refus': {'main_port_id': 21916470, 'sub_port_id': 21916485, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14422497, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 21, 1), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 21, 1), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 21, 1)}, 'flou': {'main_port_id': 21916470, 'sub_port_id': 21916486, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14422498, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 21, 1), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 21, 1), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 21, 1)}, 'cartonnette': {'main_port_id': 21916470, 'sub_port_id': 21916487, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14422499, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 21, 1), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 21, 1), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 21, 1)}, 'Carton_gris': {'main_port_id': 21916470, 'sub_port_id': 21916488, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14422500, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 21, 1), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 21, 1), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 21, 1)}, 'Teint_Dans_La_Masse': {'main_port_id': 21916470, 'sub_port_id': 21916489, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14422501, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 21, 1), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 21, 1), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 21, 1)}, 'environnement': {'main_port_id': 21916470, 'sub_port_id': 21916490, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14422502, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 21, 1), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 21, 1), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 21, 1)}, 'papier': {'main_port_id': 21916470, 'sub_port_id': 21916491, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14422503, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 21, 1), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 21, 1), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 21, 1)}, 'mal_croppe': {'main_port_id': 21916470, 'sub_port_id': 21916492, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14422504, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 21, 1), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 21, 1), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 21, 1)}, 'metal': {'main_port_id': 21916470, 'sub_port_id': 21916493, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14422505, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 21, 1), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 21, 1), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 21, 1)}, 'plastique': {'main_port_id': 21916470, 'sub_port_id': 21916494, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14422506, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 21, 1), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 21, 1), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 21, 1)}, 'Carton_brun': {'main_port_id': 21916470, 'sub_port_id': 21916495, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14422507, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 21, 1), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 21, 1), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 21, 1)}, 'kraft': {'main_port_id': 21916470, 'sub_port_id': 21916496, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14422508, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 21, 1), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 21, 1), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 21, 1)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21916485,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21916473 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21916486,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21916474 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21916487,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21916475 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21916488,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21916476 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21916489,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21916477 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21916490,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21916478 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21916491,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21916479 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21916492,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21916480 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21916493,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21916481 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21916494,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21916482 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21916495,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21916483 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21916496,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21916484 lien utilise dans velours : https://www.fotonower.com/velours/21916485,21916486,21916487,21916488,21916489,21916490,21916491,21916492,21916493,21916494,21916495,21916496?tags=autre_refus,flou,cartonnette,Carton_gris,Teint_Dans_La_Masse,environnement,papier,mal_croppe,metal,plastique,Carton_brun,kraft After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21916470]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1349043181, 1349043177, 1349043175, 1349043172, 1349043128, 1349043102, 1349043075, 1349043018, 1349042829, 1349042814, 1349042798, 1349042794, 1349042733, 1349042728, 1349042725] map_info['map_portfolio_photo'] : {21916470: [1349043181, 1349043177, 1349043175, 1349043172, 1349043128, 1349043102, 1349043075, 1349043018, 1349042829, 1349042814, 1349042798, 1349042794, 1349042733, 1349042728, 1349042725]} final : False mtd_id 4302 list_pids : [1349043181, 1349043177, 1349043175, 1349043172, 1349043128, 1349043102, 1349043075, 1349043018, 1349042829, 1349042814, 1349042798, 1349042794, 1349042733, 1349042728, 1349042725] Looping around the photos to save general results len do output : 1 /21916470. 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, '2709825') ('4302', '21916470', '1349043181', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349043177', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349043175', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349043172', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349043128', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349043102', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349043075', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349043018', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349042829', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349042814', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349042798', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349042794', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349042733', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349042728', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349042725', None, None, None, None, None, '2709825') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 16 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '21916470', "{'autre_refus': 21916473, 'flou': 21916474, 'cartonnette': 21916475, 'Carton_gris': 21916476, 'Teint_Dans_La_Masse': 21916477, 'environnement': 21916478, 'papier': 21916479, 'mal_croppe': 21916480, 'metal': 21916481, 'plastique': 21916482, 'Carton_brun': 21916483, 'kraft': 21916484}", None, None, None, None, '2709825'), ('4302', '21916470', '1349043181', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349043177', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349043175', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349043172', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349043128', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349043102', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349043075', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349043018', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349042829', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349042814', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349042798', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349042794', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349042733', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349042728', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349042725', None, None, None, None, None, '2709825')] time used for this insertion : 0.015009403228759766 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.5155465602874756 time spend to save output : 0.015371561050415039 total time spend for step 1 : 2.5309181213378906 step2:final Mon Mar 31 17:21:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21916470) 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 21916470 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1349042733,1349042728,1349042725,1349042829,1349042814,1349042798,1349042794,1349043128,1349043102,1349043075,1349043018,1349043181,1349043177,1349043175,1349043172); 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([21916470]) Inside saveOutput : final : False verbose : True original output for save of step final : {1349043181: ('0.02756543257924048',), 1349043177: ('0.02756543257924048',), 1349043175: ('0.02756543257924048',), 1349043172: ('0.02756543257924048',), 1349043128: ('0.02756543257924048',), 1349043102: ('0.02756543257924048',), 1349043075: ('0.02756543257924048',), 1349043018: ('0.02756543257924048',), 1349042829: ('0.02756543257924048',), 1349042814: ('0.02756543257924048',), 1349042798: ('0.02756543257924048',), 1349042794: ('0.02756543257924048',), 1349042733: ('0.02756543257924048',), 1349042728: ('0.02756543257924048',), 1349042725: ('0.02756543257924048',)} new output for save of step final : {1349043181: ('0.02756543257924048',), 1349043177: ('0.02756543257924048',), 1349043175: ('0.02756543257924048',), 1349043172: ('0.02756543257924048',), 1349043128: ('0.02756543257924048',), 1349043102: ('0.02756543257924048',), 1349043075: ('0.02756543257924048',), 1349043018: ('0.02756543257924048',), 1349042829: ('0.02756543257924048',), 1349042814: ('0.02756543257924048',), 1349042798: ('0.02756543257924048',), 1349042794: ('0.02756543257924048',), 1349042733: ('0.02756543257924048',), 1349042728: ('0.02756543257924048',), 1349042725: ('0.02756543257924048',)} [1349043181, 1349043177, 1349043175, 1349043172, 1349043128, 1349043102, 1349043075, 1349043018, 1349042829, 1349042814, 1349042798, 1349042794, 1349042733, 1349042728, 1349042725] map_info['map_portfolio_photo'] : {21916470: [1349043181, 1349043177, 1349043175, 1349043172, 1349043128, 1349043102, 1349043075, 1349043018, 1349042829, 1349042814, 1349042798, 1349042794, 1349042733, 1349042728, 1349042725]} final : False mtd_id 4302 list_pids : [1349043181, 1349043177, 1349043175, 1349043172, 1349043128, 1349043102, 1349043075, 1349043018, 1349042829, 1349042814, 1349042798, 1349042794, 1349042733, 1349042728, 1349042725] Looping around the photos to save general results len do output : 15 /1349043181.Didn't retrieve data . /1349043177.Didn't retrieve data . /1349043175.Didn't retrieve data . /1349043172.Didn't retrieve data . /1349043128.Didn't retrieve data . /1349043102.Didn't retrieve data . /1349043075.Didn't retrieve data . /1349043018.Didn't retrieve data . /1349042829.Didn't retrieve data . /1349042814.Didn't retrieve data . /1349042798.Didn't retrieve data . /1349042794.Didn't retrieve data . /1349042733.Didn't retrieve data . /1349042728.Didn't retrieve data . /1349042725.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, '2709825') ('4302', '21916470', '1349043181', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349043177', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349043175', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349043172', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349043128', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349043102', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349043075', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349043018', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349042829', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349042814', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349042798', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349042794', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349042733', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349042728', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349042725', None, None, None, None, None, '2709825') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 45 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '21916470', '1349043181', '0.02756543257924048', None, None, None, None, '2709825'), ('4302', '21916470', '1349043177', '0.02756543257924048', None, None, None, None, '2709825'), ('4302', '21916470', '1349043175', '0.02756543257924048', None, None, None, None, '2709825'), ('4302', '21916470', '1349043172', '0.02756543257924048', None, None, None, None, '2709825'), ('4302', '21916470', '1349043128', '0.02756543257924048', None, None, None, None, '2709825'), ('4302', '21916470', '1349043102', '0.02756543257924048', None, None, None, None, '2709825'), ('4302', '21916470', '1349043075', '0.02756543257924048', None, None, None, None, '2709825'), ('4302', '21916470', '1349043018', '0.02756543257924048', None, None, None, None, '2709825'), ('4302', '21916470', '1349042829', '0.02756543257924048', None, None, None, None, '2709825'), ('4302', '21916470', '1349042814', '0.02756543257924048', None, None, None, None, '2709825'), ('4302', '21916470', '1349042798', '0.02756543257924048', None, None, None, None, '2709825'), ('4302', '21916470', '1349042794', '0.02756543257924048', None, None, None, None, '2709825'), ('4302', '21916470', '1349042733', '0.02756543257924048', None, None, None, None, '2709825'), ('4302', '21916470', '1349042728', '0.02756543257924048', None, None, None, None, '2709825'), ('4302', '21916470', '1349042725', '0.02756543257924048', None, None, None, None, '2709825')] time used for this insertion : 0.013387680053710938 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.0290067195892334 time spend to save output : 0.01401662826538086 total time spend for step 2 : 0.04302334785461426 step3:velours_tree Mon Mar 31 17:21:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {21916470: [{'autre_refus': 21916473, 'flou': 21916474, 'cartonnette': 21916475, 'Carton_gris': 21916476, 'Teint_Dans_La_Masse': 21916477, 'environnement': 21916478, 'papier': 21916479, 'mal_croppe': 21916480, 'metal': 21916481, 'plastique': 21916482, 'Carton_brun': 21916483, 'kraft': 21916484}]} input_args_next_step : {21916470: ()} output_args : {21916470: [{'autre_refus': 21916473, 'flou': 21916474, 'cartonnette': 21916475, 'Carton_gris': 21916476, 'Teint_Dans_La_Masse': 21916477, 'environnement': 21916478, 'papier': 21916479, 'mal_croppe': 21916480, 'metal': 21916481, 'plastique': 21916482, 'Carton_brun': 21916483, 'kraft': 21916484}]} args : 21916470 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 : ({'autre_refus': 21916473, 'flou': 21916474, 'cartonnette': 21916475, 'Carton_gris': 21916476, 'Teint_Dans_La_Masse': 21916477, 'environnement': 21916478, 'papier': 21916479, 'mal_croppe': 21916480, 'metal': 21916481, 'plastique': 21916482, 'Carton_brun': 21916483, 'kraft': 21916484},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21916470) 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([21916470]) 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.359877347946167 time spend to save output : 7.414817810058594e-05 total time spend for step 3 : 0.3599514961242676 step4:send_mail_cod Mon Mar 31 17:21:02 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1349043181: ('0.02756543257924048',), 1349043177: ('0.02756543257924048',), 1349043175: ('0.02756543257924048',), 1349043172: ('0.02756543257924048',), 1349043128: ('0.02756543257924048',), 1349043102: ('0.02756543257924048',), 1349043075: ('0.02756543257924048',), 1349043018: ('0.02756543257924048',), 1349042829: ('0.02756543257924048',), 1349042814: ('0.02756543257924048',), 1349042798: ('0.02756543257924048',), 1349042794: ('0.02756543257924048',), 1349042733: ('0.02756543257924048',), 1349042728: ('0.02756543257924048',), 1349042725: ('0.02756543257924048',)} input_args_next_step : {1349043181: ()} output_args : {1349043181: ('0.02756543257924048',), 1349043177: ('0.02756543257924048',), 1349043175: ('0.02756543257924048',), 1349043172: ('0.02756543257924048',), 1349043128: ('0.02756543257924048',), 1349043102: ('0.02756543257924048',), 1349043075: ('0.02756543257924048',), 1349043018: ('0.02756543257924048',), 1349042829: ('0.02756543257924048',), 1349042814: ('0.02756543257924048',), 1349042798: ('0.02756543257924048',), 1349042794: ('0.02756543257924048',), 1349042733: ('0.02756543257924048',), 1349042728: ('0.02756543257924048',), 1349042725: ('0.02756543257924048',)} args : 1349043181 depend.output_id : 0 input_args_next_step : {1349043181: ('0.02756543257924048',), 1349043177: ()} output_args : {1349043181: ('0.02756543257924048',), 1349043177: ('0.02756543257924048',), 1349043175: ('0.02756543257924048',), 1349043172: ('0.02756543257924048',), 1349043128: ('0.02756543257924048',), 1349043102: ('0.02756543257924048',), 1349043075: ('0.02756543257924048',), 1349043018: ('0.02756543257924048',), 1349042829: ('0.02756543257924048',), 1349042814: ('0.02756543257924048',), 1349042798: ('0.02756543257924048',), 1349042794: ('0.02756543257924048',), 1349042733: ('0.02756543257924048',), 1349042728: ('0.02756543257924048',), 1349042725: ('0.02756543257924048',)} args : 1349043177 depend.output_id : 0 input_args_next_step : {1349043181: ('0.02756543257924048',), 1349043177: ('0.02756543257924048',), 1349043175: ()} output_args : {1349043181: ('0.02756543257924048',), 1349043177: ('0.02756543257924048',), 1349043175: ('0.02756543257924048',), 1349043172: ('0.02756543257924048',), 1349043128: ('0.02756543257924048',), 1349043102: ('0.02756543257924048',), 1349043075: ('0.02756543257924048',), 1349043018: ('0.02756543257924048',), 1349042829: ('0.02756543257924048',), 1349042814: ('0.02756543257924048',), 1349042798: ('0.02756543257924048',), 1349042794: ('0.02756543257924048',), 1349042733: ('0.02756543257924048',), 1349042728: ('0.02756543257924048',), 1349042725: ('0.02756543257924048',)} args : 1349043175 depend.output_id : 0 input_args_next_step : {1349043181: ('0.02756543257924048',), 1349043177: ('0.02756543257924048',), 1349043175: ('0.02756543257924048',), 1349043172: ()} output_args : {1349043181: ('0.02756543257924048',), 1349043177: ('0.02756543257924048',), 1349043175: ('0.02756543257924048',), 1349043172: ('0.02756543257924048',), 1349043128: ('0.02756543257924048',), 1349043102: ('0.02756543257924048',), 1349043075: ('0.02756543257924048',), 1349043018: ('0.02756543257924048',), 1349042829: ('0.02756543257924048',), 1349042814: ('0.02756543257924048',), 1349042798: ('0.02756543257924048',), 1349042794: ('0.02756543257924048',), 1349042733: ('0.02756543257924048',), 1349042728: ('0.02756543257924048',), 1349042725: ('0.02756543257924048',)} args : 1349043172 depend.output_id : 0 input_args_next_step : {1349043181: ('0.02756543257924048',), 1349043177: ('0.02756543257924048',), 1349043175: ('0.02756543257924048',), 1349043172: ('0.02756543257924048',), 1349043128: ()} output_args : {1349043181: ('0.02756543257924048',), 1349043177: ('0.02756543257924048',), 1349043175: ('0.02756543257924048',), 1349043172: ('0.02756543257924048',), 1349043128: ('0.02756543257924048',), 1349043102: ('0.02756543257924048',), 1349043075: ('0.02756543257924048',), 1349043018: ('0.02756543257924048',), 1349042829: ('0.02756543257924048',), 1349042814: ('0.02756543257924048',), 1349042798: ('0.02756543257924048',), 1349042794: ('0.02756543257924048',), 1349042733: ('0.02756543257924048',), 1349042728: ('0.02756543257924048',), 1349042725: ('0.02756543257924048',)} args : 1349043128 depend.output_id : 0 input_args_next_step : {1349043181: ('0.02756543257924048',), 1349043177: ('0.02756543257924048',), 1349043175: ('0.02756543257924048',), 1349043172: ('0.02756543257924048',), 1349043128: ('0.02756543257924048',), 1349043102: ()} output_args : {1349043181: ('0.02756543257924048',), 1349043177: ('0.02756543257924048',), 1349043175: ('0.02756543257924048',), 1349043172: ('0.02756543257924048',), 1349043128: ('0.02756543257924048',), 1349043102: ('0.02756543257924048',), 1349043075: ('0.02756543257924048',), 1349043018: ('0.02756543257924048',), 1349042829: ('0.02756543257924048',), 1349042814: ('0.02756543257924048',), 1349042798: ('0.02756543257924048',), 1349042794: ('0.02756543257924048',), 1349042733: ('0.02756543257924048',), 1349042728: ('0.02756543257924048',), 1349042725: ('0.02756543257924048',)} args : 1349043102 depend.output_id : 0 input_args_next_step : {1349043181: ('0.02756543257924048',), 1349043177: ('0.02756543257924048',), 1349043175: ('0.02756543257924048',), 1349043172: ('0.02756543257924048',), 1349043128: ('0.02756543257924048',), 1349043102: ('0.02756543257924048',), 1349043075: ()} output_args : {1349043181: ('0.02756543257924048',), 1349043177: ('0.02756543257924048',), 1349043175: ('0.02756543257924048',), 1349043172: ('0.02756543257924048',), 1349043128: ('0.02756543257924048',), 1349043102: ('0.02756543257924048',), 1349043075: ('0.02756543257924048',), 1349043018: ('0.02756543257924048',), 1349042829: ('0.02756543257924048',), 1349042814: ('0.02756543257924048',), 1349042798: ('0.02756543257924048',), 1349042794: ('0.02756543257924048',), 1349042733: ('0.02756543257924048',), 1349042728: ('0.02756543257924048',), 1349042725: ('0.02756543257924048',)} args : 1349043075 depend.output_id : 0 input_args_next_step : {1349043181: ('0.02756543257924048',), 1349043177: ('0.02756543257924048',), 1349043175: ('0.02756543257924048',), 1349043172: ('0.02756543257924048',), 1349043128: ('0.02756543257924048',), 1349043102: ('0.02756543257924048',), 1349043075: ('0.02756543257924048',), 1349043018: ()} output_args : {1349043181: ('0.02756543257924048',), 1349043177: ('0.02756543257924048',), 1349043175: ('0.02756543257924048',), 1349043172: ('0.02756543257924048',), 1349043128: ('0.02756543257924048',), 1349043102: ('0.02756543257924048',), 1349043075: ('0.02756543257924048',), 1349043018: ('0.02756543257924048',), 1349042829: ('0.02756543257924048',), 1349042814: ('0.02756543257924048',), 1349042798: ('0.02756543257924048',), 1349042794: ('0.02756543257924048',), 1349042733: ('0.02756543257924048',), 1349042728: ('0.02756543257924048',), 1349042725: ('0.02756543257924048',)} args : 1349043018 depend.output_id : 0 input_args_next_step : {1349043181: ('0.02756543257924048',), 1349043177: ('0.02756543257924048',), 1349043175: ('0.02756543257924048',), 1349043172: ('0.02756543257924048',), 1349043128: ('0.02756543257924048',), 1349043102: ('0.02756543257924048',), 1349043075: ('0.02756543257924048',), 1349043018: ('0.02756543257924048',), 1349042829: ()} output_args : {1349043181: ('0.02756543257924048',), 1349043177: ('0.02756543257924048',), 1349043175: ('0.02756543257924048',), 1349043172: ('0.02756543257924048',), 1349043128: ('0.02756543257924048',), 1349043102: ('0.02756543257924048',), 1349043075: ('0.02756543257924048',), 1349043018: ('0.02756543257924048',), 1349042829: ('0.02756543257924048',), 1349042814: ('0.02756543257924048',), 1349042798: ('0.02756543257924048',), 1349042794: ('0.02756543257924048',), 1349042733: ('0.02756543257924048',), 1349042728: ('0.02756543257924048',), 1349042725: ('0.02756543257924048',)} args : 1349042829 depend.output_id : 0 input_args_next_step : {1349043181: ('0.02756543257924048',), 1349043177: ('0.02756543257924048',), 1349043175: ('0.02756543257924048',), 1349043172: ('0.02756543257924048',), 1349043128: ('0.02756543257924048',), 1349043102: ('0.02756543257924048',), 1349043075: ('0.02756543257924048',), 1349043018: ('0.02756543257924048',), 1349042829: ('0.02756543257924048',), 1349042814: ()} output_args : {1349043181: ('0.02756543257924048',), 1349043177: ('0.02756543257924048',), 1349043175: ('0.02756543257924048',), 1349043172: ('0.02756543257924048',), 1349043128: ('0.02756543257924048',), 1349043102: ('0.02756543257924048',), 1349043075: ('0.02756543257924048',), 1349043018: ('0.02756543257924048',), 1349042829: ('0.02756543257924048',), 1349042814: ('0.02756543257924048',), 1349042798: ('0.02756543257924048',), 1349042794: ('0.02756543257924048',), 1349042733: ('0.02756543257924048',), 1349042728: ('0.02756543257924048',), 1349042725: ('0.02756543257924048',)} args : 1349042814 depend.output_id : 0 input_args_next_step : {1349043181: ('0.02756543257924048',), 1349043177: ('0.02756543257924048',), 1349043175: ('0.02756543257924048',), 1349043172: ('0.02756543257924048',), 1349043128: ('0.02756543257924048',), 1349043102: ('0.02756543257924048',), 1349043075: ('0.02756543257924048',), 1349043018: ('0.02756543257924048',), 1349042829: ('0.02756543257924048',), 1349042814: ('0.02756543257924048',), 1349042798: ()} output_args : {1349043181: ('0.02756543257924048',), 1349043177: ('0.02756543257924048',), 1349043175: ('0.02756543257924048',), 1349043172: ('0.02756543257924048',), 1349043128: ('0.02756543257924048',), 1349043102: ('0.02756543257924048',), 1349043075: ('0.02756543257924048',), 1349043018: ('0.02756543257924048',), 1349042829: ('0.02756543257924048',), 1349042814: ('0.02756543257924048',), 1349042798: ('0.02756543257924048',), 1349042794: ('0.02756543257924048',), 1349042733: ('0.02756543257924048',), 1349042728: ('0.02756543257924048',), 1349042725: ('0.02756543257924048',)} args : 1349042798 depend.output_id : 0 input_args_next_step : {1349043181: ('0.02756543257924048',), 1349043177: ('0.02756543257924048',), 1349043175: ('0.02756543257924048',), 1349043172: ('0.02756543257924048',), 1349043128: ('0.02756543257924048',), 1349043102: ('0.02756543257924048',), 1349043075: ('0.02756543257924048',), 1349043018: ('0.02756543257924048',), 1349042829: ('0.02756543257924048',), 1349042814: ('0.02756543257924048',), 1349042798: ('0.02756543257924048',), 1349042794: ()} output_args : {1349043181: ('0.02756543257924048',), 1349043177: ('0.02756543257924048',), 1349043175: ('0.02756543257924048',), 1349043172: ('0.02756543257924048',), 1349043128: ('0.02756543257924048',), 1349043102: ('0.02756543257924048',), 1349043075: ('0.02756543257924048',), 1349043018: ('0.02756543257924048',), 1349042829: ('0.02756543257924048',), 1349042814: ('0.02756543257924048',), 1349042798: ('0.02756543257924048',), 1349042794: ('0.02756543257924048',), 1349042733: ('0.02756543257924048',), 1349042728: ('0.02756543257924048',), 1349042725: ('0.02756543257924048',)} args : 1349042794 depend.output_id : 0 input_args_next_step : {1349043181: ('0.02756543257924048',), 1349043177: ('0.02756543257924048',), 1349043175: ('0.02756543257924048',), 1349043172: ('0.02756543257924048',), 1349043128: ('0.02756543257924048',), 1349043102: ('0.02756543257924048',), 1349043075: ('0.02756543257924048',), 1349043018: ('0.02756543257924048',), 1349042829: ('0.02756543257924048',), 1349042814: ('0.02756543257924048',), 1349042798: ('0.02756543257924048',), 1349042794: ('0.02756543257924048',), 1349042733: ()} output_args : {1349043181: ('0.02756543257924048',), 1349043177: ('0.02756543257924048',), 1349043175: ('0.02756543257924048',), 1349043172: ('0.02756543257924048',), 1349043128: ('0.02756543257924048',), 1349043102: ('0.02756543257924048',), 1349043075: ('0.02756543257924048',), 1349043018: ('0.02756543257924048',), 1349042829: ('0.02756543257924048',), 1349042814: ('0.02756543257924048',), 1349042798: ('0.02756543257924048',), 1349042794: ('0.02756543257924048',), 1349042733: ('0.02756543257924048',), 1349042728: ('0.02756543257924048',), 1349042725: ('0.02756543257924048',)} args : 1349042733 depend.output_id : 0 input_args_next_step : {1349043181: ('0.02756543257924048',), 1349043177: ('0.02756543257924048',), 1349043175: ('0.02756543257924048',), 1349043172: ('0.02756543257924048',), 1349043128: ('0.02756543257924048',), 1349043102: ('0.02756543257924048',), 1349043075: ('0.02756543257924048',), 1349043018: ('0.02756543257924048',), 1349042829: ('0.02756543257924048',), 1349042814: ('0.02756543257924048',), 1349042798: ('0.02756543257924048',), 1349042794: ('0.02756543257924048',), 1349042733: ('0.02756543257924048',), 1349042728: ()} output_args : {1349043181: ('0.02756543257924048',), 1349043177: ('0.02756543257924048',), 1349043175: ('0.02756543257924048',), 1349043172: ('0.02756543257924048',), 1349043128: ('0.02756543257924048',), 1349043102: ('0.02756543257924048',), 1349043075: ('0.02756543257924048',), 1349043018: ('0.02756543257924048',), 1349042829: ('0.02756543257924048',), 1349042814: ('0.02756543257924048',), 1349042798: ('0.02756543257924048',), 1349042794: ('0.02756543257924048',), 1349042733: ('0.02756543257924048',), 1349042728: ('0.02756543257924048',), 1349042725: ('0.02756543257924048',)} args : 1349042728 depend.output_id : 0 input_args_next_step : {1349043181: ('0.02756543257924048',), 1349043177: ('0.02756543257924048',), 1349043175: ('0.02756543257924048',), 1349043172: ('0.02756543257924048',), 1349043128: ('0.02756543257924048',), 1349043102: ('0.02756543257924048',), 1349043075: ('0.02756543257924048',), 1349043018: ('0.02756543257924048',), 1349042829: ('0.02756543257924048',), 1349042814: ('0.02756543257924048',), 1349042798: ('0.02756543257924048',), 1349042794: ('0.02756543257924048',), 1349042733: ('0.02756543257924048',), 1349042728: ('0.02756543257924048',), 1349042725: ()} output_args : {1349043181: ('0.02756543257924048',), 1349043177: ('0.02756543257924048',), 1349043175: ('0.02756543257924048',), 1349043172: ('0.02756543257924048',), 1349043128: ('0.02756543257924048',), 1349043102: ('0.02756543257924048',), 1349043075: ('0.02756543257924048',), 1349043018: ('0.02756543257924048',), 1349042829: ('0.02756543257924048',), 1349042814: ('0.02756543257924048',), 1349042798: ('0.02756543257924048',), 1349042794: ('0.02756543257924048',), 1349042733: ('0.02756543257924048',), 1349042728: ('0.02756543257924048',), 1349042725: ('0.02756543257924048',)} args : 1349042725 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 : {21916470: [{'autre_refus': 21916473, 'flou': 21916474, 'cartonnette': 21916475, 'Carton_gris': 21916476, 'Teint_Dans_La_Masse': 21916477, 'environnement': 21916478, 'papier': 21916479, 'mal_croppe': 21916480, 'metal': 21916481, 'plastique': 21916482, 'Carton_brun': 21916483, 'kraft': 21916484}]} input_args_next_step : {1349043181: ('0.02756543257924048',), 1349043177: ('0.02756543257924048',), 1349043175: ('0.02756543257924048',), 1349043172: ('0.02756543257924048',), 1349043128: ('0.02756543257924048',), 1349043102: ('0.02756543257924048',), 1349043075: ('0.02756543257924048',), 1349043018: ('0.02756543257924048',), 1349042829: ('0.02756543257924048',), 1349042814: ('0.02756543257924048',), 1349042798: ('0.02756543257924048',), 1349042794: ('0.02756543257924048',), 1349042733: ('0.02756543257924048',), 1349042728: ('0.02756543257924048',), 1349042725: ('0.02756543257924048',), 21916470: ()} output_args : {21916470: [{'autre_refus': 21916473, 'flou': 21916474, 'cartonnette': 21916475, 'Carton_gris': 21916476, 'Teint_Dans_La_Masse': 21916477, 'environnement': 21916478, 'papier': 21916479, 'mal_croppe': 21916480, 'metal': 21916481, 'plastique': 21916482, 'Carton_brun': 21916483, 'kraft': 21916484}]} args : 21916470 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :16, first value : ('0.02756543257924048',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21916470) 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 (1349043181,1349043177,1349043175,1349043172,1349043128,1349043102,1349043075,1349043018,1349042829,1349042814,1349042798,1349042794,1349042733,1349042728,1349042725) Found this number of photos: 15 ##### Call download_photos : nb_thread : 5 begin to download photo : 1349042725 begin to download photo : 1349042798 begin to download photo : 1349043075 begin to download photo : 1349043175 download finish for photo 1349043075 begin to download photo : 1349043102 download finish for photo 1349042798 begin to download photo : 1349042814 download finish for photo 1349042725 begin to download photo : 1349042728 download finish for photo 1349043175 begin to download photo : 1349043177 download finish for photo 1349043102 begin to download photo : 1349043128 download finish for photo 1349042728 begin to download photo : 1349042733 download finish for photo 1349043177 begin to download photo : 1349043181 download finish for photo 1349042814 begin to download photo : 1349042829 download finish for photo 1349043128 begin to download photo : 1349043172 download finish for photo 1349042829 begin to download photo : 1349043018 download finish for photo 1349042733 begin to download photo : 1349042794 download finish for photo 1349043181 download finish for photo 1349043172 download finish for photo 1349043018 download finish for photo 1349042794 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette219164731743434462/ imagette219164741743434462/ length of list_filenames : 15 ; length of list_pids : 15 ; length of list_args : 15 results_Auto_P21916470_31-03-2025_17_21_02.pdf 21916473 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=21916473 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette219164731743434462 21916474 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=21916474 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette219164741743434462 21916475 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=21916475 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349043154: '1743434365_1199806_1349042725_1db010d1ea34b07a382bd0a0566284b3_rle_crop_3741273951_0.png'} change filename to text .imagette219164751743434462/ imagette219164751743434462/1743434365_1199806_1349042725_1db010d1ea34b07a382bd0a0566284b3_rle_crop_3741273951_0.png.png imagette219164801743434462/ imagette219164811743434462/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/eea90a8a9ba5d98009bf8a46374c93ad_48246374.png imagette219164751743434462 21916480 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=21916480 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette219164801743434462 21916481 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=21916481 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette219164811743434462 21916482 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=21916482 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349043157: '1743434366_1176044_1349042794_7989d762e571f06b45f8749c5330dce3_rle_crop_3741273969_0.png'} change filename to text .imagette219164821743434462/ imagette219164821743434462/1743434366_1176044_1349042794_7989d762e571f06b45f8749c5330dce3_rle_crop_3741273969_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/ad2d890517a4b03d7b112a934b3c3173_30656485.png imagette219164821743434462 21916484 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=21916484 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349043160: '1743434365_1199806_1349042728_049e1363b894780004f6b81f2b86b179_rle_crop_3741273936_0.png'} change filename to text .imagette219164841743434462/ imagette219164841743434462/1743434365_1199806_1349042728_049e1363b894780004f6b81f2b86b179_rle_crop_3741273936_0.png.png imagette219164761743434463/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/677230a94f037799288368a61adb8a2f_31182589.png imagette219164841743434462 21916476 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=21916476 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette219164761743434463 21916477 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=21916477 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349043152: '1743434365_1199806_1349042725_1db010d1ea34b07a382bd0a0566284b3_rle_crop_3741273953_0.png', 1349043155: '1743434366_1176044_1349042794_7989d762e571f06b45f8749c5330dce3_rle_crop_3741273976_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/52f088b80440d0c5658f74ab91f0d8cc_84238764.png change filename to text .imagette219164771743434463/ imagette219164771743434463/1743434365_1199806_1349042725_1db010d1ea34b07a382bd0a0566284b3_rle_crop_3741273953_0.png.png imagette219164771743434463/1743434366_1176044_1349042794_7989d762e571f06b45f8749c5330dce3_rle_crop_3741273976_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/05a38c14e5336d3725fbfd3e8215a1bf_83952788.png imagette219164771743434463 21916483 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=21916483 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349043156: '1743434365_1199806_1349042728_049e1363b894780004f6b81f2b86b179_rle_crop_3741273939_0.png'} change filename to text .imagette219164831743434463/ imagette219164831743434463/1743434365_1199806_1349042728_049e1363b894780004f6b81f2b86b179_rle_crop_3741273939_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/10786f46911427e4084f36a5ec130b95_4731154.png imagette219164831743434463 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=21916470 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/21916485,21916486,21916487,21916488,21916489,21916490,21916491,21916492,21916493,21916494,21916495,21916496?tags=autre_refus,flou,cartonnette,Carton_gris,Teint_Dans_La_Masse,environnement,papier,mal_croppe,metal,plastique,Carton_brun,kraft your option no_mail is active, we will not send the real mail to your client args[1349043181] : ('0.02756543257924048',) no score found for photo 1349043181 We are sending mail with results at report@fotonower.com args[1349043177] : ('0.02756543257924048',) no score found for photo 1349043177 We are sending mail with results at report@fotonower.com args[1349043175] : ('0.02756543257924048',) no score found for photo 1349043175 We are sending mail with results at report@fotonower.com args[1349043172] : ('0.02756543257924048',) no score found for photo 1349043172 We are sending mail with results at report@fotonower.com args[1349043128] : ('0.02756543257924048',) no score found for photo 1349043128 We are sending mail with results at report@fotonower.com args[1349043102] : ('0.02756543257924048',) no score found for photo 1349043102 We are sending mail with results at report@fotonower.com args[1349043075] : ('0.02756543257924048',) no score found for photo 1349043075 We are sending mail with results at report@fotonower.com args[1349043018] : ('0.02756543257924048',) no score found for photo 1349043018 We are sending mail with results at report@fotonower.com args[1349042829] : ('0.02756543257924048',) no score found for photo 1349042829 We are sending mail with results at report@fotonower.com args[1349042814] : ('0.02756543257924048',) no score found for photo 1349042814 We are sending mail with results at report@fotonower.com args[1349042798] : ('0.02756543257924048',) no score found for photo 1349042798 We are sending mail with results at report@fotonower.com args[1349042794] : ('0.02756543257924048',) no score found for photo 1349042794 We are sending mail with results at report@fotonower.com args[1349042733] : ('0.02756543257924048',) no score found for photo 1349042733 We are sending mail with results at report@fotonower.com args[1349042728] : ('0.02756543257924048',) no score found for photo 1349042728 We are sending mail with results at report@fotonower.com args[1349042725] : ('0.02756543257924048',) no score found for photo 1349042725 We are sending mail with results at report@fotonower.com refus_total : 0.02756543257924048 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=21916470 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_P21916470_31-03-2025_17_21_02.pdf results_Auto_P21916470_31-03-2025_17_21_02.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21916470_31-03-2025_17_21_02.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','21916470','results_Auto_P21916470_31-03-2025_17_21_02.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21916470_31-03-2025_17_21_02.pdf','pdf','','0.15','0.02756543257924048') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21916470]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1349043181, 1349043177, 1349043175, 1349043172, 1349043128, 1349043102, 1349043075, 1349043018, 1349042829, 1349042814, 1349042798, 1349042794, 1349042733, 1349042728, 1349042725] map_info['map_portfolio_photo'] : {21916470: [1349043181, 1349043177, 1349043175, 1349043172, 1349043128, 1349043102, 1349043075, 1349043018, 1349042829, 1349042814, 1349042798, 1349042794, 1349042733, 1349042728, 1349042725]} final : False mtd_id 4302 list_pids : [1349043181, 1349043177, 1349043175, 1349043172, 1349043128, 1349043102, 1349043075, 1349043018, 1349042829, 1349042814, 1349042798, 1349042794, 1349042733, 1349042728, 1349042725] 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, '2709825') ('4302', '21916470', '1349043181', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349043177', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349043175', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349043172', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349043128', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349043102', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349043075', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349043018', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349042829', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349042814', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349042798', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349042794', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349042733', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349042728', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349042725', None, None, None, None, None, '2709825') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 15 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '21916470', '1349043181', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349043177', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349043175', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349043172', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349043128', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349043102', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349043075', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349043018', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349042829', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349042814', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349042798', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349042794', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349042733', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349042728', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349042725', None, None, None, None, None, '2709825')] time used for this insertion : 0.014729499816894531 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.366105794906616 time spend to save output : 0.015208244323730469 total time spend for step 4 : 2.3813140392303467 step5:split_time_score Mon Mar 31 17:21:04 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['21916470'] 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 : [('21916470',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21916470) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1349043175: {'path': 'temp/1743434462_142320_1349043175_682bc44601a4b9a4118584f30a72fb2a.jpg', 'extension': 'jpg'}, 1349043177: {'path': 'temp/1743434462_142320_1349043177_0302e68ab3ed0dee92e34ffbc4e41aaa.jpg', 'extension': 'jpg'}, 1349043181: {'path': 'temp/1743434462_142320_1349043181_94841709a4b46518937a8ea156b0f0b3.jpg', 'extension': 'jpg'}, 1349043075: {'path': 'temp/1743434462_142320_1349043075_4e35c67c2fb881fc799da93b6a0e14e4.jpg', 'extension': 'jpg'}, 1349043102: {'path': 'temp/1743434462_142320_1349043102_73dff88bf15f32e75284a9a6381d4c85.jpg', 'extension': 'jpg'}, 1349043128: {'path': 'temp/1743434462_142320_1349043128_bfc18b88ccba4f940b16cca1fe30bd5b.jpg', 'extension': 'jpg'}, 1349043172: {'path': 'temp/1743434462_142320_1349043172_d5ef631a1712e9bd3672c6ae24596245.jpg', 'extension': 'jpg'}, 1349042798: {'path': 'temp/1743434462_142320_1349042798_556216aeae044f7911b72945c07fa9e4.jpg', 'extension': 'jpg'}, 1349042814: {'path': 'temp/1743434462_142320_1349042814_5cf63ba8a9e6e57bc54dd4f86bc615f0.jpg', 'extension': 'jpg'}, 1349042829: {'path': 'temp/1743434462_142320_1349042829_84aede5df90a8efed5b8afcccb1564ae.jpg', 'extension': 'jpg'}, 1349043018: {'path': 'temp/1743434462_142320_1349043018_bb20c6d8f888309c794a984f6421d056.jpg', 'extension': 'jpg'}, 1349042725: {'path': 'temp/1743434462_142320_1349042725_1db010d1ea34b07a382bd0a0566284b3.jpg', 'extension': 'jpg'}, 1349042728: {'path': 'temp/1743434462_142320_1349042728_049e1363b894780004f6b81f2b86b179.jpg', 'extension': 'jpg'}, 1349042733: {'path': 'temp/1743434462_142320_1349042733_215b0edd1f6848b9d3e55d1a513100c7.jpg', 'extension': 'jpg'}, 1349042794: {'path': 'temp/1743434462_142320_1349042794_7989d762e571f06b45f8749c5330dce3.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 = 21916470; (('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 = 21916470 group by h (('17', 15),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=21916470 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 (21916470) 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 (21916470) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 31032025 21916470 Nombre de photos uploadées : 15 / 23040 (0%) 31032025 21916470 Nombre de photos taguées (types de déchets): 0 / 15 (0%) 31032025 21916470 Nombre de photos taguées (volume) : 0 / 15 (0%) [{'photo_id': 1349042733, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/215b0edd1f6848b9d3e55d1a513100c7.jpg', 'username': None, 'uploaded_at': 1743434227, 'text': 'image_31032025_17_15_44_10138.jpg'}, {'photo_id': 1349042728, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/049e1363b894780004f6b81f2b86b179.jpg', 'username': None, 'uploaded_at': 1743434227, 'text': 'image_31032025_17_16_04_10142.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1349042725, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/1db010d1ea34b07a382bd0a0566284b3.jpg', 'username': None, 'uploaded_at': 1743434227, 'text': 'image_31032025_17_16_13_9126.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1349042829, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/84aede5df90a8efed5b8afcccb1564ae.jpg', 'username': None, 'uploaded_at': 1743434287, 'text': 'image_31032025_17_16_23_10135.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 3.0994415283203125e-06 elapsed_time : order_list_meta_photo_and_scores 1.1444091796875e-05 ??????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0009171962738037109 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 21916470, '2025-03-31' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1702716,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.022982120513916016 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= 1702716 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1702716, 'dashboard_run_id': 1711861, 'mtr_portfolio_id': 21914431, 'dashboard_result_id': 9763438, '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_P21914431_31-03-2025_16_47_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21914461, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21914462, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21914463, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21914464, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21914465, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21914466, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21914467, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21914468, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21914469, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21914470, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21914471, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21914472, 'pht': 3726}}"}, {'dashboat_entry_day': 1702716, 'dashboard_run_id': 1711861, 'mtr_portfolio_id': 21915225, 'dashboard_result_id': 9763439, '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_P21915225_31-03-2025_17_03_02.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 21915230, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21915231, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21915232, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21915233, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21915234, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21915235, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21915236, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21915237, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21915238, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21915239, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21915240, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21915241, 'pht': 3726}}"}, {'dashboat_entry_day': 1702716, 'dashboard_run_id': 1711861, 'mtr_portfolio_id': 21915815, 'dashboard_result_id': 9763440, '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_P21915815_31-03-2025_17_16_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21915818, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21915819, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21915820, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21915821, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21915822, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21915823, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21915824, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21915825, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21915826, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21915827, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21915828, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21915829, 'pht': 3726}}"}, {'dashboat_entry_day': 1702716, 'dashboard_run_id': 1711861, 'mtr_portfolio_id': 21916470, 'dashboard_result_id': 9763441, '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 = 21914431 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': 2709654, 'mtr_portfolio_id': 21914431, 'created_at': datetime.datetime(2025, 3, 31, 16, 47), 'result': '0.03604852935870458', 'result_long': None, 'result_double': None}] Qualite : 0.03604852935870458 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21914431 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21914431_31-03-2025_16_47_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21914431 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_P21914431_31-03-2025_16_47_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21914461, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21914462, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21914463, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21914464, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21914465, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21914466, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21914467, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21914468, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21914469, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21914470, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21914471, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21914472, 'pht': 3726}}" where mtr_portfolio_id = 21914431 and dashboard_run_id = 1711861 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`=21914431 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9763438, 0.03604852935870458, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21914431_31-03-2025_16_47_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21914461, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21914462, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21914463, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21914464, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21914465, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21914466, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21914467, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21914468, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21914469, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21914470, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21914471, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21914472, '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 = 21915225 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': 2709710, 'mtr_portfolio_id': 21915225, 'created_at': datetime.datetime(2025, 3, 31, 17, 3, 1), 'result': '0.03260065306735251', 'result_long': None, 'result_double': None}] Qualite : 0.03260065306735251 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21915225 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21915225_31-03-2025_17_03_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21915225 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_P21915225_31-03-2025_17_03_02.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 21915230, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21915231, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21915232, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21915233, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21915234, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21915235, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21915236, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21915237, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21915238, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21915239, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21915240, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21915241, 'pht': 3726}}" where mtr_portfolio_id = 21915225 and dashboard_run_id = 1711861 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`=21915225 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9763439, 0.03260065306735251, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21915225_31-03-2025_17_03_02.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 21915230, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21915231, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21915232, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21915233, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21915234, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21915235, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21915236, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21915237, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21915238, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21915239, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21915240, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21915241, '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 = 21915815 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': 2709773, 'mtr_portfolio_id': 21915815, 'created_at': datetime.datetime(2025, 3, 31, 17, 16, 59), 'result': '0.03571320320064125', 'result_long': None, 'result_double': None}] Qualite : 0.03571320320064125 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21915815 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21915815_31-03-2025_17_16_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21915815 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_P21915815_31-03-2025_17_16_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21915818, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21915819, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21915820, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21915821, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21915822, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21915823, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21915824, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21915825, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21915826, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21915827, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21915828, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21915829, 'pht': 3726}}" where mtr_portfolio_id = 21915815 and dashboard_run_id = 1711861 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`=21915815 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9763440, 0.03571320320064125, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21915815_31-03-2025_17_16_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21915818, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21915819, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21915820, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21915821, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21915822, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21915823, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21915824, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21915825, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21915826, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21915827, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21915828, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21915829, '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 = 21916470 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': 2709825, 'mtr_portfolio_id': 21916470, 'created_at': datetime.datetime(2025, 3, 31, 17, 21, 1), 'result': '0.02756543257924048', 'result_long': None, 'result_double': None}] Qualite : 0.02756543257924048 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21916470 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21916470_31-03-2025_17_21_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21916470 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_P21916470_31-03-2025_17_21_02.pdf'}" where mtr_portfolio_id = 21916470 and dashboard_run_id = 1711861 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`=21916470 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9763441, 0.02756543257924048, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21916470_31-03-2025_17_21_02.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21916473, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21916474, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21916475, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21916476, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21916477, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21916478, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21916479, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21916480, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21916481, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21916482, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21916483, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21916484, '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 (21914431,21915225,21915815,21916470) result : ((1349031501,), (1349031505,), (1349031543,), (1349031666,), (1349031684,), (1349031692,), (1349031720,), (1349031727,), (1349031877,), (1349031883,), (1349031887,), (1349031897,), (1349031921,), (1349032055,), (1349032129,), (1349032167,), (1349032175,), (1349032282,), (1349032286,), (1349032290,), (1349032319,), (1349032468,), (1349032527,), (1349032556,), (1349032582,), (1349032610,), (1349032622,), (1349032712,), (1349032772,), (1349032791,), (1349032802,), (1349032889,), (1349032925,), (1349032959,), (1349032982,), (1349033071,), (1349033075,), (1349033330,), (1349033334,), (1349033339,), (1349033460,), (1349033463,), (1349033466,), (1349033469,), (1349033473,), (1349033491,), (1349033526,), (1349033529,), (1349033533,), (1349033537,), (1349033645,), (1349033729,), (1349033769,), (1349033807,), (1349034186,), (1349034223,), (1349034267,), (1349034307,), (1349034419,), (1349034443,), (1349034464,), (1349034468,), (1349034495,), (1349034673,), (1349034657,), (1349034660,), (1349034723,), (1349034725,), (1349034854,), (1349034922,), (1349034927,), (1349034930,), (1349034936,), (1349035034,), (1349035038,), (1349035048,), (1349035049,), (1349035084,), (1349035177,), (1349035180,), (1349035183,), (1349035186,), (1349035189,), (1349035294,), (1349035329,), (1349035414,), (1349036122,), (1349036126,), (1349036134,), (1349036139,), (1349036144,), (1349036150,), (1349036236,), (1349036238,), (1349036252,), (1349036256,), (1349036340,), (1349036346,), (1349036350,), (1349036352,), (1349036357,), (1349036496,), (1349036497,), (1349036498,), (1349036499,), (1349036503,), (1349036508,), (1349036527,), (1349036530,), (1349036535,), (1349036540,), (1349036546,), (1349036548,), (1349036553,), (1349036616,), (1349036627,), (1349036631,), (1349036636,), (1349036696,), (1349036699,), (1349036702,), (1349036704,), (1349036707,), (1349036710,), (1349037690,), (1349037744,), (1349037804,), (1349037892,), (1349037946,), (1349038071,), (1349038128,), (1349038182,), (1349038247,), (1349038617,), (1349038527,), (1349038561,), (1349038590,), (1349039246,), (1349039272,), (1349039288,), (1349039296,), (1349039304,), (1349039474,), (1349039502,), (1349039542,), (1349041085,), (1349041104,), (1349041110,), (1349041113,), (1349041124,), (1349041145,), (1349041184,), (1349041278,), (1349041315,), (1349041356,), (1349041401,), (1349041604,), (1349041637,), (1349041652,), (1349041814,), (1349041832,), (1349041836,), (1349041839,), (1349041862,), (1349041870,), (1349041955,), (1349041957,), (1349041961,), (1349041964,), (1349041967,), (1349042069,), (1349042097,), (1349042129,), (1349042147,), (1349042301,), (1349042328,), (1349042355,), (1349042372,), (1349042523,), (1349042528,), (1349042568,), (1349042574,), (1349042624,), (1349042725,), (1349042728,), (1349042733,), (1349042794,), (1349042798,), (1349042814,), (1349042829,), (1349043018,), (1349043075,), (1349043102,), (1349043128,), (1349043172,), (1349043175,), (1349043177,), (1349043181,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'31032025': {'nb_upload': 15, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21916470]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1349043181, 1349043177, 1349043175, 1349043172, 1349043128, 1349043102, 1349043075, 1349043018, 1349042829, 1349042814, 1349042798, 1349042794, 1349042733, 1349042728, 1349042725] map_info['map_portfolio_photo'] : {21916470: [1349043181, 1349043177, 1349043175, 1349043172, 1349043128, 1349043102, 1349043075, 1349043018, 1349042829, 1349042814, 1349042798, 1349042794, 1349042733, 1349042728, 1349042725]} final : True mtd_id 4302 list_pids : [1349043181, 1349043177, 1349043175, 1349043172, 1349043128, 1349043102, 1349043075, 1349043018, 1349042829, 1349042814, 1349042798, 1349042794, 1349042733, 1349042728, 1349042725] Looping around the photos to save general results len do output : 1 /21916470Didn'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, '2709825') ('4302', '21916470', '1349043181', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349043177', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349043175', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349043172', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349043128', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349043102', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349043075', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349043018', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349042829', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349042814', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349042798', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349042794', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349042733', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349042728', None, None, None, None, None, '2709825') ('4302', None, None, None, None, None, None, None, '2709825') ('4302', '21916470', '1349042725', None, None, None, None, None, '2709825') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 16 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '21916470', 'None', None, None, None, None, '2709825'), ('4302', '21916470', '1349043181', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349043177', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349043175', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349043172', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349043128', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349043102', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349043075', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349043018', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349042829', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349042814', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349042798', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349042794', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349042733', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349042728', None, None, None, None, None, '2709825'), ('4302', '21916470', '1349042725', None, None, None, None, None, '2709825')] time used for this insertion : 0.19583582878112793 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.35457754135131836 time spend to save output : 0.19621610641479492 total time spend for step 5 : 0.5507936477661133 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 (2709825) 2.64user 1.99system 0:09.35elapsed 49%CPU (0avgtext+0avgdata 159428maxresident)k 12608inputs+9608outputs (28major+75296minor)pagefaults 0swaps