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 21628140 , 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=21628109 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 (21628140) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21628109) result : ((1346710065,), (1346710073,), (1346710077,), (1346710117,), (1346710119,), (1346710121,), (1346710123,), (1346710128,), (1346710156,), (1346710159,), (1346710162,)) 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 21628141 , 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=21628109 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='Carton_brun' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21628141) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21628109) result : ((1346710065,), (1346710073,), (1346710077,), (1346710117,), (1346710119,), (1346710121,), (1346710123,), (1346710128,), (1346710156,), (1346710159,), (1346710162,)) 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 21628142 , 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=21628109 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='flou' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21628142) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21628109) result : ((1346710065,), (1346710073,), (1346710077,), (1346710117,), (1346710119,), (1346710121,), (1346710123,), (1346710128,), (1346710156,), (1346710159,), (1346710162,)) 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 21628143 , 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=21628109 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 (21628143) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21628109) result : ((1346710065,), (1346710073,), (1346710077,), (1346710117,), (1346710119,), (1346710121,), (1346710123,), (1346710128,), (1346710156,), (1346710159,), (1346710162,)) 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 21628144 , 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=21628109 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 (21628144) result : ((1346710169,), (1346710170,), (1346710171,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21628109) result : ((1346710065,), (1346710073,), (1346710077,), (1346710117,), (1346710119,), (1346710121,), (1346710123,), (1346710128,), (1346710156,), (1346710159,), (1346710162,)) 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 21628145 , 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=21628109 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='kraft' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21628145) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21628109) result : ((1346710065,), (1346710073,), (1346710077,), (1346710117,), (1346710119,), (1346710121,), (1346710123,), (1346710128,), (1346710156,), (1346710159,), (1346710162,)) 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`=21628109 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','flou','autre_refus','kraft','Teint_Dans_La_Masse','papier','environnement','Carton_brun','metal','cartonnette','mal_croppe','Carton_gris')) 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`=21628109 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','flou','autre_refus','kraft','Teint_Dans_La_Masse','papier','environnement','Carton_brun','metal','cartonnette','mal_croppe','Carton_gris')) AND mptpi.`min_score`=0.5 To do returned map {'metal': {'main_port_id': 21628109, 'sub_port_id': 21628146, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14166558, 'last_updated_at': datetime.datetime(2025, 3, 24, 6, 19, 30), 'last_updated_at_desc': datetime.datetime(2025, 3, 24, 6, 19, 30), 'last_updated_at_asc': datetime.datetime(2025, 3, 24, 6, 19, 30)}, 'Teint_Dans_La_Masse': {'main_port_id': 21628109, 'sub_port_id': 21628147, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14166559, 'last_updated_at': datetime.datetime(2025, 3, 24, 6, 19, 30), 'last_updated_at_desc': datetime.datetime(2025, 3, 24, 6, 19, 30), 'last_updated_at_asc': datetime.datetime(2025, 3, 24, 6, 19, 30)}, 'plastique': {'main_port_id': 21628109, 'sub_port_id': 21628148, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14166560, 'last_updated_at': datetime.datetime(2025, 3, 24, 6, 19, 30), 'last_updated_at_desc': datetime.datetime(2025, 3, 24, 6, 19, 30), 'last_updated_at_asc': datetime.datetime(2025, 3, 24, 6, 19, 30)}, 'papier': {'main_port_id': 21628109, 'sub_port_id': 21628149, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14166561, 'last_updated_at': datetime.datetime(2025, 3, 24, 6, 19, 30), 'last_updated_at_desc': datetime.datetime(2025, 3, 24, 6, 19, 30), 'last_updated_at_asc': datetime.datetime(2025, 3, 24, 6, 19, 30)}, 'environnement': {'main_port_id': 21628109, 'sub_port_id': 21628150, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14166562, 'last_updated_at': datetime.datetime(2025, 3, 24, 6, 19, 30), 'last_updated_at_desc': datetime.datetime(2025, 3, 24, 6, 19, 30), 'last_updated_at_asc': datetime.datetime(2025, 3, 24, 6, 19, 30)}, 'mal_croppe': {'main_port_id': 21628109, 'sub_port_id': 21628151, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14166563, 'last_updated_at': datetime.datetime(2025, 3, 24, 6, 19, 30), 'last_updated_at_desc': datetime.datetime(2025, 3, 24, 6, 19, 30), 'last_updated_at_asc': datetime.datetime(2025, 3, 24, 6, 19, 30)}, 'Carton_gris': {'main_port_id': 21628109, 'sub_port_id': 21628152, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14166564, 'last_updated_at': datetime.datetime(2025, 3, 24, 6, 19, 30), 'last_updated_at_desc': datetime.datetime(2025, 3, 24, 6, 19, 30), 'last_updated_at_asc': datetime.datetime(2025, 3, 24, 6, 19, 30)}, 'Carton_brun': {'main_port_id': 21628109, 'sub_port_id': 21628153, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14166565, 'last_updated_at': datetime.datetime(2025, 3, 24, 6, 19, 30), 'last_updated_at_desc': datetime.datetime(2025, 3, 24, 6, 19, 30), 'last_updated_at_asc': datetime.datetime(2025, 3, 24, 6, 19, 30)}, 'flou': {'main_port_id': 21628109, 'sub_port_id': 21628154, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14166566, 'last_updated_at': datetime.datetime(2025, 3, 24, 6, 19, 30), 'last_updated_at_desc': datetime.datetime(2025, 3, 24, 6, 19, 30), 'last_updated_at_asc': datetime.datetime(2025, 3, 24, 6, 19, 30)}, 'cartonnette': {'main_port_id': 21628109, 'sub_port_id': 21628155, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14166567, 'last_updated_at': datetime.datetime(2025, 3, 24, 6, 19, 30), 'last_updated_at_desc': datetime.datetime(2025, 3, 24, 6, 19, 30), 'last_updated_at_asc': datetime.datetime(2025, 3, 24, 6, 19, 30)}, 'autre_refus': {'main_port_id': 21628109, 'sub_port_id': 21628156, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14166568, 'last_updated_at': datetime.datetime(2025, 3, 24, 6, 19, 30), 'last_updated_at_desc': datetime.datetime(2025, 3, 24, 6, 19, 30), 'last_updated_at_asc': datetime.datetime(2025, 3, 24, 6, 19, 30)}, 'kraft': {'main_port_id': 21628109, 'sub_port_id': 21628157, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14166569, 'last_updated_at': datetime.datetime(2025, 3, 24, 6, 19, 31), 'last_updated_at_desc': datetime.datetime(2025, 3, 24, 6, 19, 31), 'last_updated_at_asc': datetime.datetime(2025, 3, 24, 6, 19, 30)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21628146,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21628134 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21628147,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21628135 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21628148,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21628136 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21628149,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21628137 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21628150,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21628138 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21628151,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21628139 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21628152,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21628140 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21628153,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21628141 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21628154,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21628142 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21628155,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21628143 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21628156,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21628144 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21628157,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21628145 lien utilise dans velours : https://www.fotonower.com/velours/21628146,21628147,21628148,21628149,21628150,21628151,21628152,21628153,21628154,21628155,21628156,21628157?tags=metal,Teint_Dans_La_Masse,plastique,papier,environnement,mal_croppe,Carton_gris,Carton_brun,flou,cartonnette,autre_refus,kraft After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21628109]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1346710162, 1346710159, 1346710156] map_info['map_portfolio_photo'] : {21628109: [1346710162, 1346710159, 1346710156, 1346710128, 1346710123, 1346710121, 1346710119, 1346710117, 1346710077, 1346710073, 1346710065]} final : False mtd_id 4302 list_pids : [1346710162, 1346710159, 1346710156] Looping around the photos to save general results len do output : 1 /21628109. 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, '2683976') ('4302', '21628109', '1346710162', None, None, None, None, None, '2683976') ('4302', None, None, None, None, None, None, None, '2683976') ('4302', '21628109', '1346710159', None, None, None, None, None, '2683976') ('4302', None, None, None, None, None, None, None, '2683976') ('4302', '21628109', '1346710156', None, None, None, None, None, '2683976') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 4 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, '21628109', "{'metal': 21628134, 'Teint_Dans_La_Masse': 21628135, 'plastique': 21628136, 'papier': 21628137, 'environnement': 21628138, 'mal_croppe': 21628139, 'Carton_gris': 21628140, 'Carton_brun': 21628141, 'flou': 21628142, 'cartonnette': 21628143, 'autre_refus': 21628144, 'kraft': 21628145}", None, None, None, None, '2683976'), ('4302', '21628109', '1346710162', None, None, None, None, None, '2683976'), ('4302', '21628109', '1346710159', None, None, None, None, None, '2683976'), ('4302', '21628109', '1346710156', None, None, None, None, None, '2683976')] time used for this insertion : 0.012232303619384766 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.393381118774414 time spend to save output : 0.012356042861938477 total time spend for step 1 : 1.4057371616363525 step2:final Mon Mar 24 06:19:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed 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 (21628109) 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 21628109 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1346710077,1346710073,1346710065,1346710128,1346710123,1346710121,1346710119,1346710117,1346710162,1346710159,1346710156); insert ignore into MTRUser.portfolio_carac_ratio (portfolio_id, hashtag_type, hashtag_id, value) values (%s,%s,%s,%s) on DUPLICATE KEY UPDATE value=VALUES(value) After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21628109]) Inside saveOutput : final : False verbose : True original output for save of step final : {1346710162: ('0.047557435785900125',), 1346710159: ('0.047557435785900125',), 1346710156: ('0.047557435785900125',)} new output for save of step final : {1346710162: ('0.047557435785900125',), 1346710159: ('0.047557435785900125',), 1346710156: ('0.047557435785900125',)} [1346710162, 1346710159, 1346710156] map_info['map_portfolio_photo'] : {21628109: [1346710162, 1346710159, 1346710156, 1346710128, 1346710123, 1346710121, 1346710119, 1346710117, 1346710077, 1346710073, 1346710065]} final : False mtd_id 4302 list_pids : [1346710162, 1346710159, 1346710156] Looping around the photos to save general results len do output : 3 /1346710162.Didn't retrieve data . /1346710159.Didn't retrieve data . /1346710156.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, '2683976') ('4302', '21628109', '1346710162', None, None, None, None, None, '2683976') ('4302', None, None, None, None, None, None, None, '2683976') ('4302', '21628109', '1346710159', None, None, None, None, None, '2683976') ('4302', None, None, None, None, None, None, None, '2683976') ('4302', '21628109', '1346710156', None, None, None, None, None, '2683976') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 9 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '21628109', '1346710162', '0.047557435785900125', None, None, None, None, '2683976'), ('4302', '21628109', '1346710159', '0.047557435785900125', None, None, None, None, '2683976'), ('4302', '21628109', '1346710156', '0.047557435785900125', None, None, None, None, '2683976')] time used for this insertion : 0.01198124885559082 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.05882143974304199 time spend to save output : 0.012228012084960938 total time spend for step 2 : 0.07104945182800293 step3:velours_tree Mon Mar 24 06:19:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {21628109: [{'metal': 21628134, 'Teint_Dans_La_Masse': 21628135, 'plastique': 21628136, 'papier': 21628137, 'environnement': 21628138, 'mal_croppe': 21628139, 'Carton_gris': 21628140, 'Carton_brun': 21628141, 'flou': 21628142, 'cartonnette': 21628143, 'autre_refus': 21628144, 'kraft': 21628145}]} input_args_next_step : {21628109: ()} output_args : {21628109: [{'metal': 21628134, 'Teint_Dans_La_Masse': 21628135, 'plastique': 21628136, 'papier': 21628137, 'environnement': 21628138, 'mal_croppe': 21628139, 'Carton_gris': 21628140, 'Carton_brun': 21628141, 'flou': 21628142, 'cartonnette': 21628143, 'autre_refus': 21628144, 'kraft': 21628145}]} args : 21628109 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 : ({'metal': 21628134, 'Teint_Dans_La_Masse': 21628135, 'plastique': 21628136, 'papier': 21628137, 'environnement': 21628138, 'mal_croppe': 21628139, 'Carton_gris': 21628140, 'Carton_brun': 21628141, 'flou': 21628142, 'cartonnette': 21628143, 'autre_refus': 21628144, 'kraft': 21628145},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21628109) 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([21628109]) 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.3304135799407959 time spend to save output : 4.935264587402344e-05 total time spend for step 3 : 0.3304629325866699 step4:send_mail_cod Mon Mar 24 06:19:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed 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 : {1346710162: ('0.047557435785900125',), 1346710159: ('0.047557435785900125',), 1346710156: ('0.047557435785900125',)} input_args_next_step : {1346710162: ()} output_args : {1346710162: ('0.047557435785900125',), 1346710159: ('0.047557435785900125',), 1346710156: ('0.047557435785900125',)} args : 1346710162 depend.output_id : 0 input_args_next_step : {1346710162: ('0.047557435785900125',), 1346710159: ()} output_args : {1346710162: ('0.047557435785900125',), 1346710159: ('0.047557435785900125',), 1346710156: ('0.047557435785900125',)} args : 1346710159 depend.output_id : 0 input_args_next_step : {1346710162: ('0.047557435785900125',), 1346710159: ('0.047557435785900125',), 1346710156: ()} output_args : {1346710162: ('0.047557435785900125',), 1346710159: ('0.047557435785900125',), 1346710156: ('0.047557435785900125',)} args : 1346710156 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 : {21628109: [{'metal': 21628134, 'Teint_Dans_La_Masse': 21628135, 'plastique': 21628136, 'papier': 21628137, 'environnement': 21628138, 'mal_croppe': 21628139, 'Carton_gris': 21628140, 'Carton_brun': 21628141, 'flou': 21628142, 'cartonnette': 21628143, 'autre_refus': 21628144, 'kraft': 21628145}]} input_args_next_step : {1346710162: ('0.047557435785900125',), 1346710159: ('0.047557435785900125',), 1346710156: ('0.047557435785900125',), 21628109: ()} output_args : {21628109: [{'metal': 21628134, 'Teint_Dans_La_Masse': 21628135, 'plastique': 21628136, 'papier': 21628137, 'environnement': 21628138, 'mal_croppe': 21628139, 'Carton_gris': 21628140, 'Carton_brun': 21628141, 'flou': 21628142, 'cartonnette': 21628143, 'autre_refus': 21628144, 'kraft': 21628145}]} args : 21628109 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 :4, first value : ('0.047557435785900125',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21628109) 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 (1346710162,1346710159,1346710156) Found this number of photos: 3 ##### Call download_photos : nb_thread : 5 begin to download photo : 1346710156 begin to download photo : 1346710159 begin to download photo : 1346710162 download finish for photo 1346710156 download finish for photo 1346710159 download finish for photo 1346710162 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette216281341742793599/ imagette216281361742793599/ imagette216281391742793599/ imagette216281421742793599/ imagette216281431742793599/ length of list_filenames : 3 ; length of list_pids : 3 ; length of list_args : 3 results_Auto_P21628109_24-03-2025_06_19_59.pdf 21628134 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=21628134 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette216281341742793599 21628136 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=21628136 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette216281361742793599 21628139 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=21628139 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette216281391742793599 21628142 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=21628142 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette216281421742793599 21628143 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=21628143 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette216281431742793599 21628144 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=21628144 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1346710169: '1742793531_2584321_1346710077_c29276f5836421eee0a5359f34659c37_rle_crop_3726189258_0.png', 1346710170: '1742793531_2584321_1346710073_bc53f39ec8a98295cb01cd52611faf32_rle_crop_3726189271_0.png', 1346710171: '1742793531_2584321_1346710065_45e3cce51770bd61267c48fd587c6424_rle_crop_3726189280_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/24/c6510adbc4b51ee5e5b1b674ab5cb97f_27427445.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/24/28e2672ec858caa736ae74f93b2142dc_94987065.png change filename to text .imagette216281441742793599/ imagette216281441742793599/1742793531_2584321_1346710073_bc53f39ec8a98295cb01cd52611faf32_rle_crop_3726189271_0.png.png imagette216281441742793599/1742793531_2584321_1346710065_45e3cce51770bd61267c48fd587c6424_rle_crop_3726189280_0.png.png imagette216281441742793599/1742793531_2584321_1346710077_c29276f5836421eee0a5359f34659c37_rle_crop_3726189258_0.png.png imagette216281451742793599/ wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/24/7e970170cc87538cae96cce10e857ceb_33347906.png imagette216281441742793599 21628145 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=21628145 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette216281451742793599 21628135 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=21628135 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1346710165: '1742793531_2584321_1346710077_c29276f5836421eee0a5359f34659c37_rle_crop_3726189253_0.png', 1346710166: '1742793531_2584321_1346710073_bc53f39ec8a98295cb01cd52611faf32_rle_crop_3726189267_0.png', 1346710167: '1742793531_2584321_1346710065_45e3cce51770bd61267c48fd587c6424_rle_crop_3726189282_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/24/3f9a911f436174c9de4cfc3ab7d4269a_60861818.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/24/f08b9d94389e9eb87d6eca137af9c04f_92557560.png change filename to text .imagette216281351742793599/ imagette216281351742793599/1742793531_2584321_1346710065_45e3cce51770bd61267c48fd587c6424_rle_crop_3726189282_0.png.png imagette216281351742793599/1742793531_2584321_1346710077_c29276f5836421eee0a5359f34659c37_rle_crop_3726189253_0.png.png imagette216281351742793599/1742793531_2584321_1346710073_bc53f39ec8a98295cb01cd52611faf32_rle_crop_3726189267_0.png.png imagette216281401742793600/ imagette216281411742793600/ wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/24/6e220cbd4a49c358f19e9b84d060d1c7_63431769.png imagette216281351742793599 21628140 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=21628140 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette216281401742793600 21628141 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=21628141 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette216281411742793600 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=21628109 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/21628146,21628147,21628148,21628149,21628150,21628151,21628152,21628153,21628154,21628155,21628156,21628157?tags=metal,Teint_Dans_La_Masse,plastique,papier,environnement,mal_croppe,Carton_gris,Carton_brun,flou,cartonnette,autre_refus,kraft your option no_mail is active, we will not send the real mail to your client args[1346710162] : ('0.047557435785900125',) no score found for photo 1346710162 We are sending mail with results at report@fotonower.com args[1346710159] : ('0.047557435785900125',) no score found for photo 1346710159 We are sending mail with results at report@fotonower.com args[1346710156] : ('0.047557435785900125',) no score found for photo 1346710156 We are sending mail with results at report@fotonower.com refus_total : 0.047557435785900125 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=21628109 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_P21628109_24-03-2025_06_19_59.pdf results_Auto_P21628109_24-03-2025_06_19_59.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21628109_24-03-2025_06_19_59.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','21628109','results_Auto_P21628109_24-03-2025_06_19_59.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21628109_24-03-2025_06_19_59.pdf','pdf','','0.07','0.047557435785900125') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21628109]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1346710162, 1346710159, 1346710156] map_info['map_portfolio_photo'] : {21628109: [1346710162, 1346710159, 1346710156, 1346710128, 1346710123, 1346710121, 1346710119, 1346710117, 1346710077, 1346710073, 1346710065]} final : False mtd_id 4302 list_pids : [1346710162, 1346710159, 1346710156] 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, '2683976') ('4302', '21628109', '1346710162', None, None, None, None, None, '2683976') ('4302', None, None, None, None, None, None, None, '2683976') ('4302', '21628109', '1346710159', None, None, None, None, None, '2683976') ('4302', None, None, None, None, None, None, None, '2683976') ('4302', '21628109', '1346710156', None, None, None, None, None, '2683976') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 3 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', '21628109', '1346710162', None, None, None, None, None, '2683976'), ('4302', '21628109', '1346710159', None, None, None, None, None, '2683976'), ('4302', '21628109', '1346710156', None, None, None, None, None, '2683976')] time used for this insertion : 0.01705002784729004 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.3834283351898193 time spend to save output : 0.01722240447998047 total time spend for step 4 : 1.4006507396697998 step5:split_time_score Mon Mar 24 06:20:00 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 : ['21628109'] 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 : [('21628109',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21628109) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1346710156: {'path': 'temp/1742793599_2922356_1346710156_d000b33c19ce0a21b9eab150685a2ce9.jpg', 'extension': 'jpg'}, 1346710159: {'path': 'temp/1742793599_2922356_1346710159_1bdc8452115b68baf83044c9d71ea851.jpg', 'extension': 'jpg'}, 1346710162: {'path': 'temp/1742793599_2922356_1346710162_4835badb049f4fa783b08b2d78047c23.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 = 21628109; (('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 = 21628109 group by h (('06', 11),) 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=21628109 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 (21628109) 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 (21628109) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 24032025 21628109 Nombre de photos uploadées : 11 / 23040 (0%) 24032025 21628109 Nombre de photos taguées (types de déchets): 0 / 11 (0%) 24032025 21628109 Nombre de photos taguées (volume) : 0 / 11 (0%) [{'photo_id': 1346710077, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/24/c29276f5836421eee0a5359f34659c37.jpg', 'username': None, 'uploaded_at': 1742793429, 'text': 'image_24032025_06_15_24_10144.jpg'}, {'photo_id': 1346710073, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/24/bc53f39ec8a98295cb01cd52611faf32.jpg', 'username': None, 'uploaded_at': 1742793429, 'text': 'image_24032025_06_15_34_10138.jpg'}, {'photo_id': 1346710065, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/24/45e3cce51770bd61267c48fd587c6424.jpg', 'username': None, 'uploaded_at': 1742793429, 'text': 'image_24032025_06_15_44_10140.jpg'}, {'photo_id': 1346710128, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/24/9b01f1e97e766e4a18b753d67640acf1.jpg', 'username': None, 'uploaded_at': 1742793489, 'text': 'image_24032025_06_15_54_10137.jpg'}] 0 [] elapsed_time : load_data_split_time_score 2.86102294921875e-06 elapsed_time : order_list_meta_photo_and_scores 9.775161743164062e-06 ??????????? elapsed_time : fill_and_build_computed_from_old_data 0.0006144046783447266 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 21628109, '2025-03-24' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1682789,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.03142213821411133 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= 1682789 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1682789, 'dashboard_run_id': 1690366, 'mtr_portfolio_id': 21626812, 'dashboard_result_id': 9564995, '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_P21626812_24-03-2025_05_48_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21626837, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21626838, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21626839, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21626840, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21626841, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21626842, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21626843, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21626844, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21626845, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21626846, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21626847, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21626848, 'pht': 3726}}"}, {'dashboat_entry_day': 1682789, 'dashboard_run_id': 1690366, 'mtr_portfolio_id': 21627257, 'dashboard_result_id': 9564996, '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_P21627257_24-03-2025_06_04_29.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 21627258, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21627259, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21627260, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21627261, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21627262, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21627263, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21627264, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21627265, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21627266, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21627267, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21627268, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21627269, 'pht': 3726}}"}, {'dashboat_entry_day': 1682789, 'dashboard_run_id': 1690366, 'mtr_portfolio_id': 21627692, 'dashboard_result_id': 9564997, '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_P21627692_24-03-2025_06_19_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21627693, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21627694, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21627695, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21627696, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21627697, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21627698, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21627699, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21627700, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21627701, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21627702, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21627703, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21627704, 'pht': 3726}}"}, {'dashboat_entry_day': 1682789, 'dashboard_run_id': 1690366, 'mtr_portfolio_id': 21628109, 'dashboard_result_id': 9564998, '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_P21628109_24-03-2025_06_19_32.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 21628134, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21628135, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21628136, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21628137, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21628138, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21628139, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21628140, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21628141, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21628142, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21628143, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21628144, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21628145, 'pht': 3726}}"}] 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 = 21626812 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': 2683871, 'mtr_portfolio_id': 21626812, 'created_at': datetime.datetime(2025, 3, 24, 5, 48, 59), 'result': '0.09835260583909122', 'result_long': None, 'result_double': None}] Qualite : 0.09835260583909122 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21626812 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21626812_24-03-2025_05_48_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21626812 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_P21626812_24-03-2025_05_48_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21626837, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21626838, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21626839, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21626840, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21626841, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21626842, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21626843, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21626844, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21626845, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21626846, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21626847, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21626848, 'pht': 3726}}" where mtr_portfolio_id = 21626812 and dashboard_run_id = 1690366 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`=21626812 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9564995, 0.09835260583909122, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21626812_24-03-2025_05_48_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21626837, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21626838, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21626839, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21626840, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21626841, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21626842, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21626843, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21626844, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21626845, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21626846, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21626847, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21626848, '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 = 21627257 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': 2683904, 'mtr_portfolio_id': 21627257, 'created_at': datetime.datetime(2025, 3, 24, 6, 4, 28), 'result': '0.07161588389273395', 'result_long': None, 'result_double': None}] Qualite : 0.07161588389273395 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21627257 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21627257_24-03-2025_06_04_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21627257 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_P21627257_24-03-2025_06_04_29.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 21627258, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21627259, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21627260, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21627261, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21627262, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21627263, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21627264, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21627265, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21627266, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21627267, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21627268, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21627269, 'pht': 3726}}" where mtr_portfolio_id = 21627257 and dashboard_run_id = 1690366 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`=21627257 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9564996, 0.07161588389273395, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21627257_24-03-2025_06_04_29.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 21627258, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21627259, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21627260, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21627261, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21627262, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21627263, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21627264, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21627265, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21627266, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21627267, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21627268, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21627269, '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 = 21627692 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': 2683943, 'mtr_portfolio_id': 21627692, 'created_at': datetime.datetime(2025, 3, 24, 6, 18, 59), 'result': '0.053208171598301206', 'result_long': None, 'result_double': None}] Qualite : 0.053208171598301206 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21627692 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21627692_24-03-2025_06_19_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21627692 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_P21627692_24-03-2025_06_19_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21627693, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21627694, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21627695, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21627696, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21627697, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21627698, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21627699, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21627700, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21627701, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21627702, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21627703, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21627704, 'pht': 3726}}" where mtr_portfolio_id = 21627692 and dashboard_run_id = 1690366 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`=21627692 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9564997, 0.053208171598301206, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21627692_24-03-2025_06_19_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21627693, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21627694, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21627695, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21627696, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21627697, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21627698, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21627699, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21627700, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21627701, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21627702, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21627703, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21627704, '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 = 21628109 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': 2683976, 'mtr_portfolio_id': 21628109, 'created_at': datetime.datetime(2025, 3, 24, 6, 19, 59), 'result': '0.047557435785900125', 'result_long': None, 'result_double': None}] Qualite : 0.047557435785900125 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21628109 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21628109_24-03-2025_06_19_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21628109 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_P21628109_24-03-2025_06_19_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 21628134, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21628135, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21628136, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21628137, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21628138, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21628139, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21628140, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21628141, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21628142, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21628143, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21628144, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21628145, 'pht': 3726}}" where mtr_portfolio_id = 21628109 and dashboard_run_id = 1690366 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`=21628109 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9564998, 0.047557435785900125, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21628109_24-03-2025_06_19_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 21628134, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21628135, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21628136, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21628137, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21628138, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21628139, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21628140, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21628141, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21628142, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21628143, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21628144, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21628145, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21626812,21627257,21627692,21628109) result : ((1346706408,), (1346706409,), (1346706449,), (1346706451,), (1346706453,), (1346706455,), (1346706457,), (1346706483,), (1346706484,), (1346706485,), (1346706537,), (1346706539,), (1346706540,), (1346706542,), (1346706544,), (1346706572,), (1346706573,), (1346706574,), (1346706591,), (1346706638,), (1346706640,), (1346706642,), (1346706644,), (1346706647,), (1346706649,), (1346706674,), (1346706675,), (1346706856,), (1346706859,), (1346706861,), (1346706889,), (1346706890,), (1346706891,), (1346706942,), (1346706944,), (1346706946,), (1346706951,), (1346707003,), (1346707005,), (1346707007,), (1346707009,), (1346707012,), (1346707048,), (1346707050,), (1346707052,), (1346707054,), (1346707058,), (1346707061,), (1346707080,), (1346707085,), (1346707089,), (1346707093,), (1346707098,), (1346707131,), (1346707134,), (1346707138,), (1346707141,), (1346707145,), (1346707165,), (1346707169,), (1346707172,), (1346707175,), (1346707223,), (1346707202,), (1346707206,), (1346707209,), (1346707290,), (1346707292,), (1346707294,), (1346707322,), (1346707331,), (1346707334,), (1346707338,), (1346707342,), (1346707365,), (1346707368,), (1346707371,), (1346707374,), (1346707378,), (1346707434,), (1346707437,), (1346707441,), (1346707445,), (1346707449,), (1346707470,), (1346707472,), (1346707474,), (1346707476,), (1346707479,), (1346707509,), (1346707517,), (1346707520,), (1346707523,), (1346707524,), (1346707527,), (1346707547,), (1346707549,), (1346707551,), (1346707553,), (1346707556,), (1346707589,), (1346707592,), (1346707595,), (1346707602,), (1346707631,), (1346707633,), (1346707635,), (1346707637,), (1346707640,), (1346707642,), (1346707875,), (1346707904,), (1346707931,), (1346707958,), (1346708002,), (1346708060,), (1346708213,), (1346708225,), (1346708229,), (1346708231,), (1346708256,), (1346708265,), (1346708273,), (1346708898,), (1346708926,), (1346708929,), (1346708956,), (1346708971,), (1346708976,), (1346708982,), (1346708984,), (1346708988,), (1346708991,), (1346708993,), (1346709199,), (1346709094,), (1346709135,), (1346709166,), (1346709369,), (1346709373,), (1346709378,), (1346709393,), (1346709401,), (1346709404,), (1346709423,), (1346709427,), (1346709430,), (1346709433,), (1346709466,), (1346709472,), (1346709482,), (1346709529,), (1346709532,), (1346709534,), (1346709537,), (1346709567,), (1346709571,), (1346709583,), (1346709598,), (1346709630,), (1346709634,), (1346709637,), (1346709640,), (1346709646,), (1346709669,), (1346709672,), (1346709675,), (1346709678,), (1346709728,), (1346709732,), (1346709737,), (1346709741,), (1346709746,), (1346709775,), (1346709778,), (1346709782,), (1346709789,), (1346709826,), (1346709829,), (1346709832,), (1346709835,), (1346709864,), (1346709868,), (1346709872,), (1346709876,), (1346709910,), (1346709913,), (1346709916,), (1346709919,), (1346709945,), (1346709959,), (1346709965,), (1346709969,), (1346709977,), (1346709986,), (1346710006,), (1346710009,), (1346710012,), (1346710015,), (1346710021,), (1346710081,), (1346710065,), (1346710073,), (1346710077,), (1346710117,), (1346710119,), (1346710121,), (1346710123,), (1346710128,), (1346710156,), (1346710159,), (1346710162,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'24032025': {'nb_upload': 11, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21628109]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1346710162, 1346710159, 1346710156] map_info['map_portfolio_photo'] : {21628109: [1346710162, 1346710159, 1346710156, 1346710128, 1346710123, 1346710121, 1346710119, 1346710117, 1346710077, 1346710073, 1346710065]} final : True mtd_id 4302 list_pids : [1346710162, 1346710159, 1346710156] Looping around the photos to save general results len do output : 1 /21628109Didn'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, '2683976') ('4302', '21628109', '1346710162', None, None, None, None, None, '2683976') ('4302', None, None, None, None, None, None, None, '2683976') ('4302', '21628109', '1346710159', None, None, None, None, None, '2683976') ('4302', None, None, None, None, None, None, None, '2683976') ('4302', '21628109', '1346710156', None, None, None, None, None, '2683976') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 4 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, '21628109', 'None', None, None, None, None, '2683976'), ('4302', '21628109', '1346710162', None, None, None, None, None, '2683976'), ('4302', '21628109', '1346710159', None, None, None, None, None, '2683976'), ('4302', '21628109', '1346710156', None, None, None, None, None, '2683976')] time used for this insertion : 0.029479503631591797 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.3763093948364258 time spend to save output : 0.029649972915649414 total time spend for step 5 : 0.4059593677520752 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 (2683976) 1.92user 2.19system 0:05.80elapsed 71%CPU (0avgtext+0avgdata 159076maxresident)k 3912inputs+3040outputs (53major+63649minor)pagefaults 0swaps