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 21768016 , 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=21768004 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='cartonnette' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21768016) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21768004) result : ((1347738394,), (1347738406,), (1347738410,), (1347738414,), (1347738506,), (1347738508,), (1347738512,), (1347738516,), (1347738520,), (1347738524,), (1347738616,), (1347738623,), (1347738627,), (1347738630,)) 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 21768017 , 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=21768004 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='autre_refus' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21768017) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21768004) result : ((1347738394,), (1347738406,), (1347738410,), (1347738414,), (1347738506,), (1347738508,), (1347738512,), (1347738516,), (1347738520,), (1347738524,), (1347738616,), (1347738623,), (1347738627,), (1347738630,)) 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 21768018 , 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=21768004 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 (21768018) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21768004) result : ((1347738394,), (1347738406,), (1347738410,), (1347738414,), (1347738506,), (1347738508,), (1347738512,), (1347738516,), (1347738520,), (1347738524,), (1347738616,), (1347738623,), (1347738627,), (1347738630,)) 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 21768019 , 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=21768004 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 (21768019) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21768004) result : ((1347738394,), (1347738406,), (1347738410,), (1347738414,), (1347738506,), (1347738508,), (1347738512,), (1347738516,), (1347738520,), (1347738524,), (1347738616,), (1347738623,), (1347738627,), (1347738630,)) 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`=21768004 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','papier','environnement','plastique','Carton_brun','kraft','metal','flou','cartonnette','autre_refus','Carton_gris','mal_croppe')) 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`=21768004 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','papier','environnement','plastique','Carton_brun','kraft','metal','flou','cartonnette','autre_refus','Carton_gris','mal_croppe')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__27032025_03_45_03_010165_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__27032025_03_45_03_010165_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__27032025_03_45_03_010165_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__27032025_03_45_03_010165_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__27032025_03_45_03_010165_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__27032025_03_45_03_010165_4417_kraft_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__27032025_03_45_03_010165_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__27032025_03_45_03_010165_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__27032025_03_45_03_010165_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__27032025_03_45_03_010165_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__27032025_03_45_03_010165_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__27032025_03_45_03_010165_4417_mal_croppe_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)[[21768004, 21768020, 4417, 0.5, 2107752385, 979], [21768004, 21768021, 4417, 0.5, 492668766, 979], [21768004, 21768022, 4417, 0.5, 493012381, 979], [21768004, 21768023, 4417, 0.5, 492725882, 979], [21768004, 21768024, 4417, 0.5, 2107753024, 979], [21768004, 21768025, 4417, 0.5, 493202403, 979], [21768004, 21768026, 4417, 0.5, 492628673, 979], [21768004, 21768027, 4417, 0.5, 492777938, 979], [21768004, 21768028, 4417, 0.5, 702398920, 979], [21768004, 21768029, 4417, 0.5, 2107752406, 979], [21768004, 21768030, 4417, 0.5, 2107753020, 979], [21768004, 21768031, 4417, 0.5, 2107755527, 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`=21768004 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','papier','environnement','plastique','Carton_brun','kraft','metal','flou','cartonnette','autre_refus','Carton_gris','mal_croppe')) 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`=21768004 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','papier','environnement','plastique','Carton_brun','kraft','metal','flou','cartonnette','autre_refus','Carton_gris','mal_croppe')) AND mptpi.`min_score`=0.5 To do returned map {'Teint_Dans_La_Masse': {'main_port_id': 21768004, 'sub_port_id': 21768020, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14290835, 'last_updated_at': datetime.datetime(2025, 3, 27, 3, 50), 'last_updated_at_desc': datetime.datetime(2025, 3, 27, 3, 50), 'last_updated_at_asc': datetime.datetime(2025, 3, 27, 3, 50)}, 'papier': {'main_port_id': 21768004, 'sub_port_id': 21768021, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14290836, 'last_updated_at': datetime.datetime(2025, 3, 27, 3, 50), 'last_updated_at_desc': datetime.datetime(2025, 3, 27, 3, 50), 'last_updated_at_asc': datetime.datetime(2025, 3, 27, 3, 50)}, 'environnement': {'main_port_id': 21768004, 'sub_port_id': 21768022, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14290837, 'last_updated_at': datetime.datetime(2025, 3, 27, 3, 50), 'last_updated_at_desc': datetime.datetime(2025, 3, 27, 3, 50), 'last_updated_at_asc': datetime.datetime(2025, 3, 27, 3, 50)}, 'plastique': {'main_port_id': 21768004, 'sub_port_id': 21768023, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14290838, 'last_updated_at': datetime.datetime(2025, 3, 27, 3, 50), 'last_updated_at_desc': datetime.datetime(2025, 3, 27, 3, 50), 'last_updated_at_asc': datetime.datetime(2025, 3, 27, 3, 50)}, 'Carton_brun': {'main_port_id': 21768004, 'sub_port_id': 21768024, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14290839, 'last_updated_at': datetime.datetime(2025, 3, 27, 3, 50), 'last_updated_at_desc': datetime.datetime(2025, 3, 27, 3, 50), 'last_updated_at_asc': datetime.datetime(2025, 3, 27, 3, 50)}, 'kraft': {'main_port_id': 21768004, 'sub_port_id': 21768025, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14290840, 'last_updated_at': datetime.datetime(2025, 3, 27, 3, 50), 'last_updated_at_desc': datetime.datetime(2025, 3, 27, 3, 50), 'last_updated_at_asc': datetime.datetime(2025, 3, 27, 3, 50)}, 'metal': {'main_port_id': 21768004, 'sub_port_id': 21768026, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14290841, 'last_updated_at': datetime.datetime(2025, 3, 27, 3, 50), 'last_updated_at_desc': datetime.datetime(2025, 3, 27, 3, 50), 'last_updated_at_asc': datetime.datetime(2025, 3, 27, 3, 50)}, 'flou': {'main_port_id': 21768004, 'sub_port_id': 21768027, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14290842, 'last_updated_at': datetime.datetime(2025, 3, 27, 3, 50), 'last_updated_at_desc': datetime.datetime(2025, 3, 27, 3, 50), 'last_updated_at_asc': datetime.datetime(2025, 3, 27, 3, 50)}, 'cartonnette': {'main_port_id': 21768004, 'sub_port_id': 21768028, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14290843, 'last_updated_at': datetime.datetime(2025, 3, 27, 3, 50), 'last_updated_at_desc': datetime.datetime(2025, 3, 27, 3, 50), 'last_updated_at_asc': datetime.datetime(2025, 3, 27, 3, 50)}, 'autre_refus': {'main_port_id': 21768004, 'sub_port_id': 21768029, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14290844, 'last_updated_at': datetime.datetime(2025, 3, 27, 3, 50), 'last_updated_at_desc': datetime.datetime(2025, 3, 27, 3, 50), 'last_updated_at_asc': datetime.datetime(2025, 3, 27, 3, 50)}, 'Carton_gris': {'main_port_id': 21768004, 'sub_port_id': 21768030, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14290845, 'last_updated_at': datetime.datetime(2025, 3, 27, 3, 50), 'last_updated_at_desc': datetime.datetime(2025, 3, 27, 3, 50), 'last_updated_at_asc': datetime.datetime(2025, 3, 27, 3, 50)}, 'mal_croppe': {'main_port_id': 21768004, 'sub_port_id': 21768031, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14290846, 'last_updated_at': datetime.datetime(2025, 3, 27, 3, 50), 'last_updated_at_desc': datetime.datetime(2025, 3, 27, 3, 50), 'last_updated_at_asc': datetime.datetime(2025, 3, 27, 3, 50)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21768020,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21768008 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21768021,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21768009 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21768022,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21768010 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21768023,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21768011 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21768024,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21768012 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21768025,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21768013 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21768026,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21768014 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21768027,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21768015 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21768028,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21768016 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21768029,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21768017 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21768030,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21768018 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21768031,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21768019 lien utilise dans velours : https://www.fotonower.com/velours/21768020,21768021,21768022,21768023,21768024,21768025,21768026,21768027,21768028,21768029,21768030,21768031?tags=Teint_Dans_La_Masse,papier,environnement,plastique,Carton_brun,kraft,metal,flou,cartonnette,autre_refus,Carton_gris,mal_croppe After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21768004]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1347738630, 1347738627, 1347738623, 1347738616, 1347738524, 1347738520, 1347738516, 1347738512, 1347738508, 1347738506, 1347738414, 1347738410, 1347738406, 1347738394] map_info['map_portfolio_photo'] : {21768004: [1347738630, 1347738627, 1347738623, 1347738616, 1347738524, 1347738520, 1347738516, 1347738512, 1347738508, 1347738506, 1347738414, 1347738410, 1347738406, 1347738394]} final : False mtd_id 4302 list_pids : [1347738630, 1347738627, 1347738623, 1347738616, 1347738524, 1347738520, 1347738516, 1347738512, 1347738508, 1347738506, 1347738414, 1347738410, 1347738406, 1347738394] Looping around the photos to save general results len do output : 1 /21768004. 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, '2695587') ('4302', '21768004', '1347738630', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738627', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738623', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738616', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738524', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738520', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738516', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738512', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738508', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738506', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738414', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738410', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738406', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738394', None, None, None, None, None, '2695587') 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', None, '21768004', "{'Teint_Dans_La_Masse': 21768008, 'papier': 21768009, 'environnement': 21768010, 'plastique': 21768011, 'Carton_brun': 21768012, 'kraft': 21768013, 'metal': 21768014, 'flou': 21768015, 'cartonnette': 21768016, 'autre_refus': 21768017, 'Carton_gris': 21768018, 'mal_croppe': 21768019}", None, None, None, None, '2695587'), ('4302', '21768004', '1347738630', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738627', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738623', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738616', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738524', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738520', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738516', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738512', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738508', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738506', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738414', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738410', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738406', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738394', None, None, None, None, None, '2695587')] time used for this insertion : 0.014956474304199219 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.226457118988037 time spend to save output : 0.015240907669067383 total time spend for step 1 : 3.2416980266571045 step2:final Thu Mar 27 03:50: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 ! 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 (21768004) 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 21768004 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1347738414,1347738410,1347738406,1347738394,1347738524,1347738520,1347738516,1347738512,1347738508,1347738506,1347738630,1347738627,1347738623,1347738616); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21768004]) Inside saveOutput : final : False verbose : True original output for save of step final : {1347738630: ('0.0',), 1347738627: ('0.0',), 1347738623: ('0.0',), 1347738616: ('0.0',), 1347738524: ('0.0',), 1347738520: ('0.0',), 1347738516: ('0.0',), 1347738512: ('0.0',), 1347738508: ('0.0',), 1347738506: ('0.0',), 1347738414: ('0.0',), 1347738410: ('0.0',), 1347738406: ('0.0',), 1347738394: ('0.0',)} new output for save of step final : {1347738630: ('0.0',), 1347738627: ('0.0',), 1347738623: ('0.0',), 1347738616: ('0.0',), 1347738524: ('0.0',), 1347738520: ('0.0',), 1347738516: ('0.0',), 1347738512: ('0.0',), 1347738508: ('0.0',), 1347738506: ('0.0',), 1347738414: ('0.0',), 1347738410: ('0.0',), 1347738406: ('0.0',), 1347738394: ('0.0',)} [1347738630, 1347738627, 1347738623, 1347738616, 1347738524, 1347738520, 1347738516, 1347738512, 1347738508, 1347738506, 1347738414, 1347738410, 1347738406, 1347738394] map_info['map_portfolio_photo'] : {21768004: [1347738630, 1347738627, 1347738623, 1347738616, 1347738524, 1347738520, 1347738516, 1347738512, 1347738508, 1347738506, 1347738414, 1347738410, 1347738406, 1347738394]} final : False mtd_id 4302 list_pids : [1347738630, 1347738627, 1347738623, 1347738616, 1347738524, 1347738520, 1347738516, 1347738512, 1347738508, 1347738506, 1347738414, 1347738410, 1347738406, 1347738394] Looping around the photos to save general results len do output : 14 /1347738630.Didn't retrieve data . /1347738627.Didn't retrieve data . /1347738623.Didn't retrieve data . /1347738616.Didn't retrieve data . /1347738524.Didn't retrieve data . /1347738520.Didn't retrieve data . /1347738516.Didn't retrieve data . /1347738512.Didn't retrieve data . /1347738508.Didn't retrieve data . /1347738506.Didn't retrieve data . /1347738414.Didn't retrieve data . /1347738410.Didn't retrieve data . /1347738406.Didn't retrieve data . /1347738394.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, '2695587') ('4302', '21768004', '1347738630', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738627', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738623', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738616', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738524', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738520', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738516', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738512', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738508', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738506', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738414', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738410', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738406', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738394', None, None, None, None, None, '2695587') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 42 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', '21768004', '1347738630', '0.0', None, None, None, None, '2695587'), ('4302', '21768004', '1347738627', '0.0', None, None, None, None, '2695587'), ('4302', '21768004', '1347738623', '0.0', None, None, None, None, '2695587'), ('4302', '21768004', '1347738616', '0.0', None, None, None, None, '2695587'), ('4302', '21768004', '1347738524', '0.0', None, None, None, None, '2695587'), ('4302', '21768004', '1347738520', '0.0', None, None, None, None, '2695587'), ('4302', '21768004', '1347738516', '0.0', None, None, None, None, '2695587'), ('4302', '21768004', '1347738512', '0.0', None, None, None, None, '2695587'), ('4302', '21768004', '1347738508', '0.0', None, None, None, None, '2695587'), ('4302', '21768004', '1347738506', '0.0', None, None, None, None, '2695587'), ('4302', '21768004', '1347738414', '0.0', None, None, None, None, '2695587'), ('4302', '21768004', '1347738410', '0.0', None, None, None, None, '2695587'), ('4302', '21768004', '1347738406', '0.0', None, None, None, None, '2695587'), ('4302', '21768004', '1347738394', '0.0', None, None, None, None, '2695587')] time used for this insertion : 0.013929367065429688 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.01443934440612793 time spend to save output : 0.014555215835571289 total time spend for step 2 : 0.02899456024169922 step3:velours_tree Thu Mar 27 03:50: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 complete output_args for input 0 : {21768004: [{'Teint_Dans_La_Masse': 21768008, 'papier': 21768009, 'environnement': 21768010, 'plastique': 21768011, 'Carton_brun': 21768012, 'kraft': 21768013, 'metal': 21768014, 'flou': 21768015, 'cartonnette': 21768016, 'autre_refus': 21768017, 'Carton_gris': 21768018, 'mal_croppe': 21768019}]} input_args_next_step : {21768004: ()} output_args : {21768004: [{'Teint_Dans_La_Masse': 21768008, 'papier': 21768009, 'environnement': 21768010, 'plastique': 21768011, 'Carton_brun': 21768012, 'kraft': 21768013, 'metal': 21768014, 'flou': 21768015, 'cartonnette': 21768016, 'autre_refus': 21768017, 'Carton_gris': 21768018, 'mal_croppe': 21768019}]} args : 21768004 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 : ({'Teint_Dans_La_Masse': 21768008, 'papier': 21768009, 'environnement': 21768010, 'plastique': 21768011, 'Carton_brun': 21768012, 'kraft': 21768013, 'metal': 21768014, 'flou': 21768015, 'cartonnette': 21768016, 'autre_refus': 21768017, 'Carton_gris': 21768018, 'mal_croppe': 21768019},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21768004) 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([21768004]) 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.2740960121154785 time spend to save output : 4.7206878662109375e-05 total time spend for step 3 : 0.2741432189941406 step4:send_mail_cod Thu Mar 27 03:50: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 : {1347738630: ('0.0',), 1347738627: ('0.0',), 1347738623: ('0.0',), 1347738616: ('0.0',), 1347738524: ('0.0',), 1347738520: ('0.0',), 1347738516: ('0.0',), 1347738512: ('0.0',), 1347738508: ('0.0',), 1347738506: ('0.0',), 1347738414: ('0.0',), 1347738410: ('0.0',), 1347738406: ('0.0',), 1347738394: ('0.0',)} input_args_next_step : {1347738630: ()} output_args : {1347738630: ('0.0',), 1347738627: ('0.0',), 1347738623: ('0.0',), 1347738616: ('0.0',), 1347738524: ('0.0',), 1347738520: ('0.0',), 1347738516: ('0.0',), 1347738512: ('0.0',), 1347738508: ('0.0',), 1347738506: ('0.0',), 1347738414: ('0.0',), 1347738410: ('0.0',), 1347738406: ('0.0',), 1347738394: ('0.0',)} args : 1347738630 depend.output_id : 0 input_args_next_step : {1347738630: ('0.0',), 1347738627: ()} output_args : {1347738630: ('0.0',), 1347738627: ('0.0',), 1347738623: ('0.0',), 1347738616: ('0.0',), 1347738524: ('0.0',), 1347738520: ('0.0',), 1347738516: ('0.0',), 1347738512: ('0.0',), 1347738508: ('0.0',), 1347738506: ('0.0',), 1347738414: ('0.0',), 1347738410: ('0.0',), 1347738406: ('0.0',), 1347738394: ('0.0',)} args : 1347738627 depend.output_id : 0 input_args_next_step : {1347738630: ('0.0',), 1347738627: ('0.0',), 1347738623: ()} output_args : {1347738630: ('0.0',), 1347738627: ('0.0',), 1347738623: ('0.0',), 1347738616: ('0.0',), 1347738524: ('0.0',), 1347738520: ('0.0',), 1347738516: ('0.0',), 1347738512: ('0.0',), 1347738508: ('0.0',), 1347738506: ('0.0',), 1347738414: ('0.0',), 1347738410: ('0.0',), 1347738406: ('0.0',), 1347738394: ('0.0',)} args : 1347738623 depend.output_id : 0 input_args_next_step : {1347738630: ('0.0',), 1347738627: ('0.0',), 1347738623: ('0.0',), 1347738616: ()} output_args : {1347738630: ('0.0',), 1347738627: ('0.0',), 1347738623: ('0.0',), 1347738616: ('0.0',), 1347738524: ('0.0',), 1347738520: ('0.0',), 1347738516: ('0.0',), 1347738512: ('0.0',), 1347738508: ('0.0',), 1347738506: ('0.0',), 1347738414: ('0.0',), 1347738410: ('0.0',), 1347738406: ('0.0',), 1347738394: ('0.0',)} args : 1347738616 depend.output_id : 0 input_args_next_step : {1347738630: ('0.0',), 1347738627: ('0.0',), 1347738623: ('0.0',), 1347738616: ('0.0',), 1347738524: ()} output_args : {1347738630: ('0.0',), 1347738627: ('0.0',), 1347738623: ('0.0',), 1347738616: ('0.0',), 1347738524: ('0.0',), 1347738520: ('0.0',), 1347738516: ('0.0',), 1347738512: ('0.0',), 1347738508: ('0.0',), 1347738506: ('0.0',), 1347738414: ('0.0',), 1347738410: ('0.0',), 1347738406: ('0.0',), 1347738394: ('0.0',)} args : 1347738524 depend.output_id : 0 input_args_next_step : {1347738630: ('0.0',), 1347738627: ('0.0',), 1347738623: ('0.0',), 1347738616: ('0.0',), 1347738524: ('0.0',), 1347738520: ()} output_args : {1347738630: ('0.0',), 1347738627: ('0.0',), 1347738623: ('0.0',), 1347738616: ('0.0',), 1347738524: ('0.0',), 1347738520: ('0.0',), 1347738516: ('0.0',), 1347738512: ('0.0',), 1347738508: ('0.0',), 1347738506: ('0.0',), 1347738414: ('0.0',), 1347738410: ('0.0',), 1347738406: ('0.0',), 1347738394: ('0.0',)} args : 1347738520 depend.output_id : 0 input_args_next_step : {1347738630: ('0.0',), 1347738627: ('0.0',), 1347738623: ('0.0',), 1347738616: ('0.0',), 1347738524: ('0.0',), 1347738520: ('0.0',), 1347738516: ()} output_args : {1347738630: ('0.0',), 1347738627: ('0.0',), 1347738623: ('0.0',), 1347738616: ('0.0',), 1347738524: ('0.0',), 1347738520: ('0.0',), 1347738516: ('0.0',), 1347738512: ('0.0',), 1347738508: ('0.0',), 1347738506: ('0.0',), 1347738414: ('0.0',), 1347738410: ('0.0',), 1347738406: ('0.0',), 1347738394: ('0.0',)} args : 1347738516 depend.output_id : 0 input_args_next_step : {1347738630: ('0.0',), 1347738627: ('0.0',), 1347738623: ('0.0',), 1347738616: ('0.0',), 1347738524: ('0.0',), 1347738520: ('0.0',), 1347738516: ('0.0',), 1347738512: ()} output_args : {1347738630: ('0.0',), 1347738627: ('0.0',), 1347738623: ('0.0',), 1347738616: ('0.0',), 1347738524: ('0.0',), 1347738520: ('0.0',), 1347738516: ('0.0',), 1347738512: ('0.0',), 1347738508: ('0.0',), 1347738506: ('0.0',), 1347738414: ('0.0',), 1347738410: ('0.0',), 1347738406: ('0.0',), 1347738394: ('0.0',)} args : 1347738512 depend.output_id : 0 input_args_next_step : {1347738630: ('0.0',), 1347738627: ('0.0',), 1347738623: ('0.0',), 1347738616: ('0.0',), 1347738524: ('0.0',), 1347738520: ('0.0',), 1347738516: ('0.0',), 1347738512: ('0.0',), 1347738508: ()} output_args : {1347738630: ('0.0',), 1347738627: ('0.0',), 1347738623: ('0.0',), 1347738616: ('0.0',), 1347738524: ('0.0',), 1347738520: ('0.0',), 1347738516: ('0.0',), 1347738512: ('0.0',), 1347738508: ('0.0',), 1347738506: ('0.0',), 1347738414: ('0.0',), 1347738410: ('0.0',), 1347738406: ('0.0',), 1347738394: ('0.0',)} args : 1347738508 depend.output_id : 0 input_args_next_step : {1347738630: ('0.0',), 1347738627: ('0.0',), 1347738623: ('0.0',), 1347738616: ('0.0',), 1347738524: ('0.0',), 1347738520: ('0.0',), 1347738516: ('0.0',), 1347738512: ('0.0',), 1347738508: ('0.0',), 1347738506: ()} output_args : {1347738630: ('0.0',), 1347738627: ('0.0',), 1347738623: ('0.0',), 1347738616: ('0.0',), 1347738524: ('0.0',), 1347738520: ('0.0',), 1347738516: ('0.0',), 1347738512: ('0.0',), 1347738508: ('0.0',), 1347738506: ('0.0',), 1347738414: ('0.0',), 1347738410: ('0.0',), 1347738406: ('0.0',), 1347738394: ('0.0',)} args : 1347738506 depend.output_id : 0 input_args_next_step : {1347738630: ('0.0',), 1347738627: ('0.0',), 1347738623: ('0.0',), 1347738616: ('0.0',), 1347738524: ('0.0',), 1347738520: ('0.0',), 1347738516: ('0.0',), 1347738512: ('0.0',), 1347738508: ('0.0',), 1347738506: ('0.0',), 1347738414: ()} output_args : {1347738630: ('0.0',), 1347738627: ('0.0',), 1347738623: ('0.0',), 1347738616: ('0.0',), 1347738524: ('0.0',), 1347738520: ('0.0',), 1347738516: ('0.0',), 1347738512: ('0.0',), 1347738508: ('0.0',), 1347738506: ('0.0',), 1347738414: ('0.0',), 1347738410: ('0.0',), 1347738406: ('0.0',), 1347738394: ('0.0',)} args : 1347738414 depend.output_id : 0 input_args_next_step : {1347738630: ('0.0',), 1347738627: ('0.0',), 1347738623: ('0.0',), 1347738616: ('0.0',), 1347738524: ('0.0',), 1347738520: ('0.0',), 1347738516: ('0.0',), 1347738512: ('0.0',), 1347738508: ('0.0',), 1347738506: ('0.0',), 1347738414: ('0.0',), 1347738410: ()} output_args : {1347738630: ('0.0',), 1347738627: ('0.0',), 1347738623: ('0.0',), 1347738616: ('0.0',), 1347738524: ('0.0',), 1347738520: ('0.0',), 1347738516: ('0.0',), 1347738512: ('0.0',), 1347738508: ('0.0',), 1347738506: ('0.0',), 1347738414: ('0.0',), 1347738410: ('0.0',), 1347738406: ('0.0',), 1347738394: ('0.0',)} args : 1347738410 depend.output_id : 0 input_args_next_step : {1347738630: ('0.0',), 1347738627: ('0.0',), 1347738623: ('0.0',), 1347738616: ('0.0',), 1347738524: ('0.0',), 1347738520: ('0.0',), 1347738516: ('0.0',), 1347738512: ('0.0',), 1347738508: ('0.0',), 1347738506: ('0.0',), 1347738414: ('0.0',), 1347738410: ('0.0',), 1347738406: ()} output_args : {1347738630: ('0.0',), 1347738627: ('0.0',), 1347738623: ('0.0',), 1347738616: ('0.0',), 1347738524: ('0.0',), 1347738520: ('0.0',), 1347738516: ('0.0',), 1347738512: ('0.0',), 1347738508: ('0.0',), 1347738506: ('0.0',), 1347738414: ('0.0',), 1347738410: ('0.0',), 1347738406: ('0.0',), 1347738394: ('0.0',)} args : 1347738406 depend.output_id : 0 input_args_next_step : {1347738630: ('0.0',), 1347738627: ('0.0',), 1347738623: ('0.0',), 1347738616: ('0.0',), 1347738524: ('0.0',), 1347738520: ('0.0',), 1347738516: ('0.0',), 1347738512: ('0.0',), 1347738508: ('0.0',), 1347738506: ('0.0',), 1347738414: ('0.0',), 1347738410: ('0.0',), 1347738406: ('0.0',), 1347738394: ()} output_args : {1347738630: ('0.0',), 1347738627: ('0.0',), 1347738623: ('0.0',), 1347738616: ('0.0',), 1347738524: ('0.0',), 1347738520: ('0.0',), 1347738516: ('0.0',), 1347738512: ('0.0',), 1347738508: ('0.0',), 1347738506: ('0.0',), 1347738414: ('0.0',), 1347738410: ('0.0',), 1347738406: ('0.0',), 1347738394: ('0.0',)} args : 1347738394 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 : {21768004: [{'Teint_Dans_La_Masse': 21768008, 'papier': 21768009, 'environnement': 21768010, 'plastique': 21768011, 'Carton_brun': 21768012, 'kraft': 21768013, 'metal': 21768014, 'flou': 21768015, 'cartonnette': 21768016, 'autre_refus': 21768017, 'Carton_gris': 21768018, 'mal_croppe': 21768019}]} input_args_next_step : {1347738630: ('0.0',), 1347738627: ('0.0',), 1347738623: ('0.0',), 1347738616: ('0.0',), 1347738524: ('0.0',), 1347738520: ('0.0',), 1347738516: ('0.0',), 1347738512: ('0.0',), 1347738508: ('0.0',), 1347738506: ('0.0',), 1347738414: ('0.0',), 1347738410: ('0.0',), 1347738406: ('0.0',), 1347738394: ('0.0',), 21768004: ()} output_args : {21768004: [{'Teint_Dans_La_Masse': 21768008, 'papier': 21768009, 'environnement': 21768010, 'plastique': 21768011, 'Carton_brun': 21768012, 'kraft': 21768013, 'metal': 21768014, 'flou': 21768015, 'cartonnette': 21768016, 'autre_refus': 21768017, 'Carton_gris': 21768018, 'mal_croppe': 21768019}]} args : 21768004 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 :15, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21768004) 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 (1347738630,1347738627,1347738623,1347738616,1347738524,1347738520,1347738516,1347738512,1347738508,1347738506,1347738414,1347738410,1347738406,1347738394) Found this number of photos: 14 ##### Call download_photos : nb_thread : 5 begin to download photo : 1347738394 begin to download photo : 1347738414 begin to download photo : 1347738512 begin to download photo : 1347738524 begin to download photo : 1347738627 download finish for photo 1347738512 begin to download photo : 1347738516 download finish for photo 1347738627 begin to download photo : 1347738630 download finish for photo 1347738414 begin to download photo : 1347738506 download finish for photo 1347738524 begin to download photo : 1347738616 download finish for photo 1347738394 begin to download photo : 1347738406 download finish for photo 1347738630 download finish for photo 1347738516 begin to download photo : 1347738520 download finish for photo 1347738506 begin to download photo : 1347738508 download finish for photo 1347738616 begin to download photo : 1347738623 download finish for photo 1347738406 begin to download photo : 1347738410 download finish for photo 1347738520 download finish for photo 1347738623 download finish for photo 1347738410 download finish for photo 1347738508 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette217680111743043802/ imagette217680131743043802/ imagette217680141743043802/ imagette217680151743043802/ imagette217680161743043802/ imagette217680171743043802/ imagette217680191743043802/ imagette217680081743043802/ imagette217680121743043802/ imagette217680181743043802/ length of list_filenames : 14 ; length of list_pids : 14 ; length of list_args : 14 results_Auto_P21768004_27-03-2025_03_50_02.pdf 21768011 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=21768011 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette217680111743043802 21768013 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=21768013 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette217680131743043802 21768014 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=21768014 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette217680141743043802 21768015 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=21768015 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette217680151743043802 21768016 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=21768016 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette217680161743043802 21768017 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=21768017 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette217680171743043802 21768019 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=21768019 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette217680191743043802 21768008 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=21768008 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette217680081743043802 21768012 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=21768012 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette217680121743043802 21768018 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=21768018 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette217680181743043802 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=21768004 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/21768020,21768021,21768022,21768023,21768024,21768025,21768026,21768027,21768028,21768029,21768030,21768031?tags=Teint_Dans_La_Masse,papier,environnement,plastique,Carton_brun,kraft,metal,flou,cartonnette,autre_refus,Carton_gris,mal_croppe your option no_mail is active, we will not send the real mail to your client args[1347738630] : ('0.0',) no score found for photo 1347738630 We are sending mail with results at report@fotonower.com args[1347738627] : ('0.0',) no score found for photo 1347738627 We are sending mail with results at report@fotonower.com args[1347738623] : ('0.0',) no score found for photo 1347738623 We are sending mail with results at report@fotonower.com args[1347738616] : ('0.0',) no score found for photo 1347738616 We are sending mail with results at report@fotonower.com args[1347738524] : ('0.0',) no score found for photo 1347738524 We are sending mail with results at report@fotonower.com args[1347738520] : ('0.0',) no score found for photo 1347738520 We are sending mail with results at report@fotonower.com args[1347738516] : ('0.0',) no score found for photo 1347738516 We are sending mail with results at report@fotonower.com args[1347738512] : ('0.0',) no score found for photo 1347738512 We are sending mail with results at report@fotonower.com args[1347738508] : ('0.0',) no score found for photo 1347738508 We are sending mail with results at report@fotonower.com args[1347738506] : ('0.0',) no score found for photo 1347738506 We are sending mail with results at report@fotonower.com args[1347738414] : ('0.0',) no score found for photo 1347738414 We are sending mail with results at report@fotonower.com args[1347738410] : ('0.0',) no score found for photo 1347738410 We are sending mail with results at report@fotonower.com args[1347738406] : ('0.0',) no score found for photo 1347738406 We are sending mail with results at report@fotonower.com args[1347738394] : ('0.0',) no score found for photo 1347738394 We are sending mail with results at report@fotonower.com refus_total : 0.0 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=21768004 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_P21768004_27-03-2025_03_50_02.pdf results_Auto_P21768004_27-03-2025_03_50_02.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21768004_27-03-2025_03_50_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','21768004','results_Auto_P21768004_27-03-2025_03_50_02.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21768004_27-03-2025_03_50_02.pdf','pdf','','0.12','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21768004]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1347738630, 1347738627, 1347738623, 1347738616, 1347738524, 1347738520, 1347738516, 1347738512, 1347738508, 1347738506, 1347738414, 1347738410, 1347738406, 1347738394] map_info['map_portfolio_photo'] : {21768004: [1347738630, 1347738627, 1347738623, 1347738616, 1347738524, 1347738520, 1347738516, 1347738512, 1347738508, 1347738506, 1347738414, 1347738410, 1347738406, 1347738394]} final : False mtd_id 4302 list_pids : [1347738630, 1347738627, 1347738623, 1347738616, 1347738524, 1347738520, 1347738516, 1347738512, 1347738508, 1347738506, 1347738414, 1347738410, 1347738406, 1347738394] 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, '2695587') ('4302', '21768004', '1347738630', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738627', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738623', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738616', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738524', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738520', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738516', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738512', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738508', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738506', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738414', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738410', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738406', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738394', None, None, None, None, None, '2695587') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 14 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '21768004', '1347738630', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738627', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738623', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738616', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738524', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738520', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738516', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738512', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738508', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738506', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738414', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738410', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738406', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738394', None, None, None, None, None, '2695587')] time used for this insertion : 0.9405224323272705 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.7637686729431152 time spend to save output : 0.9408402442932129 total time spend for step 4 : 2.704608917236328 step5:split_time_score Thu Mar 27 03:50:05 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 : ['21768004'] 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 : [('21768004',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21768004) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1347738627: {'path': 'temp/1743043802_2121350_1347738627_6353e8271b57ef50085ff5e477241475.jpg', 'extension': 'jpg'}, 1347738630: {'path': 'temp/1743043802_2121350_1347738630_4fe6afea4781d3d0b91e7a93e2961e7d.jpg', 'extension': 'jpg'}, 1347738512: {'path': 'temp/1743043802_2121350_1347738512_42ca21b689ac052a880ffcb9d9b30c9e.jpg', 'extension': 'jpg'}, 1347738516: {'path': 'temp/1743043802_2121350_1347738516_052c6d9bf7825a68d3f9b2d9190910b3.jpg', 'extension': 'jpg'}, 1347738520: {'path': 'temp/1743043802_2121350_1347738520_d7b219f225ef0ef19927023945ff966f.jpg', 'extension': 'jpg'}, 1347738524: {'path': 'temp/1743043802_2121350_1347738524_16e317325a8cfbe515558b235cecd66f.jpg', 'extension': 'jpg'}, 1347738616: {'path': 'temp/1743043802_2121350_1347738616_469494d6ad79d503b33acab39da4b7ff.jpg', 'extension': 'jpg'}, 1347738623: {'path': 'temp/1743043802_2121350_1347738623_424a098c898272bb836b528310aebdc6.jpg', 'extension': 'jpg'}, 1347738394: {'path': 'temp/1743043802_2121350_1347738394_8b1df38068dc5c35c46fc4e145aee293.jpg', 'extension': 'jpg'}, 1347738406: {'path': 'temp/1743043802_2121350_1347738406_7595c4e008cecca2011fdb7a56d6bb99.jpg', 'extension': 'jpg'}, 1347738410: {'path': 'temp/1743043802_2121350_1347738410_3f26261927bd9f4f78a515960bca9ef7.jpg', 'extension': 'jpg'}, 1347738414: {'path': 'temp/1743043802_2121350_1347738414_dbef21a3f1db3ac2849ba260a3976249.jpg', 'extension': 'jpg'}, 1347738506: {'path': 'temp/1743043802_2121350_1347738506_8b24dd727a2b1d51982c41deaea7135f.jpg', 'extension': 'jpg'}, 1347738508: {'path': 'temp/1743043802_2121350_1347738508_da6000cdc2f61a2ae38efc084978bf0c.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 = 21768004; (('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 = 21768004 group by h (('03', 14),) 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=21768004 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 (21768004) 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 (21768004) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 27032025 21768004 Nombre de photos uploadées : 14 / 23040 (0%) 27032025 21768004 Nombre de photos taguées (types de déchets): 0 / 14 (0%) 27032025 21768004 Nombre de photos taguées (volume) : 0 / 14 (0%) [{'photo_id': 1347738414, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/27/dbef21a3f1db3ac2849ba260a3976249.jpg', 'username': None, 'uploaded_at': 1743043636, 'text': 'image_27032025_03_45_03_10165.jpg'}, {'photo_id': 1347738410, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/27/3f26261927bd9f4f78a515960bca9ef7.jpg', 'username': None, 'uploaded_at': 1743043636, 'text': 'image_27032025_03_45_14_10139.jpg'}, {'photo_id': 1347738406, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/27/7595c4e008cecca2011fdb7a56d6bb99.jpg', 'username': None, 'uploaded_at': 1743043636, 'text': 'image_27032025_03_45_24_10140.jpg'}, {'photo_id': 1347738394, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/27/8b1df38068dc5c35c46fc4e145aee293.jpg', 'username': None, 'uploaded_at': 1743043636, 'text': 'image_27032025_03_45_44_10137.jpg'}] 0 [] elapsed_time : load_data_split_time_score 2.1457672119140625e-06 elapsed_time : order_list_meta_photo_and_scores 7.62939453125e-06 ?????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0010433197021484375 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 21768004, '2025-03-27' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1692045,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.024817943572998047 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= 1692045 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1692045, 'dashboard_run_id': 1700039, 'mtr_portfolio_id': 21766075, 'dashboard_result_id': 9661859, '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_P21766075_27-03-2025_03_17_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21766077, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21766078, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21766079, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21766080, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21766081, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21766082, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21766083, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21766084, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21766085, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21766086, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21766087, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21766088, 'pht': 3726}}"}, {'dashboat_entry_day': 1692045, 'dashboard_run_id': 1700039, 'mtr_portfolio_id': 21766833, 'dashboard_result_id': 9661860, '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_P21766833_27-03-2025_03_33_03.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 21766834, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21766835, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21766836, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21766837, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21766838, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21766839, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21766840, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21766841, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21766842, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21766843, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21766844, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21766845, 'pht': 3726}}"}, {'dashboat_entry_day': 1692045, 'dashboard_run_id': 1700039, 'mtr_portfolio_id': 21767496, 'dashboard_result_id': 9661861, '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_P21767496_27-03-2025_03_47_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21767497, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21767498, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21767499, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21767500, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21767501, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21767502, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21767503, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21767504, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21767505, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21767506, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21767507, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21767508, 'pht': 3726}}"}, {'dashboat_entry_day': 1692045, 'dashboard_run_id': 1700039, 'mtr_portfolio_id': 21768004, 'dashboard_result_id': 9661862, '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 = 21766075 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': 2695466, 'mtr_portfolio_id': 21766075, 'created_at': datetime.datetime(2025, 3, 27, 3, 17, 59), 'result': '0.0512553080567632', 'result_long': None, 'result_double': None}] Qualite : 0.0512553080567632 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21766075 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21766075_27-03-2025_03_17_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21766075 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_P21766075_27-03-2025_03_17_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21766077, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21766078, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21766079, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21766080, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21766081, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21766082, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21766083, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21766084, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21766085, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21766086, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21766087, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21766088, 'pht': 3726}}" where mtr_portfolio_id = 21766075 and dashboard_run_id = 1700039 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`=21766075 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9661859, 0.0512553080567632, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21766075_27-03-2025_03_17_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21766077, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21766078, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21766079, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21766080, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21766081, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21766082, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21766083, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21766084, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21766085, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21766086, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21766087, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21766088, '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 = 21766833 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': 2695507, 'mtr_portfolio_id': 21766833, 'created_at': datetime.datetime(2025, 3, 27, 3, 33, 3), 'result': '0.05341903782188338', 'result_long': None, 'result_double': None}] Qualite : 0.05341903782188338 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21766833 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21766833_27-03-2025_03_33_03.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21766833 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_P21766833_27-03-2025_03_33_03.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 21766834, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21766835, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21766836, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21766837, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21766838, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21766839, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21766840, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21766841, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21766842, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21766843, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21766844, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21766845, 'pht': 3726}}" where mtr_portfolio_id = 21766833 and dashboard_run_id = 1700039 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`=21766833 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9661860, 0.05341903782188338, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21766833_27-03-2025_03_33_03.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 21766834, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21766835, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21766836, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21766837, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21766838, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21766839, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21766840, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21766841, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21766842, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21766843, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21766844, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21766845, '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 = 21767496 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': 2695545, 'mtr_portfolio_id': 21767496, 'created_at': datetime.datetime(2025, 3, 27, 3, 47, 59), 'result': '0.06233352764499931', 'result_long': None, 'result_double': None}] Qualite : 0.06233352764499931 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21767496 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21767496_27-03-2025_03_47_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21767496 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_P21767496_27-03-2025_03_47_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21767497, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21767498, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21767499, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21767500, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21767501, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21767502, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21767503, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21767504, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21767505, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21767506, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21767507, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21767508, 'pht': 3726}}" where mtr_portfolio_id = 21767496 and dashboard_run_id = 1700039 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`=21767496 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9661861, 0.06233352764499931, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21767496_27-03-2025_03_47_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21767497, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21767498, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21767499, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21767500, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21767501, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21767502, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21767503, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21767504, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21767505, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21767506, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21767507, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21767508, '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 = 21768004 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 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 = 21768004 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 21768004 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 21768004 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 21768004 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21768004 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21768004_27-03-2025_03_50_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21768004 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_P21768004_27-03-2025_03_50_02.pdf'}" where mtr_portfolio_id = 21768004 and dashboard_run_id = 1700039 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21766075,21766833,21767496,21768004) result : ((1347728987,), (1347728995,), (1347729037,), (1347729076,), (1347729099,), (1347729365,), (1347729413,), (1347729452,), (1347729485,), (1347729976,), (1347730038,), (1347730110,), (1347730169,), (1347730588,), (1347730624,), (1347730659,), (1347730698,), (1347730734,), (1347730998,), (1347731040,), (1347731084,), (1347731119,), (1347731403,), (1347731431,), (1347731470,), (1347731549,), (1347731644,), (1347731702,), (1347733239,), (1347733249,), (1347733404,), (1347733419,), (1347733769,), (1347733825,), (1347733895,), (1347733973,), (1347734105,), (1347734113,), (1347734223,), (1347734232,), (1347734239,), (1347734258,), (1347734267,), (1347734545,), (1347734550,), (1347734584,), (1347734739,), (1347734740,), (1347734743,), (1347734746,), (1347734748,), (1347734750,), (1347734794,), (1347734798,), (1347734818,), (1347734841,), (1347734863,), (1347734866,), (1347734883,), (1347734888,), (1347734916,), (1347734960,), (1347734951,), (1347734954,), (1347734957,), (1347734959,), (1347735012,), (1347735018,), (1347735023,), (1347735028,), (1347735033,), (1347735038,), (1347735050,), (1347735053,), (1347735069,), (1347735218,), (1347735233,), (1347735412,), (1347735414,), (1347735420,), (1347735440,), (1347735442,), (1347735469,), (1347735473,), (1347735477,), (1347735481,), (1347735511,), (1347735513,), (1347735517,), (1347735519,), (1347735525,), (1347735548,), (1347735550,), (1347735554,), (1347735795,), (1347735802,), (1347735827,), (1347735867,), (1347735894,), (1347735965,), (1347735975,), (1347735985,), (1347735987,), (1347735989,), (1347736242,), (1347736245,), (1347736251,), (1347736255,), (1347736327,), (1347736334,), (1347736338,), (1347736342,), (1347736354,), (1347736357,), (1347736361,), (1347736419,), (1347736422,), (1347736425,), (1347736434,), (1347736441,), (1347736470,), (1347736471,), (1347736475,), (1347736485,), (1347736541,), (1347736544,), (1347736551,), (1347736562,), (1347736694,), (1347736699,), (1347736704,), (1347736707,), (1347736711,), (1347736713,), (1347736753,), (1347736763,), (1347736765,), (1347736896,), (1347736901,), (1347736906,), (1347736909,), (1347736914,), (1347736922,), (1347736941,), (1347736949,), (1347736952,), (1347736955,), (1347736963,), (1347737043,), (1347737310,), (1347737318,), (1347737330,), (1347737335,), (1347737393,), (1347737396,), (1347737399,), (1347737402,), (1347737404,), (1347737407,), (1347737855,), (1347737860,), (1347737878,), (1347737890,), (1347737899,), (1347738015,), (1347738019,), (1347738024,), (1347738088,), (1347738090,), (1347738093,), (1347738096,), (1347738106,), (1347738123,), (1347738124,), (1347738126,), (1347738130,), (1347738132,), (1347738150,), (1347738155,), (1347738157,), (1347738158,), (1347738184,), (1347738185,), (1347738189,), (1347738194,), (1347738198,), (1347738211,), (1347738213,), (1347738216,), (1347738219,), (1347738225,), (1347738270,), (1347738275,), (1347738279,), (1347738282,), (1347738422,), (1347738394,), (1347738406,), (1347738410,), (1347738414,), (1347738506,), (1347738508,), (1347738512,), (1347738516,), (1347738520,), (1347738524,), (1347738616,), (1347738623,), (1347738627,), (1347738630,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'27032025': {'nb_upload': 14, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21768004]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1347738630, 1347738627, 1347738623, 1347738616, 1347738524, 1347738520, 1347738516, 1347738512, 1347738508, 1347738506, 1347738414, 1347738410, 1347738406, 1347738394] map_info['map_portfolio_photo'] : {21768004: [1347738630, 1347738627, 1347738623, 1347738616, 1347738524, 1347738520, 1347738516, 1347738512, 1347738508, 1347738506, 1347738414, 1347738410, 1347738406, 1347738394]} final : True mtd_id 4302 list_pids : [1347738630, 1347738627, 1347738623, 1347738616, 1347738524, 1347738520, 1347738516, 1347738512, 1347738508, 1347738506, 1347738414, 1347738410, 1347738406, 1347738394] Looping around the photos to save general results len do output : 1 /21768004Didn'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, '2695587') ('4302', '21768004', '1347738630', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738627', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738623', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738616', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738524', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738520', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738516', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738512', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738508', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738506', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738414', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738410', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738406', None, None, None, None, None, '2695587') ('4302', None, None, None, None, None, None, None, '2695587') ('4302', '21768004', '1347738394', None, None, None, None, None, '2695587') 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', None, '21768004', 'None', None, None, None, None, '2695587'), ('4302', '21768004', '1347738630', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738627', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738623', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738616', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738524', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738520', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738516', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738512', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738508', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738506', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738414', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738410', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738406', None, None, None, None, None, '2695587'), ('4302', '21768004', '1347738394', None, None, None, None, None, '2695587')] time used for this insertion : 0.013543844223022461 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.31526947021484375 time spend to save output : 0.013921260833740234 total time spend for step 5 : 0.329190731048584 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 (2695587) 2.13user 2.46system 0:09.93elapsed 46%CPU (0avgtext+0avgdata 160732maxresident)k 552inputs+7712outputs (4major+64323minor)pagefaults 0swaps